Why should apt-key output not be parsed?

From man apt-key:

DESCRIPTION
   apt-key is used to manage the list of keys used by apt to authenticate
   packages. Packages which have been authenticated using these keys will
   be considered trusted.
   Note that if usage of apt-key is desired the additional installation of
   the GNU Privacy Guard suite (packaged in gnupg) is required. For this
   reason alone the programmatic usage (especially in package maintainer
   scripts!) is strongly discouraged. Further more the output format of all
   commands is undefined and can and does change whenever the underlying
   commands change.  apt-key will try to detect such usage and generates
   warnings on stderr in these cases.


I got my hands on ds4drv this weekend, got some problems with it too(though my problem is a bit harder as I'm trying to use DS4 with Dark Souls in Wine through Steam).

First, native driver can interfere with your config (it works perfectly with DS4 though, native Steam detects controller as DS4 and all seems good), so you may wants to just delete /dev/input/jsX of native driver (do not unload hid_sony module as ds4drv --hidraw seem to use it).

Second, ds4drv by default starts in some sort of limited profile (just led and trackpad probably), so you may want to play with ds4drv config file to enable profile switching button (PS button by default) and configure your other profiles.


Difference between SMART reallocated sectors and bad sectors

Your guess is right. The drive only reallocates a sector when a write operation fails. Check wikipedia. Also take a look at the Current Pending Sector Count S.M.A.R.T attribute. The pending sectors are those which had read failures but no write failures, upon writing to these sectors the sectors will be reallocated.

The OS would know nothing about a remapped sector, because remapping is transparent, this means that is the OS try to write to a sector e.g 27643 and that write fails, then the drive will remap the sector internally to another physical area. Then when the OS tries again to write to sector 27643 it will succeed. The OS doesn't know that it is writing to a different physical area.


I need speech recognition software for Ubuntu (like "Dragon NaturallySpeaking 13 professional" for Windows)

My suggestion is you try native applications like Gnu/Linux.

Simon Speech Recognition:

Simon is highly configurable, targeted speech recognition software. Simon features a whole new recognition layer, context-awareness for improved accuracy and performance, a dialog system able to hold whole conversations with the user and more.

Open a terminal,Press Ctrl+Alt+T

Run it:

sudo -i
apt-get update
apt-get install simon

CMU Sphinx:

CMU Sphinx is a speaker-independent large vocabulary continuous speech recognizer released under BSD style license. It is also a collection of open source tools and resources that allows researchers and developers to build speech recognition systems.

Download Page


Is there any way to make scroll bars scroll all the way on every drag?

When the scrollbar shows under your pointer, you can clic on your mouse middle button (or both buttons in case you use a touchpad) to inmediatly go to the top, botton, the middle or any part of a document you point.


Command sudo not found, even though it is installed

Try to reinstall sudo:

pkexec apt-get install --reinstall sudo


How do you exclude files from wiki part used in snapcraft.yaml

This is pretty simple, you can override specific keywords from a remote defined part by redefining the key for the part. This would look something like this:

parts:
    my-part:
        plugin: autotools
        source: .
        after: [desktop/gtk2]
    desktop/gtk2:
        snap:
            - -usr/include

The trick here is that desktop/gtk2 does not define a plugin entry in the parts definition hinting snapcraft to look for the full part definition from the remote parts cache.

Here I used the snap keyword, there are others like stage and filesets

By running

snapcraft help plugins

to read more about this some minimal examples.


On file systems, I would be looking at simplicity and just use ext3/4 and use some file backup utility to snapshot file contents not drive state.
It's not a file system recommendation, but why not use this.


"Read only file system" for non-root disk

You haven't mentioned the filesystem type, but it looks like it got mounted (read man mount) read-only. Type mount | grep Disky to be sure.

To mount it read-write (or get an informative (!) error message:

sudo mount -o remount,rw /media/jack/Disky

If it's an NTFS filesystem, last used on Windows, you may have to take it back to Windows, mount the disk, and unmount it through Windows.


How to change Ubuntu 18.04 system fonts?

The font for the texts highlighted in the screenshots you've posted is dictated by the GNOME shell theme.

Since generally it's not a good idea to edit system files (any update of an associated package will most probably overwrite it), you may create a custom css override in your home directory and load it from there. To do that, follow the steps below.

Create a directory, say MyTheme in ~/.themes. (You may create ~/.themes if it doesn't exist.)
Create another directory inside MyTheme called gnome-shell.
Create an empty document in this gnome-shell directory and name it gnome-shell.css.
Open this gnome-shell.css file with a text editor and add the following lines

@import url("/usr/share/gnome-shell/theme/ubuntu.css");

stage {
    font-family: FONT_NAME, Sans-Serif;
}

Change FONT_NAME to the font of your choice and save the file.
Install the GNOME extension called the User themes from here.
Install (GNOME) Tweaks by running

sudo apt install gnome-tweak-tool

Launch Tweaks and go to Appearance section. Click on the drop-down box next to "Shell theme". MyTheme should appear in the drop-down list. Select it.
Restart GNOME shell by pressing alt+f2 then typing r and hitting enter (works in an Xorg session, in Wayland logout and login again).


Useradd/groupadd fails: failure while writing changes to /etc/passwd and /etc/group. Contexts problem

It seems to be a bug. I have also been hit by it.

Running strace on groupadd, the failures is after groupadd writting to /proc/thread-self/attr/fscreate

Here is the bug report https://bugs.launchpad.net/ubuntu/+source/libselinux/+bug/1769301

Reported eight months ago, still not fixed.

SELinux is not very well supported in either Debian or Ubuntu. If you like SELinux, consider using Redhat or Centos.


This article in the Community Wiki gives a basic rundown of iptables. You can also pull up the man page for it in Terminal with man iptables. Generally, you do not need to use iptables for a standard networking configuration, as each service will open the respective ports required for itself. If you have installed Apache, OpenSSH Server and an FTP server like ProFTP, their ports (80, 22 and 21 respectively) will be open.

At the bottom of the article I linked there are instructions for using graphical tools such as GUFW or Firestarter, which may be useful if you don't have a lot of experience working in the command line.


Why is Duplicity asking for a passphrase when restoring a backup?

This just happened to me as well.

tldr; try a space character for the passphrase

Most of below may not actually be relevant, but I'm not sure what causes the problem, so here is what I did:

I previously made a backup using the Backups GUI built in to Ubuntu (I think it's really called deja-dup), then I wiped my machine
After the 18.04 install I configured Backups to backup the current data to a new folder
I tried to use Backups restore feature to restore my original backup to a temp folder, but for some reason it would only restore from the new backup
I then decided to use duplicity directly like so...
duplicity restore file://. /<my path>/temp_dir
but it asked for a passphrase, I simply hit Enter, but it asked again
I started searching for answers and found this question... I found no answers
In a fit of desperation I tried a space character... and it worked!

It's some sort of bug I guess, my restore is still running so I'm not currently sure if any input would work or only a space.

Hope it helps


How can I fix "NT_STATUS_LOGON_FAILURE" error when mounting using cifs?

Had a similar problem. I found that adding nounix as an option in the fstab file allow for the network shares to be accessed.


The key icon is just to show you when you are using elevated or root privilege and gives you the option to drop those privileges. I don't see this icon all the time too and that is the way it is meant to be. As far as I can remember, I usually see this icon while installing something from the software centre or running something with root privileges.


Duplicity is a good option, you can find the website here. There is also a graphical front-end that ties into the Backup settings in Ubuntu called Déjà Dup.

More info can be found at this Ask Ubuntu answer.


Larry Finger has moved this driver to another branch.
You have an RTL8723DE device, that still needs drivers.
You can install them by
sudo apt update
sudo apt install git dkms
git clone https://github.com/lwfinger/rtw88.git
sudo dkms add ./rtw88
sudo dkms install rtlwifi-new/0.6


Windows 10 not booting after installing Ubuntu 15.04

I've fixed this issue with this tip from ubuntu.

Link: https://help.ubuntu.com/community/Boot-Repair

I hope it will fix your problem!

Cheers


Cannot find my .odt file (Saved it from .doc)

If the file was not distroyed.

From ubuntu open a terminal by pressing ctrl + alt + t. Running find ~/ -atime 0 -iname *odt will find files in your home dir less than 24 hours with a name ending in odt. Change the dir to the path where you think the file is. Then change the location or time or name.

If the file seems to have been deleted see How to recover deleted files?

If the file was not saved but accidentally lost LibreOffice should have offered to recover the file. Also check the modification date of the doc version it may have been where the autosave ended up.


You can try this command.
Removes repo and plank.
sudo add-apt-repository -r ppa:ricotz/docky
sudo apt-get purge plank


Many laptops need a hardwire connection to finish installing drivers to get the wireless up and running. Many times just a few commands can get you on your way.

Check for your WiFi card type by typing this command into a terminal (open a new terminal with Ctrl+Alt+T)...

lspci -vnn -d 14e4:

If you have one of the cards that shows as working here: http://wireless.kernel.org/en/users/Drivers/b43 then you can simply run the following commands with an ethernet connection to the Internet.

sudo apt-get update
sudo apt-get install firmware-b43-installer

If your device does not come up as green on the previous list, then you can try this guide: https://help.ubuntu.com/community/BroadcomSTA%28Wireless%29


How to make a disk image and restore from it later?

With dd
dd is the low level utility that you can use to accomplish this task. It's essentially a low level byte-for-byte copy utility. If you want the "UNIX" way of accomplishing this, then read on.
All references to the file system and hard disks are located locally on the virtual /dev/ filesystem. There are a multitude of "nodes" in /dev/ that are interfaces to almost all the devices on your computer. For example, /dev/hda or /dev/sda would refer to the first hard drive in your system (hda vs sda depends on the hard drive), and /dev/hda1 would refer to the first partition on your hard drive.
The most straight forward way to make a raw image of your partitions is to use dd to dump the entire partition to a single file (remember the OS access the partitions /dev/sda1 through a file interface). Make sure you are on a larger partition or on a secondary drive and perform the following command:
dd if=/dev/hda1 of=./part1.image to backup(repeat for different partitions)
dd if=./part1.image of=/dev/hda1 to restore
You can use the exact same command to back up the entire hard disk (replace hda1 with hda). You can then use any compression program (gunzip, zip, bzip) to compress the file for storage. You can use this same technique to make rote copies of entire partitions to make clones of your computer.
There is one limitation though, when restoring the backup: The partition needs to be the same size (or bigger) as the partition you took the image from, so this limits your options in case of a restore. However, you can always expand the partition after you've restored the backup using gparted or parted. The picture gets even muddier when you are trying to restore entire disk copies. However, if you are restoring the backup to the same exact hard drive, you don't need to worry about this at all.
However, if you want a "friendlier" utility à la Norton Ghost then this suggestion might not be for you.


After a bit more asking around I found that it is still supported, and the links are now fixed.


Read-only file system error while creating a directory?

Likely the partition was mounted with the errors=remount-ro option, that means, if an error is encountered on the file system it will be remounted read-only. Then you encountered an I/O error (which is usually a hardware error because of a failing disk). Because of that I/O error the partition got remounted read-only.

You can check the current mounts with simply mount. You can try remounting the disk read-write, but since it is a production machine, with a likely hardware error, I would just contact the "guys". I won't be happy if I cause a data loss.


If you are happy with 20.04.1 LTS (meaning all your harware works)
then install the SERVER version of 20.04.01 LTS here


Unable to "rm" a file named "() - ." due to "No such file or directory"

Since the filename contains spaces, you need to include the filename in quotation marks.

One problem why you cannot delete the file is because you might not have permissions to do it.

So try sudo rm " () -  .".

This should do the trick.  Also look out for a trailing space after '.'


Explanation of 70-persistent-net.rules script

First, there is a variable $var already defined in the script. We don't know what it is, but it is probably a MAC address.

The script line outputs the contents of /etc/udev/rules.d/70-persistent-net.rules through the "pipe" mechanism to the grep command. The output of this is: just the lines that contain the value of $var. This is assumed to be one line only. This one line is then treated by sed: it outputs the value that comes after NAME=. Finally, the tr command strips off the double quotes.

The result of this is either the value eth0 or eth1, depending on the value of $var. This result is then assigned to the variable $IF. So the meaning of this line of script is: set $IF to the name of the interface with MAC address $var.


How to install a super-old unsigned apt-get package?

If it's just one or two package files (which may be the case if you're trying to install wallpapers) then I suggest just downloading the deb files from the respective PPA and install them using

sudo dpkg -i <deb-file-name.deb>

command.


Check for the apache config files located in

  /etc/apache2/sites-available/

and if you have just installed it, the file would be named as

  default

.

Ensure that the config file is pointing to the correct folder and your scripts are located there.


I had success with PlayOnLinux just clicking on its built-in iTunes installer. I believe these are the versions that worked for me, but again you should install via PlayOnLinux:

Ubuntu 14.04 with Wine 1.4.1 (32-bit) and iTunes 10.1.1 (32-bit)
Ubuntu 15.10 with Wine 1.7.48 (32-bit) and iTunes 12.0.1 (32-bit)

I only ever used it for purchasing music, however. I would not expect it to work for syncing music to an Apple device.


I just added a right-click menu option that allows you to select multiple files, select Script/pdf-printer.sh and it'll create PDF files. If you choose another printer name in the script, it should use that instead, but I can't verify that. Older howtos might not work because we've moved to Gnome 3 which has a few changes. In this case, scripts have been moved from ~/.gnome2/nautilus-scripts to ~/.local/share/nautilus/scripts. Otherwise, everything should work as you would expect.

Install http://apt.ubuntu.com/p/cups-pdf. This package provides a PDF printer which prints to the PDF folder in your home folder, $HOME/PDF.
Open Nautilus and create a folder named PDF in your home.
Press Ctrl+H in Nautilus to show hidden files.
Open ~/.local/share/nautilus/scripts.
Create a new file and call it "pdf-printer.sh".
Paste the following:

#!/bin/bash
#
# pdf-printer.sh
#
# Print files from the right-click context menu in Nautilus.
# Place this script in ~/.local/share/nautilus/scripts.
# The printer to use (as shown in the Printer Configuration
# gui or in /etc/cups/printers.conf).
printer=PDF
echo "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" | while read file
    do
        lpr -P "$printer" "$file"
done
exit 0

Save the file and close it.
Right-click the file and choose Properties > Permissions. Make sure the box is checked to allow executing the file.

It is possible that you have to restart nautilus for this to work. In that case, you can press Alt+F2 and enter killall nautilus. Other than that, you should now be able to select files, right click and use the script from the "script" menu.


Executing a script when inserting a flash drive

If you run the script below in the background, it checks for mounted volumes. If one of your defined drives is mounted, it automatically opens the set folder in nautilus.

A minor problem was that nautilus does not support opening a directory in a new tab from command line, only in a new window. That means that the initial window, that appears if you insert a usb drive, has to be gracefully closed. The script uses wmctrl to do that, at the same moment that your chosen folder will open.

You might need to install it first:

sudo apt-get install wmctrl

The script

#!/usr/bin/env python3

import subprocess
import time

#--
drivename_folders = [("My Passport", "docs"), ("7827-2F8C", "sanel")]
#--

def get_mountedlist():
    return [item[item.find("/"):] for item in subprocess.check_output(
            ["/bin/bash", "-c", "lsblk"]).decode("utf-8").split("\n") if "/" in item]

done = []

while True:
    mounted = get_mountedlist()
    new_paths = [dev for dev in mounted if not dev in done]
    valid = sum([[(drive, drive+"/"+item[1], item[0]) for drive in new_paths \
                  if item[0] in drive] for item in drivename_folders], [])

    for item in valid:
        open_window = "nautilus  "+"'"+item[1]+"'"
        close_window = "wmctrl -c  "+"'"+item[2]+"'"
        subprocess.Popen(["/bin/bash", "-c", open_window])
        time.sleep(1)
        subprocess.Popen(["/bin/bash", "-c", close_window])

    done = mounted
    time.sleep(2)

How to use

Copy the script into an empty file
Set your drives and folders

In the head section of the script, change the line:

drivename_folders = [("My Passport", "docs"), ("7827-2F8C", "MyFolder")]

where every tuple represents a drive(name), and the folder inside the drive that has to be opened. I left my "test" -names as an example.
If you are not sure about the exact name of your drive, run lsblk to see the name (without the preceding path to the mountpoint)
Save the script

Save the script as open_folder.py and run it by the command:

python3 /path/to/open_folder.py

If all works as you expected, add it to your Startup Applications

How it works

Every two seconds, the script runs the lsblk command to check for all mounted volumes.
If it finds one or more newly mounted volume name(s), it checks if the name is in the list of volumes that you set to be opened in a specific way (opening a sub directory)
The script opens the sub directory of the volume that you defined, and closes the (drive's root-) window that was automatically opened on connecting the drive.
To prevent repeatedly opening the folders, the volume then is added to the "done" list, until the volume is unmounted.

Other file managers

I tested it on pcmanfm (Lubuntu) and thunar (Xubuntu) and, as expected, in both cases, it workes fine.

If you want to use it on either Lubuntu or Xubuntu, change the line:

open_window = "nautilus  "+"'"+item[1]+"'"

to:

open_window = "thunar "+"'"+item[1]+"'"
(for Xubuntu)

or

open_window = "pcmanfm "+"'"+item[1]+"'"
(for Lubuntu, also disable in pcmanfm's preferences: Media > "Show available options for removable media")

Of course, make sure wmctrl is installed

Most likely, it will work on other file managers as well.

Generalized version of the script

The version of the script above is specifically for one situation. To be able to use the script in a broader range of purposes (to run any command when a specific drive gets connected, making backups of it for example) the version below could be useful.

In this case, in the head section of the script, the tuples represent:

 drivename_folders = [(<drivename_a>, <command_a>), (<drivename_b>, <command_b>)]

see the "test" setting in the script below.

The script

#!/usr/bin/env python3

import subprocess
import time

#--
drivename_command = [("My Passport", "gnome-terminal"), ("F806-0C50", "gedit")]
#--

def get_mountedlist():
    return [item[item.find("/"):] for item in subprocess.check_output(
            ["/bin/bash", "-c", "lsblk"]).decode("utf-8").split("\n") if "/" in item]

done = []

while True:
    mounted = get_mountedlist()
    newly_mounted = [dev for dev in mounted if not dev in done]
    valid = sum([[(drive, item[1]) for drive in newly_mounted \
                  if item[0] in drive] for item in drivename_command], [])
    for item in valid:
        subprocess.Popen(["/bin/bash", "-c", item[1]])
    done = mounted
    time.sleep(2)

How to use

Copy the script into an empty file
Set your drives and commands
Save the script

Save the script as drive_run.py and run it by the command:

python3 /path/to/drive_run.py

If all works as you expected, add it to your Startup Applications


Is there any command line equivalent for "Edit Connection" GUI?

Since the first method is using Network Manager, and the Network Manager command-line interface (nmcli) doesn't support it, no.


Open jocky-gtk(default installed). It will show you additional driver which need to install. Select appropriate driver and hit on active button. What is your graphics configuration ?


Boot from a live CD or USB and supposing that your HDD will be /dev/sda, issue this command

sudo fsck.ext4 -p -f /dev/sda1

assuming that your root partition is the first one, and you have ext4 on it.


Primary display is not being detected after installing Nvidia driver

This solved my problem
write in terminal and reboot
cd /etc/X11
sudo rm xorg.conf
sudo cp xorg.conf.nvidia-xconfig-original xorg.conf
reboot


You're so close! Your snap isn't requesting access to the network, which by default snaps do not get. You do this by setting the plugs property of the app in question. Try making your apps section look like this:

apps:
  launch-project:
    command: roslaunch hello_world run_code.launch
    plugs: [network, network-bind]

Once you install that, run snap interfaces and you'll see both the network and network-bind plugs connected to the core's slot. To learn more about these, check out the snapd interfaces wiki.

As an extra exercise, once it's working, try disconnecting the interfaces:

sudo snap disconnect ros-example:network
sudo snap disconnect ros-example:network-bind

And run your app again. You should see it fail again with the same error.

As a final note, while you're developing/testing things out, remember you can install with --devmode to skip confinement: sudo snap install --devmode <my snap>.


Ubuntu 12.04 - PC freezes after 10 minutes of inactivity

As the problem started when you changed your graphics card, it seems obvious that there may be something relevant to the graphic cards drivers. Ubuntu needs additional proprietary drivers for many Nvidia cards. Did you adjust that when you changed the card? I would suggest that you check
 a tutorial on how to install the latest ones


I also encountered this error while upgrading from 10.04 to 10.10. However, AppArmor was not installed. Therefore, the following fixed the problem for me:

sudo /etc/init.d/mysql stop

After running this command from a separate SSH session, the upgrade continued.


Relative path to source when copying or moving

This should do the trick:

mv long/path/to/a/folder{,.old}

Reference: search for Brace Expansion in bash manpage.


How can I move the Exit, Maximize, Minimize buttons to the left in Kubuntu?

This is done in Window Decorations KDE Control Module.

Click Configure Buttons..., check Use custom titlebar button positions and rearrange everything as you like.


The problem is that you're trying to reference a variable called $ibhav (not $i).

Variables can be more than one character, and in your example, the shell has no way to tell if you meant $i or $ibhav (or $ibha or $ibh or $ib).

The fix is to bracket your variable names:

echo "${d}${m}${i}bhav.csv.zip"

so that it's unambigious which variable you're referencing.

From man bash:

   Parameter Expansion
        The `$' character introduces parameter expansion, command substitution, or
        arithmetic expansion.  The parameter name or symbol to be expanded may  be
        enclosed  in  braces, which are optional but serve to protect the variable
        to be expanded from characters immediately following  it  which  could  be
        interpreted as part of the name.

        When  braces  are  used,  the  matching  ending brace is the first `}' not
        escaped by a backslash or within a quoted string, and not within an embed‐
        ded arithmetic expansion, command substitution, or parameter expansion.

        ${parameter}
               The  value  of  parameter  is substituted.  The braces are required
               when parameter is a positional parameter with more than one  digit,
               or  when  parameter  is  followed by a character which is not to be
               interpreted as part of its name.  The parameter is a shell  parame‐
               ter as described above PARAMETERS) or an array reference (Arrays).


Logged in Sudo User keeps getting Permission Denied Messages

If you want to execute a series of commands as the root user without having to prefix every command with sudo every time, I recommend using sudo -i to grab a login shell as the root user. From the manual:
-i, --login
                 Run the shell specified by the target user's password database entry as a login
                 shell.  This means that login-specific resource files such as .profile,
                 .bash_profile or .login will be read by the shell.  If a command is specified,
                 it is passed to the shell for execution via the shell's -c option.  If no
                 command is specified, an interactive shell is executed.  sudo attempts to change
                 to that user's home directory before running the shell.  The command is run with
                 an environment similar to the one a user would receive at log in.  Note that
                 most shells behave differently when a command is specified as compared to an
                 interactive session; consult the shell's manual for details.  The Command
                 environment section in the sudoers(5) manual documents how the -i option affects
                 the environment in which a command is run when the sudoers policy is in use.

Alternatively, if you remember setting a root password during setup (which is unlikely in the case of Ubuntu Server -- the root account is normally disabled), you can change user to root using the su root command.


Deleted unintentionally on your local host? Deleted on the cloud?

Great news: There is a beta interface to show deleted files on Ubuntu One. See https://edge.one.ubuntu.com/files/trash/root/ to give it a try.


Unable to proxy authentication credentials in KDE

This is a long standing bug in KDE

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

The work around is to set a proxy manually, in ~/.bashrc

export http_proxy=http://<username>:<password>@<proxyIP>:<port>

You then have to use the -E with sudo

sudo -E apt-get update


I wrote a bash script to automatically reconnect my WiFi, see https://github.com/waltinator/net-o-matic.git - Watch for (WiFi) network going down, then do a user-specified thing to fix it.

It uses ip monitor address, and, when it sees '^Deleted [[:digit:]]+: [[:alnum:]]+[[:space:]]+inet[[:space:]].* scope global ' in the output, it executes "the next thing" from a user supplied list of commands. It then rotates the list, so next time it will try the 2nd, 3rd, ... eventually wrapping around to the 1st command on the list.


How much space do i need for ubuntu dualboot?

I usually recommend at least 50GB for Ubuntu, but since you are using this for development, you have a few options. If you plan to use the same files in both OS', then you can simply mount the NTSF partition and use the same files for both systems. For users seriously considering switching to Ubuntu full time, I recommend slicing their drive in half. The frustrating/awesome thing about Linux is that it's your choice.


How to fill up virtual memory space in linux with only using a single image file?

Ubuntu avoids using swap unless it needs the memory.   You can just keep allocating and filling memory until it needs to be paged out.   You don't need to hit every byte, just a least one byte in every page.  You could use a loop where you allocate a page of memory and write to it in a loop to fill memory.

Using mmap maps the file into the virtual memory image of the application.  Any paging activity for the mmapped memory will use the file rather than swap.

You may be able to do the same by writing a large file to /tmp if you are using tmpfs as its file system.

Modern operating systems allow you to over-commit virtual memory.  This allows use of space memory structures that far exceed available memory.


Add 'Search Wikipedia' and Search 'Physics Forum' for Right-Click-Highlight-Menu?

One way to do it is with an add-on:

https://addons.mozilla.org/en-US/firefox/addon/context-search/

I googled for "firefox content menu search" and got several possibilities.


How can I manually change the mouse/pointer speed?

The easiest way of doing this is xset m. The general format is:

xset m ACCELERATION THRESHOLD

  where ACCELERATION defines how many times faster the cursor will move than the default speed, when the cursor moves more than THRESHOLD pixels in a short time. ACCELERATION can be a fraction, so if you want to slow down the mouse you can use 1/2, and if 3 is slightly too fast, but 2 is too slow, you can use 5/2, etc.

For example:

xset m 1/2 4

To get the current values, use:

xset q | grep -A 1 Pointer

For more information, see here.


Found my own answer. I forgot to check the permissions... usb and bluetooth access were turned off. Told you I was new to this.


Ubuntu 12.10 wont mount an External harddrive

There sure is!  Use the mount command to force it to mount, and umount to un-mount it when you are done and if you decide that you want it un-mounted.


Ubuntu One app installation "waiting" on iPad

I've sometimes encountered this problem when installing any apps from on iOS devices. Try the following:

First, try turning the network devices off and on. Do this with all of them (Wifi, 3G, LTE). Even try putting it into and out of airplane mode.
If that didn't work, try rebooting the iPad.

Hope one of these helps.


error in installing mongo in virtual machine

Looks like your locale settings are broken or non-existent on that VM, or at least that session on that VM.  One of MongoDB's dependencies (boost) will fail when a locale is not correctly set (see SERVER-9032).  For reference, before the change in SERVER-9032 this problem still happened but looked like this.

Sometimes logging out and back in can fix it (only broken for current session), or you can try running sudo locale-gen to make sure generation is successful.

In the meantime, as a workaround to get mongo (or mongod etc.) running, just set your LC_ALL variable manually before starting the program:

export LC_ALL=C
mongo


OK, so you have two users: one called "root" (big no-no, but anyway, that's what you have) and one called "username"…

Then the command is

cp /root/.matlab/* /home/username/.matlab/


what are the specifications a mount command provide?

Since we should not give link only answers, from this site:

auto - Mount automatically at boot, or when the command mount -a is issued.
noauto - Mount only when you tell it to.
exec - Allow execution of binaries on the filesystem.
noexec - Disallow execution of binaries on the filesystem.
ro - Mount the filesystem read-only.
rw - Mount the filesystem read-write.
user - Allow any user to mount the filesystem. This automatically implies noexec, nosuid, nodev, unless overridden.
users - Allow any user in the users group to mount the filesystem. This automatically implies noexec, nosuid, nodev, unless overridden.
nouser - Allow only root to mount the filesystem.
owner - Allow the owner of device to mount.
sync - I/O should be done synchronously.
async - I/O should be done asynchronously.
dev - Interpret block special devices on the filesystem.
nodev - Don't interpret block special devices on the filesystem.
suid - Allow the operation of suid, and sgid bits. They are mostly used to allow users on a computer system to execute binary executables with temporarily elevated privileges in order to perform a specific task.
nosuid - Block the operation of suid, and sgid bits.
noatime - Don't update inode access times on the filesystem. Can help performance (see atime options).
nodiratime - Do not update directory inode access times on the filesystem. Can help performance (see atime options).
relatime - Update inode access times relative to modify or change time. Access time is only updated if the previous access time was earlier than the current modify or change time. (Similar to noatime, but doesn't break mutt or other applications that need to know if a file has been read since the last time it was modified.) Can help performance (see atime options).
discard - Issue TRIM commands to the underlying block device when blocks are freed. Recommended to use if the filesystem is located on an SSD.
flush - The vfat option to flush data more often, thus making copy dialogs or progress bars to stay up until all data is written.
nofail - Mount device when present but ignore if absent. This prevents errors being reported at boot for removable media.
defaults - the default mount options for the filesystem to be used. The default options for ext4 are: rw, suid, dev, exec, auto, nouser, async.

A comparison on filesystems you'll find here: http://en.wikipedia.org/wiki/Comparison_of_file_systems. It is really too much to paste here.

"fuseblk" is (among others) how an ntfs partition is reported via the "mount" command. More on Fuse: http://en.wikipedia.org/wiki/Filesystem_in_Userspace. (but the link isn't helping much in understanding)


SSH via a password is less secure than SSH with a DSA/RSA certificate. Create a certificate with a password. Then give the sys admin account a different password.

You will only be able to login via SSH if you have the certificate AND know the password associated with it.

You can then use a different password for running sudo (the user's password).

This gives you a lot more security!

Remember to use pass phrases and not passwords too. The difference being a pass phrase is made up of many words (greater than 20 characters say). The longer the password, the more time it would take to break via dictionary attacks.

To create a certificate:

type ssh-keygen at a terminal and follow the instructions (giving a unique filename and enter your pass phrase)
then copy the public key onto the server you are administering using ssh-copy-id -i path/to/your/sshkey.pub
Now log on to your server and turn off password authentication in /etc/ssh/sshd_config and restart the sshd service


Delayed LUKS encrypted drive mount with password prompt not visibly asking password

In order to reuse the password you insert when logging in and get your home encrypted, while entering your password only once, one possible solution is to use pam_mount
https://wiki.archlinux.org/index.php/pam_mount

First, you can install it using apt install libpam-mount

Then, you need to configure pam_mount what is supposed to reuse the password.
For that, create a file at /etc/security/pam_mount.conf.xml with contents as follows:

<volume user="user" fstype="crypt" path="/dev/disk/by-partuuid/96au7f24-gbshmec6wwabhh30" mountpoint="/dev/mapper/user_home"/>
<volume user="user" fstype="auto" path="/dev/mapper/user_home" mountpoint="/home/user"/>

You may be able to do all with just one volume tag but I was unable to as I needed to do a binded mount.

Do note you may need to use some options, set as attributes of the volume tag, such as:

options="bind,rw,user,exec,suid,noauto,lazytime,relatime"

You can learn more of what each one is in the mount manual pages.

Finally, create the file /etc/pam.d/system-login and write the following:

#%PAM-1.0

auth       required   pam_tally.so         onerr=succeed file=/var/log/faillog
auth       required   pam_shells.so
auth       requisite  pam_nologin.so
auth       optional   pam_mount.so
auth       include    system-auth

account    required   pam_access.so
account    required   pam_nologin.so
account    include    system-auth

password   optional   pam_mount.so
password   include    system-auth

session    optional   pam_loginuid.so
session    optional   pam_keyinit.so       force revoke
session [success=1 default=ignore]  pam_succeed_if.so  service = systemd-user quiet
session    optional   pam_mount.so
session    include    system-auth
session    optional   pam_motd.so          motd=/etc/motd
session    optional   pam_mail.so          dir=/var/spool/mail standard quiet
-session   optional   pam_systemd.so
session    required   pam_env.so

I don't know exactly what each of these does individually but this is what I needed to have there so the mount would succeed as I wanted.


Why does my LD_LIBRARY_PATH get an uninstalled terminal launch?

A new terminal creates a new shell and it does not have access to your variable.

If you want the variable available at each login for your user, put the command in ~/.bashrc

If it should be available to all users, edit /etc/bash.bashrc instead.


NVIDIA-SMI couldn't find libnvidia-ml.so library and nothing in /usr/lib/nvidia

Solved by following suggestions from ubfan1 and other suggestions from various sources. Specifically:

# BTW this is all in console mode (for me, alt+ctrl+F2)
# login + password as usual

# removing ALL nvidia software
$ sudo apt-get purge nvidia*

# Checking what's left:
$ dpkg -l | grep nvidia
# Then I deleted the ones that showed up (mostly libnvidia-* but also xserver-xorg-video-nvidia-xxx`)
$ sudo apt-get purge libnvidia* xserver-xorg-video-nvidia-440
$ sudo apt autoremove # clean it up

# now reinstall everything including nvidia-common
$ sudo apt-get nvidia-common

# find the right driver again
$ sudo add-apt-repository ppa:graphics-drivers/ppa
$ sudo apt update
$ ubuntu-drivers devices
$ sudo apt-get install nvidia-driver-440 # the recommended one by ubuntu-drivers
$ update-initramfs -u # needed to do this so rebooting wouldn't lose configuration I think

$ sudo reboot


This is wrong:

  Partition type: Hidden HPFS/NTFS

The partition should be FAT32 (FAT16 may work too). So delete it and create new one. BTW you need a bigger one then size of the disk image if you want keep persistent changes.


I have the same problem with a Dell d510.  I had 12.04 32 bit run fine, but it doesn't boot after the upgrade I performed yesterday.

I still managed to boot it with the old kernel left over from 12.04 by pressing the shift key after BIOS, then you can get to the Grub menu and choose the 12.04 kernel.

I don't have a solution to boot with the 12.10 kernel, I need to attach a serial console because the display is blank.


I believe you need 3D capabilities to run Unity. If youre running it in VB, you could try the Unity 2D ISO. That might give you the Unity design to try out.


Add

auto wlan0
iface wlan0 inet dhcp
wpa-ssid [SSID]
wpa-ap-scan 1
wpa-key-mgmt WPA-PSK
wpa-psk [password]

to

/etc/network/interfaces

then

sudo /etc/init.d/networking restart


How to restore the default toolbox windows in GIMP?

Since you recently installed GIMP and closed the Toolbox window, I would suggest to reset your window preferences because it would also restore the dockable dialogs and the Layers windows which is extremly handy when working with GIMP.

Navigate through Edit menu → Preferences → Window Management → and click the button for Reset Saved Window Positions to Default Values. Then click Ok to close the Preferences dialog and restart GIMP.

I would also suggest to enable the single-window mode so that all these windows would be docked inside the GIMP's main window and ease the workflow when working with it. Enable it through Windows menu → Single-Window Mode.


How do I turn on phonetic typing for Tamil?

[ There is an updated answer for Ubuntu 14.04+. ]

Yes. You can type Tamil phonetically in Ubuntu 12.04.

Install the following packages:

sudo apt-get install m17n-db m17n-contrib ibus-m17n

You might have to log out and back in to see the various layouts.

To enable phonetic typing for Tamil, search for Keyboard input methods in the dash and open it.

Go to Input method tab and click on Select an Input method. Scroll down to Tamil and you will have a couple of options to install. Choose Phonetic from the list and install it.


Touchpad dosn't work on Lenovo V330-15IKB

I had a similar issue here: Touchpad not working after system update (18.04) Not sure if it's the same issue, but it might help


Create symbolic link on a USB stick drive

FAT32, unlike NTFS, does not support symlinks, as per https://www.linuxquestions.org/questions/blog/the-dsc-472367/not-even-linux-can-create-symlinks-on-fat32-36281/ and https://superuser.com/questions/216332/is-there-anything-like-a-link-or-shared-mount-point-for-fat32-folders-in-linux-a

Therefore, if you want symlinks on a Windows-readable drive, use NTFS.

Mac OS X requires additional work to enable writing to a USB flash drive as per http://osxdaily.com/2013/10/02/enable-ntfs-write-support-mac-os-x/ and https://techsviewer.com/write-ntfs-drives-macos-high-sierra/ but is able to read NTFS natively.


Locale settings are not right. How can I reset them?

I've managed to get things running "normally" again.

After trying lots of package re-installs etc, including fully removing IBus (all to no effect),  I started to think that it may be caused by a config setting which re-installing doesn't modify.

I had noticed that the output from locale was rather bereft, of UTF-8 assignments, so I checked this in a recently installed VM...  all entries of LC_* (except LC_ALL, which overrides all the others) were set with the .UTF-8 suffix.
so I manually set the LC_* values as shown below.

I probably could have just used LC_ALL="en_AU.UTF-8", but in reading up about this, I've discovered how to customize the system date and time format, and LC_ALL would override my custom setting.

I don't know if I've used the most appropriate method, but it works!

The modified file is: /etc/default/locale

This shows the contents before the mod:

LANG="en_AU.UTF-8"
LANGUAGE="en_AU:en"
LC_MESSAGES="en_AU.UTF-8"

This shows the contents after the mod:

LANG="en_AU.UTF-8"
LANGUAGE="en_AU:en"
LC_CTYPE="en_AU.UTF-8"
LC_NUMERIC="en_AU.UTF-8"
LC_TIME="en_AU.UTF-8"
LC_COLLATE=en_AU.UTF-8
LC_MONETARY="en_AU.UTF-8"
LC_MESSAGES=en_AU.UTF-8
LC_PAPER="en_AU.UTF-8"
LC_NAME="en_AU.UTF-8"
LC_ADDRESS="en_AU.UTF-8"
LC_TELEPHONE="en_AU.UTF-8"
LC_MEASUREMENT="en_AU.UTF-8"
LC_IDENTIFICATION="en_AU.UTF-8"

The same file in the VM contained only this one line:

    LANG="en_AU.UTF-8"


play sound in someone else's session from command line

make sure the target computer is on, or you are able wake it from the LAN, log in via SSH, and run the command. You might have to scp those executables necessary to invoke the command.

Or, show him how laptops have sleep settings.


This happens every time I logout now. I've added a second text input and switch back and forth returns my keyboard layout to the desired setting.


I'm not able to create wifi hotspot in Ubuntu 18.04

After you ran the terminal command:

iw list

You found:

 Supported interface modes:
     * IBSS
     * managed
     * monitor

Not every device supports every mode using Linux drivers. In many cases, perhaps most, there are modes that work perfectly well in Windows or even macOS, that don't work at all in Linux.

Footnote: It is perfectly possible, barring a whitelist,  to swap out your device to get other features support as I have. For an example, my device: Intel Corporation Wireless 7260 [8086:08b2] (rev 83) reports the following:

Supported interface modes:
     * IBSS
     * managed
     * AP
     * AP/VLAN
     * monitor
     * P2P-client
     * P2P-GO
     * P2P-device


Wubi is less tested than normal Ubuntu installs, since a lot of people and particularly developers, do not have Windows installed. So when you use a Wubi install, it's even more important to keep backups and particularly when doing distribution upgrades.

A working Wubi install shouldn't degrade much in performance or things like that. You may want to defrag your host filesystem from time to time, but you'll probably want to do that anyway. I don't think it'll be too significant in any case.

Normally, I would recommend doing a normal install for a permanent installation, but it sounds to me like you've found a very good exception.


How to mount external HDD on 18.04? can't find in /etc/fstab

My HDD was corrupted .Solved it with ntfsfix

sudo ntfsfix /dev/sdd1
Mounting volume... $MFTMirr does not match $MFT (record 0).
FAILED
Attempting to correct errors...
Processing $MFT and $MFTMirr...
Reading $MFT... OK
Reading $MFTMirr... OK
Comparing $MFTMirr to $MFT... FAILED
Correcting differences in $MFTMirr record 0...OK
Processing of $MFT and $MFTMirr completed successfully.
Setting required flags on partition... OK
Going to empty the journal ($LogFile)... OK
Checking the alternate boot sector... OK
NTFS volume version is 3.1.
NTFS partition /dev/sdd1 was processed successfully.


How do I throttle a command in a terminal window?

man nice, and if you need I/O throttling man ionice.

Let's look at some simple examples.

Throttling CPU usage:

you@box:/$ nice -n 10 /usr/bin/convert blah.gif blah.jpg

From your description, however, CPU usage is almost certainly not your real problem here.  More likely, you're having severe I/O contention.

Throttling Disk Usage:

you@box:/$ ionice -c2 -n7 /usr/bin/convert blah.gif blah.jpg

-c2 is "best effort", and -n7 is the lowest "best effort" priority.  So, this will throttle the job to lower I/O priority than most other things on the system.

you@box:/$ ionice -c3 /usr/bin/convert blah.gif blah.jpg

-c3 (no priority level necessary) means "Idle only".  Jobs set to -c3 ONLY take up otherwise idle disk scheduling time, for virtually no impact at all on the system - but potentially a considerably longer execution time for your job, depending on how busy the rest of the system gets.


How to share Internet on ubuntu to android

How to share internet to other devices through wifi:

I'll suggest you the method that worked for me and my friends.
install kde-nm-connection manager. details on how to install & setup
This should work. If not do as follows:

disable the wifi driver from "Additional Drivers" in System Settings (skip to last step if there are no wifi drivers shown already)
restart you computer
now we will be installing a non-free firmware wifi driver. copy paste this command and restart you computer: sudo apt-get install linux-firmware-nonfree After installing this you can try to setup the hotspot again.


How to remove (uninstall) all games from Kubuntu 12.04 using CLI?

I found a method posted by mjrich way back on 08-21-2005

http://xpt.sourceforge.net/techdocs/nix/distro/debian/deb14-PackageRelatedCommandsInstallation/ar01s04.html

I slightly modified that method to come up with this:

dpkg -l | grep game | awk '{ print $2 }' > outfile
dpkg-query -W --showformat '${Section}\t${Package}\n' | grep ^games | awk '{ print $2 }' >> outfile
apt-get --purge remove `cat outfile`
apt-get autoremove
rm outfile*

It appears to have worked. Before I accept this as the answer I will wait to see if someone comes up with a better method. Thanks.


How to install webilder on Ubuntu 16.04?

Finally I found a solution or a workaround:
https://launchpad.net/ubuntu/+ppas?name_filter=python-support
I picked the following ppa:
https://launchpad.net/~syseleven-platform/+archive/ubuntu/xenial-ports
and I could install python-support and webilder 0.7.3.1 on ubuntu 16.04


I had this same problem and just got ccminer working by using auto Nvidia symbolic link with update-alternatives. Try this:

sudo update-alternatives --config x86_64-linux-gnu_gl_conf

choose auto (0) and enter


How to check if file in ubuntu one cloud have been changed

You cannot do this with using the REST API to talk to the Ubuntu One file sync service, as it has no method of pushing out notifications to your client program. The only way to do this is to use the persistent connection of the internal synchronization protocol, which the official ubuntuone-client code already uses.


Yes, there is a very easy way. Just press F11.


What brands of USB Microphones are compatible with Ubuntu Studio?

If by "compatible" you mean is recognized by the system and can be used/recorded in an appropriate software, I'm inclined to say any USB device will do the job.

However, you will probably not get a setup or configuration software for Linux from most of the manufacturers, so you may be limited to what the "generic" mixers and tools in Ubuntu/Ubuntu Studio offer, and may not be able to access some "advanced" features some products offer.

And of course it's always wise to buy a product with a Right to Return in case you can't get it to work at all.

If you're looking for devices that people have good experience with, or that have particular Linux support, have you considered researching e.g. on LinuxMusicians?


With trial and error I found 99% the cause is MEGAsync's tray indicator

see https://github.com/meganz/MEGAsync/issues/428


How to fix one existing Ubuntu installation from another

If you're able to boot to another Ubuntu system, you can chroot to your root partition.
Check which partition you're using for your broken installation. I'll use /dev/sdb3 in this example. Replace the value of the root variable below:
root=/dev/sdb3
cd /
sudo mkdir /mnt/repair
sudo mount "$root" /mnt/repair
sudo mount -t proc proc /mnt/repair/proc
sudo mount -t sysfs sys /mnt/repair/sys
sudo mount -o bind /dev /mnt/repair/dev

You may need to mount /boot and /boot/efi. Simply use sudo mount /dev/sdb2 /mnt/repair/boot where /dev/sdb2 is the boot partition.
Now, to chroot, use this:
sudo chroot /mnt/repair

You're now logged in as root in your broken Ubuntu installation.
You can now do anything you want to repair your system.
Once you're done, use the following commands to clean up:
# Make sure there are no processes running in your chroot session
# Then, exit
exit
sudo umount /mnt/repair/{proc,sys,dev}
sudo umount /mnt/repair

Reference


How can I prevent being locked out after changing the iptables default policy?

There are two things you should do to keep that system accessible before changing netfilter-rules:

create an exception in the firewall rules for ssh from your machine
create a safeguard

create an exception

create an appropriate rule with iptables

sudo iptables -A INPUT -p tcp --dport ssh --source-address yourextIPadd -j ACCEPT

(where yourextIPadd is the IP address of your machine at home, seen from the outside)

or utilizing ufw

If you have ufw  installed already you can tell ufw to create an exception

sudo ufw allow from yourextIPadd to any port 22

create a safeguard

Before issuing the command to alter the default-policy for netfilter to DROP you can tell the system to revert that command after (say) 5 minutes with the handy command at

sudo at -vM now +5 minutes

now you are in something like an editor, where you can type commands to be executed later, you close/end that by typing CTRLD.

Type

/sbin/iptables --policy INPUT ACCEPT

CTRLD

You will see something like

sudo at -vM  now +1 minute
Fri Aug 29 17:46:00 2014

warning: commands will be executed using /bin/sh
at> /sbin/iptables iptables --policy INPUT ACCEPT
at> <EOT>
job 5 at Fri Aug 29 17:46:00 2014

Remarks

you need to call at with sudo (it must be root's at table)
therefore no need for sudo within
-v tells at to show the intended execution time when you are finished
-M tells at to send no e-mail regarding success/failure
for in-depth help with iptables have a look at the IPTables Howto


How to run multiple or single C++ .cpp files on terminal?

1. How to run .cpp from Terminal

1.1 Only “filename.cpp” file:

Make filename # creates “main” application
./main #Run application on terminal

Or

g++ -Wall -o outputname filename.cpp #”-Wall” activates all Warnings
 ./main #Run application on terminal

1.2 Multiple .cpp files:

1.2.1 Selected .cpp files

g++ -Wall filename1.cpp filename2.cpp -o output
./output

1.2.2 All .cpp files

g++ -Wall *.cpp -o outputname
./outputname


CPU getting stuck during boot due to nvidia driver

You must add "nouveau.modeset=0" to the grub at the end of the line that starts with "linux". To do it you need to press e to edit in the grub menu and after the line update you press F10 to boot.

Install the right NVidia drivers at the end.


Downloaded the deb file from here http://pkgs.org/ubuntu-12.10/ubuntu-main-amd64/libgnome-control-center1_3.4.2-0ubuntu19_amd64.deb.html

Works like a charm now


Bash: sudo -S <<< "mypassword" - interactive shell issue

File descriptors are inherited

What you're using is <<< aka here-string, and that type of redirection is implemented via temporary files that are immediately unlinked (aka deleted). Knowing also that processes inherit file descriptors (and stdin among them)1 from parent to child, when sudo -S is performed, it reads its input from the temporary file that your original shell has passed to it (the one that reads sudo -S command). You can see that in action:

$ sudo -S bash -c 'ls -l /proc/self/fd/0' <<< "mypasswd"
lr-x------ 1 root root 64 Feb 26 13:12 /proc/self/fd/0 -> '/tmp/sh-thd.cUOOXU (deleted)'

Thus, nano reports Too many errors from stdin error in such case. What can be done is to manually re-wire where stdin is coming from.

$ sudo -S bash -c 'exec < /dev/tty; nano /tmp/foobar' <<< "mypasswd"

$ sudo -S bash -c 'nano /tmp/foobar < /dev/tty' <<< "mypasswd"

Either of the two commands will lauch nano properly and other commands as well. /dev/tty is the special file representing current terminal device, and it is effectively the same thing as stdin of "normal" interactive shell (and of course I am oversimplifying that statement).

Another variation on the theme is $ sudo -S bash -c 'nano /tmp/foobar 0>&1' <<<"mypasswd". stdout effectively points to the same terminal device (unless you've explicitly provided a redirection to have stdout point somewhere else). Thus, if we make stdin point to be the duplicate of stdout, it's effectively the same solution as above. (And if you're wondering why I highlighted dup part, that's because dup2() syscall is the one responsible for all the juggling of file descriptors under the hood)

Caution

However, note that I don't encourage using sudo -S in interactive shell, since passwords will remain in shell's history

$ sudo -S bash -c 'sleep 3m' <<< "ohnomypassword"
^C
$ history 2
 2016  sudo -S bash -c 'sleep 3m' <<< "ohnomypassword"
 2017  history 2

sudo -S is more appropriate for use with other processes, where sudo -S would expect input via pipeline, ideally from zenity --password or dialog --passwordbox "foobar text" 200 200 (see extra1 and extra2 about dialog).

1. If file is open with O_CLOEXEC flag set, the child process or replaced process spawned via execve() type of flag won't have access to that file descriptor - that is it will be closed on execve()


Quality of default audio driver for a USB DAC

Older versions of the Windows USB audio driver were limited to 16-bit samples at 48 kHz; installing a vendor-specific driver (ASIO or not) was a workaround to make better sample formats available for a device that supports them.

The Linux driver does not have this limitation. (Neither do recent Windows versions.)


Install an EFI from Ubuntu on a Macbook Pro

EFI is a type of firmware. I believe that what you mean when you write "EFI" is EFI System Partition (ESP), which is where EFI boot loaders reside on most EFI-based computers. Macs, although they're (sort of) EFI-based, are weird; Apple's EFI implementation looks first to the Mac's HFS+ root (/) partition for a boot loader.

Generally speaking, the best way to install Linux in a single-boot configuration is to go with a straight-MBR setup and a BIOS-mode boot loader such as GRUB, without using the GUID Partition Table (GPT) or an EFI-mode boot loader or boot manager such as rEFIt or rEFInd. Thus, I recommend you wipe your partition table by using GParted or parted to create a new one. (Both GParted and parted refer to an MBR partition table as an "msdos" partition table.) When you boot the Ubuntu installer in BIOS/CSM/legacy mode, it should then install using MBR partitions and the computer will boot just like a commodity PC.

Although it is possible to install Linux in EFI mode on a Linux-only Mac, doing so is tricky because of Apple's weird EFI, which requires an OS X tool called bless to manage. Although there is a Linux port of bless, it's rather exotic, and AFAIK it doesn't ship with Ubuntu, so you'll have to track it down and learn to use it in order to manage a Linux-only EFI-mode boot. (Alternatively, you could manage the boot process using an OS X CD-R or USB flash drive, but that's a bit awkward.)


Dual screens with one workspace on each?

As far as I know, Compiz doesn't support what you want.

I've heard that there are other window managers that can.  I don't remember which ones in particular -- Xmonad?  Awesome?  I remember that the one I heard about was a tiling window manager, and decided changing all my window-managing habits was too great a cost for this feature.

As a workaround I sometimes mark windows as visible on all workspaces and then keep them on one monitor.


When starting Emacs from menu, it is not obeying .Xresources

Right. The Ubuntu menus launch emacs24, not emacs. Have to add to .Xresources:

emacs24.font: Inconsolata-13


Go to grub press e to edit the GRUB menu. (vmlinuz line)

2.Using the arrow keys to navigate, delete quiet and splash and again insert one of the options below.

For:-
Older Intel video card: i915.modeset=1 or i915.modeset=0

nVidia: nomodeset

Generic: xforcevesa

AMD

Press Ctrl and X to boot.
The suggested options that I have found are hardware specific. Here is a list:

If this worked every time edit it permanently in ur grub menu.


Phoronix have a deb available. It's for Lucid but they claim it works with Maverick.

Otherwise, there are a few other debs floating around the internet.. And then there's compiling it yourself.


syntax error near unexpected token `(' when adding svn branch to bash prompt

The main problem with is that you have used typographical “smart quotes“

’ “

in place of regular ASCII quotes

'  "

throughout your script. Because the shell doesn't recognise them as quoting characters, it is trying to parse your sed commands as shell commands and failing.

Once you fix that, your script should run - however you will likely get an error from sed like

sed: -e expression #1, char 24: invalid reference \1 on `s' command's RHS

from your command

sed 's#HEAD\ (.*)# (git::\1)#'

since ( and ) don't delimit a capture group in basic regular expression (BRE) syntax. Instead, you need \( and \)

sed 's#HEAD \(.*\)# (git::\1)#'

(the space character doesn't actually need to be backslash-escaped); or you can switch to extended regular expression (ERE) mode using -E or -r

sed -E 's#HEAD (.*)# (git::\1)#'


Please explain the complete steps involved in the installation of OpenSSH server on Ubuntu

Go to terminal and type:

sudo su -
apt-get install openssh-server openssh-client

Test the installation

ps -A | grep sshd

If the output is something like this:

<some number> ?        00:00:00 sshd

Then ssh daemon is running.

Again type in terminal;

ss -lnp | grep sshd

If the output is something like this:

0  128  :::22  :::*  users:(("sshd",16893,4))
0  128   *:22   *:*  users:(("sshd",16893,3))

Then it means that ssh daemon is listening for incoming connections

Now we edit the configuration file. First we make a backup of the original file.

sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.factory-defaults

Now we open the configuration file to edit it

sudo vim /etc/ssh/sshd_config

Weak passwords are easy to guess. The best practice is to use SSH keys instead of password.
So we disable password authentication altogether.
Go to the line

#PasswordAuthentication yes

and replace it with

PasswordAuthentication no

Enabling forwarding gives more options to attackers who have already guessed passwords.
So we disable it. It gives us a little security
Go to the lines

AllowTcpForwarding yes
X11Forwarding yes

and replace them with

AllowTcpForwarding no
X11Forwarding no

We can explicitly allow certain users and deny certain users to login. For that we have to put the following lines at the bottom of the config file.

AllowUsers Fred Wilma
DenyUsers Dino Pebbles

For optimal performance of laptop we allow two pending connections. Between the third and
tenth connection the system will start randomly dropping connections
from 30% up to 100% at the tenth simultaneous connection. This can done by the following line

MaxStartups 2:30:10

To log more error and other useful information
we alter the line

LogLevel INFO

into

LogLevel VERBOSE

To scare away novice attackers we can display a banner
We remove the hash tag from the front of the line

#Banner /etc/issue.net

to make it

Banner /etc/issue.net

Then we go to terminal and type:

sudo -H gedit /etc/issue.net

Then add the notice:

***************************************************************************
                            NOTICE TO USERS
This computer system is the private property of its owner, whether
individual, corporate or government.  It is for authorized use only.
Users (authorized or unauthorized) have no explicit or implicit
expectation of privacy.
Any or all uses of this system and all files on this system may be
intercepted, monitored, recorded, copied, audited, inspected, and
disclosed to your employer, to authorized site, government, and law
enforcement personnel, as well as authorized officials of government
agencies, both domestic and foreign.
By using this system, the user consents to such interception, monitoring,
recording, copying, auditing, inspection, and disclosure at the
discretion of such personnel or officials.  Unauthorized or improper use
of this system may result in civil and criminal penalties and
administrative or disciplinary action, as appropriate. By continuing to
use this system you indicate your awareness of and consent to these terms
and conditions of use. LOG OFF IMMEDIATELY if you do not agree to the
conditions stated in this warning.
****************************************************************************

If an IP address is tries to connect more than 10 times in 30 seconds, all the following attempts will fail since the connections will be DROPped.
The rule is added to the firewall by running a single command in terminal:

sudo ufw limit ssh

Now we save and close the config file and restart ssh by typing in terminal:

systemctl restart ssh

Next we setup SSH keys
There are two pairs of SSH keys public and private.
Public keys are present in servers and private keys are present with individuals.
If someone can match his private key with public key, only he/she can login.
Furthermore optionally private keys can be protected by passphrase.
Furthermore when the keys are generated by using 4096 bit encryption
it is almost impossible to break them by brute force.

Step one - Create the RSA key pair:

Type in terminal

ssh-keygen -t rsa -b 4096

Here we use 64 bit encryption for more security

Step two - Store the keys and passphrase:

Follow the onscreen instructions, give desired location for storage of keys,
reccommended to accept the default, opt for passphrase, give a strong passphrase,
remember it.

The screen is something like this:

ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/demo/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/demo/.ssh/id_rsa.
Your public key has been saved in /home/demo/.ssh/id_rsa.pub.
The key fingerprint is:
4a:dd:0a:c6:35:4e:3f:ed:27:38:8c:74:44:4d:93:67 demo@a
The key's randomart image is:
+--[ RSA 2048]----+
|          .oo.   |
|         .  o.E  |
|        + .  o   |
|     . = = .     |
|      = S = .    |
|     o + = +     |
|      . o + o .  |
|           . o   |
|                 |
+-----------------+

Step three - Copy the Public Key:

Type in terminal

ssh-copy-id user@123.45.56.78

Here 123.45.56.78 is the server IP address

In case of localhost it is

ssh-copy-id user@localmachinename

The screen is something like this

The authenticity of host '12.34.56.78 (12.34.56.78)' can't be established.
RSA key fingerprint is b1:2d:33:67:ce:35:4d:5f:f3:a8:cd:c0:c4:48:86:12.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '12.34.56.78' (RSA) to the list of known hosts.
user@12.34.56.78's password:
Now try logging into the machine, with "ssh 'user@12.34.56.78'", and check in:

  ~/.ssh/authorized_keys

to make sure we haven't added extra keys that you weren't expecting.

Now our installation is complete. To login we need to type in terminal:

ssh username@servername

Then when prompted for passphrase we need to provide it.

Now we  to enable root login of opessh server.
We first have to enable sudo password as it is disabled in Ubuntu by default.

For that, we type in terminal the following, screen will be something like this:

sudo passwd
[sudo] password for [username]: [Type your user password and press return]
Type new UNIX password: [Type the root password you want]
Retype new UNIX password: [Retype the root password you chosen before]
passwd: password updated successfully

Now we have to edit the /etc/sudoers file.

Here we use the editor called visudo
It is because visudo is for the sole purpose of editing sudoes file

In ubuntu by default config files are opened by nano editor
To change it type in terminal:

sudo update-alternatives --config editor

The following screen will appear:

There are 4 choices for the alternative editor (providing /usr/bin/editor).

  Selection    Path                Priority   Status
------------------------------------------------------------
* 0            /bin/nano            40        auto mode
  1            /bin/ed             -100       manual mode
  2            /bin/nano            40        manual mode
  3            /usr/bin/vim.basic   30        manual mode
  4            /usr/bin/vim.tiny    10        manual mode

Press  to keep the current choice[*], or type selection number:

Type 3 and press enter

Then type:

sudo visudo

Move to the line which reads

Defaults    env_reset

Press enter

Above a new line gets created
Type:

Defaults    rootpw

use spacebar, not TAB

Press Esc --> : + x --> Enter

In terminal type:

gedit /etc/ssh/sshd_config

Move to the line:

PermitRootLogin password-prohibited

and change it to

PermitRootLogin yes

Save and close

Then restart SSH

service ssh restart

Then type in terminal:

ssh-copy-id root@localmachinename

Output  screen may show:

The authenticity of host '12.34.56.78 (12.34.56.78)' can't be established.
RSA key fingerprint is b1:2d:33:67:ce:35:4d:5f:f3:a8:cd:c0:c4:48:86:12.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '12.34.56.78' (RSA) to the list of known hosts.
user@12.34.56.78's password:
Now try logging into the machine, with "ssh 'user@12.34.56.78'", and check in:

  ~/.ssh/authorized_keys

to make sure we haven't added extra keys that you weren't expecting.

Now we have granted private key access to root to login
To test type:
ssh root@localmachine

It will ask for passphrase. Passphrase remains the same. Give it.
Now the root will be able to successfully login

Now for more security we have to add firewall
Type:

app install ufw

Now start it

enable ufw

Get a list of currently running processes

ufw app list

OpenSSH will be listed there.
ALow it through firewall

ufw allow OpenSSH

Restart firewall

systemctl restart ufw

Our installation is complete


well that issue I was faced and solution is simple , instead of left click, choose right click on the files from there you can choose minimized files.

@OP I cant give you precise screen shot because right now I am using my work PC , but the process is same. Just right click on the files , from there you can do opening minimized files.


You could play around with ImageMagick's montage tool. You'll want to install the imagemagick
 package before you go any further.

At face value, you just need to ply montage with input files and then give it an output file:

montage scan1.jpg scan2.jpg output.jpg

but montage can get really powerful. You can pass along various translation arguments if you need to rotate the pages before they're combined. You can read an extended manual on it here.


Aha! The transmission-deamon was in group sambashare but was not it's main group.

Issuing sudo usermod -g sambashare debian-transmission solved my problem.


USB video capture device worked in 13.10, not working 14.04

This thing won't let me comment because I'm just a starter here, so I had to use the "answer" option in order to post a reply:

That is a BIG step up!!  I'm glad it was, as I wiped 12.04 and did another fresh install of 14.04 64-bit with the hope it could be made to work.

There is one thing that's not quite right yet - the audio.  I selected the proper device, and I have some sound, but there is a lot of noise overriding it.  Just so you know the noise wasn't there in my 12.04 testing.  I had to go to advanced options and change the audio there from "primary language" to "stereo" or I didn't get any of the video audio - just noise.  In the advanced options I had to set the power line frequency from its default to 60hz - now everything is working great!!!!!!

Out of a strong desire to know, do you know which package, or combination of packages, made this work now?

Thanks SO MUCH!!

EDIT: 9/25/2014 - well, I do still have a problem.  The answer did at least get the device working, but when I stream to a file via VLC the sound is WAY out of sync in the resulting file.  I've seen options to adjust it via playback in VLC, but I'm scanning in some old VHS tapes to put on a media center, and I obviously can't do any type of run-time adjustments.  I've also seen some other threads that show how to do something with splitting the audio and video and then keep adjusting the sound as time goes on.  I'm not knowledgeable enough to do that nor do I particularly want to be.  Prior to 14.04, this all worked fine.  I have no idea if this 14.04, or if it's a problem with VLC.  Are there any other GUI based programs that are simple enough for someone like me to use that will accept a USB video capture device as input and write the output to a file?

Thanks


Why does my webcam light turn on when I select A2DP Profile for my headphones?

I actually found the reason by accident myself: The Webcam has an integrated microphone which is activated when I am in the sound settings. Thus, the LED is turned on.


Take a look at git-bzr. Note the Python rewrites at the bottom of the readme, which may integrate better. Also be advised that there are quite a few forks / derivatives of git-bzr around, but this seems to be most recently active; you may want to look around github for similar things.


Unable to locate the Ubuntu 16.04.04 kernel version 4.15.0-46 ISO to install on Dell R740 server

You need to install 16.04.5, or 18.04.

16.04.5 can be found here


How can I make suggestions to Ubuntu developers?

shotcut has a forum, where you can post suggestions.

On the gnome shotwell developer site you will find all contact addresses under the topic Getting in Touch.


Ubuntu 20.04 on Dell XPS 9360, WiFi stops working after about a day?

I just had this issue with my new laptop. Two steps saved me from trouble:

I installed latest kernel which is 5.9.15 at the time. Everything seems to be working fine so far.

Then I added options iwlwifi 11n_disable=1 to /etc/modprobe.d/iwlwifi.conf
and then reboot my machine.


Ambiance Theme gone ! i've left with radiance , when i try to select it i got a metacity like theme

open synaptic package manager and type light-theme and mark them for reinstaling it will fix yo


Xfce4 menu is not showing all applications

Delete the file /home/username/.config/menus/xfce-applications.menu. This file is created when you use the menu-editor. After deleting the file all applications will show up in the menu, but Favorites will be empty, you can easily repopulate by adding favorites. Don't use the menu-editor, it always leads to loss of menu-entries.

If you can't open Thunar from the menu, open terminal with Ctrl+Alt+T and use command rm ~/.config/menus/xfce-applications.menu


Based on the comments above, sounds like a program (file permissions or otherwise) problem. Unfortunately, in this case, I would backup my important data and just reinstall the root (/) partition.

If you enabled any PPA or other third-party repositories, please don't, they're not all safe, unless you're 100% sure they work. Sometimes they exist in order to test packages.

Alternatively, you can always:

use the command import from package imagemagick
install gimp and from the menu File > Create > Screenshot


I'm not able to boot to Windows after installing Ubuntu 14.10

The reason you have this issue is because Windows was installed with EFI and Ubuntu with Legacy mode and these two both Love to cause problems with one another. Your best bet is to back up your Ubuntu data and reinstall it in EFI mode.


Xubuntu Can't access encrypted home folder

You should boot a Live CD and then try to mount your home directory. Maybe this guide can help you?

http://www.howtogeek.com/116297/how-to-recover-an-encrypted-home-directory-on-ubuntu/

There is also a page on the Ubuntu Wiki with lots of information.

https://help.ubuntu.com/community/EncryptedPrivateDirectory


Ubuntu 16.04 usually suspends before login and while logout

Although you didn't say your laptop was docked the symptoms you describe can be found in bug reports posted by other users experiencing errors when logging out whilst docked.

There is a bug report on this for Lenovo ThinkPad T400 suspends upon log-out from GNOME when docked and lid closed when using Fedora 25 https://bugzilla.redhat.com/show_bug.cgi?id=1365719.

There is a problem reported under Ubuntu 15.10 where the system logs out when resuming from suspend: Logged out on resume from sleep ubuntu 15.10. The interesting point is it happens most of the time but not all the time, such as yourself.

This is the closet I've found to your problem: Ubuntu 16.04: Logout cause the PC to suspend/sleep which references another user with the same problem: Ubuntu 16.04 sleeps / suspend before login screen.

It would appear your laptop is docked and the lid is closed when you log out which causes the system to suspend. To prevent this enter the Terminal by pressing Ctrl+Alt+T and then typing:

gksu gedit /etc/systemd/logind.conf

Search for these lines and make them look like this (possibly by removing # in front or replacing suspend with ignore):

HandleLidSwitch=ignore
HandleLidSwitchDocked=ignore

Save the file and quit gedit. Reboot your laptop.

Edit 1

Via comments the OP confirms the recommended changes solves the problem. A comment asks "Why isn't this available in GUI?" The logind.conf file is part of systemd which Ubuntu has only recently embraced. Conversion from the old programs to the new programs with full GUI support takes time.

There are GUI's already for Suspending, Hibernating or "Doing nothing" when lid is closed but additional options need to be added for when docked or when plugged into an HDMI monitor.

Suspend was already complicated with Kernel methods (Freeze, Standby and Memory/STR (Save To Ram), ACPI Events, acpid, PM, APM and gnome-settings (sorry for typo's I'm going off memory) and systemd adds another level of complexity for all the Linux programmers out there tips hat


I disabled mouse acceleration on my laptop, but now my mouse speed doesn't change

Try your preferred setting whit this command:

 xinput set-prop 'mouse' 279 0.9

You can change the 0.9 to a value from 0.0 to 1.0 (higher is faster).

After you found your preferred setting, make it permanent by adding the a line like

 Option  "Accel Speed" "0.9"

to the config file you edited before. Place it directly before the line "EndSection".


Why can't some applications be locked to the GNOME Dock?

I managed to add my application to the dash/favorites by clicking "Activities" (top-left corner of screen), then searching for my application and, when it appears, right-clicking it and choosing "Add to favorites".
It didn't work by clicking the icon while the application is already running though.
I was facing this problem also because I was creating the .desktop file in ~/Desktop, but it has to be placed inside ~/.local/share/applications/.
My .desktop file:
$ cat ~/.local/share/applications/MetaTrader\ 5.desktop
[Desktop Entry]
Name=MetaTrader 5
GenericName=Stocks Broker
Comment=Run MetaTrader 5 on this machine
Exec=env WINEPREFIX="~/.PlayOnLinux/wineprefix/metatrader" ~/.PlayOnLinux/wine/linux-amd64/4.0.3/bin/wine64 C:\\\\windows\\\\command\\\\start.exe /Unix ~/.PlayOnLinux/wineprefix/metatrader/dosdevices/c:/users/Public/Desktop/MetaTrader\\ 5.lnk
Icon=A40E_terminal.0
Terminal=false
Type=Application
StartupNotify=true
Path=~/.PlayOnLinux/wineprefix/metatrader/dosdevices/c:/Program Files/MetaTrader 5
StartupWMClass=terminal64.exe

Off-topic, but may be useful: StartupWMClass can be found by executing xprop WM_CLASS, then clicking the application window. This will group windows of the same class together.
My distro:
$ cat /etc/issue
Ubuntu 20.04 LTS \n \l


Can I flash another iso with startup disk creator, besides Ubuntu?

Yes indeed, startup disk creatos is exclusive to Ubuntu and it's flavors and you can neither use unetbootin since it's only for linux distros.

I manage to boot a windows7 install iso using MultiBoot wich installs grub in your USB stick and it's also useful to have various live systems (or a persistent installation if you want).

Main page http://liveusb.info/dotclear/

Instructions to install http://liveusb.info/dotclear/index.php?pages/install

The site is in french buth the commands in the instructions should be easy to follow. you can (1) add the repository and install it from there, (2) download an ISO, (3) download and run a script.

It's pretty easy to use, just drag and drop the ISO. This is the current state of my USB stick:


I do not know which settings you see in the sound controls, but to be sure:

Take a look at the tabs "Playback" and "Output Devices" of pavucontrol.
It could be that "Playback" shows something like you had before, but
"Output Devices" was not changeable from there, and maybe set to a low value.


smbclient cannot connect to Windows Server 2012 R2

I have resolved the issue by fixing ~/.smbcredentials file.
Before, ~/.smbcredentials file content is:

username=TMGRID/AppControlTeam
password=************

I ran sudo mount will cause error message

[acteam@irv-guen] - [~] - [2017-08-04 00:54:59]
[32] sudo mount -vvv -t cifs -o credentials=/home/acteam/.smbcredentials,sec=ntlm //10.2.3.111/Files /media/IRV-GUEN-WINF_Files
mount: fstab path: "/etc/fstab"
mount: mtab path:  "/etc/mtab"
mount: lock path:  "/etc/mtab~"
mount: temp path:  "/etc/mtab.tmp"
mount: UID:        0
mount: eUID:       0
mount: spec:  "//10.2.3.111/Files"
mount: node:  "/media/IRV-GUEN-WINF_Files"
mount: types: "cifs"
mount: opts:  "credentials=/home/acteam/.smbcredentials,sec=ntlm"
mount: external mount: argv[0] = "/sbin/mount.cifs"
mount: external mount: argv[1] = "//10.2.3.111/Files"
mount: external mount: argv[2] = "/media/IRV-GUEN-WINF_Files"
mount: external mount: argv[3] = "-v"
mount: external mount: argv[4] = "-o"
mount: external mount: argv[5] = "rw,credentials=/home/acteam/.smbcredentials,sec=ntlm"
mount.cifs kernel mount options: ip=10.2.3.111,unc=\\10.2.3.111\Files,sec=ntlm,user=TMGRID/AppControlTeam,pass=********
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

The /var/log/syslog is

Aug  4 00:59:03 irv-guen kernel: [50881.183164] Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE
Aug  4 00:59:03 irv-guen kernel: [50881.183171] CIFS VFS: Send error in SessSetup = -13
Aug  4 00:59:03 irv-guen kernel: [50881.183363] CIFS VFS: cifs_mount failed w/return code = -13

After I modified ~/.smbcredentials file content to:

username=AppControlTeam
password=***********
domain=tmgrid.local

and ran sudo mount the result is

[acteam@irv-guen] - [~] - [2017-08-04 00:59:03]
[32] sudo mount -vv -t cifs -o credentials=/home/acteam/.smbcredentials,sec=ntlm //10.2.3.111/Files /media/IRV-GUEN-WINF_Files
domain=tmgrid.local
mount.cifs kernel mount options: ip=10.2.3.111,unc=\\10.2.3.111\Files,sec=ntlm,user=AppControlTeam,,domain=tmgrid.local,pass=********

Now I can browse the mounted Windows Shared Folder

[acteam@irv-guen] - [~] - [2017-08-04 01:02:58]
[0] l /media/IRV-GUEN-WINF_Files
total 8.0K
drwxr-xr-x 2 root root 4.0K Aug  3 02:14 .
drwxr-xr-x 5 root root 4.0K Aug  4 00:53 ..
drwxr-xr-x 2 root root    0 Jul 10 02:11 Archive
drwxr-xr-x 2 root root    0 Jul 27 04:21 ExtractedDirectory
drwxr-xr-x 2 root root    0 Aug  3 02:14 GUEN_Linux
drwxr-xr-x 2 root root    0 Aug  2 06:58 GUEN_QA
drwxr-xr-x 2 root root    0 Jul 10 02:14 PackageDirectory
drwxr-xr-x 2 root root    0 Jul 31 01:46 SamplesForQATesting


Resize Linux swap /Solaris and give main memory more space?

Since your swap partition appears to be located after other partitions you could delete it, resize you Linux partition (GPARTED) and then create a new swap partition. swap is beeing used when you run of of RAM. There was a rule to use 2 times the swap size compared to your RAM, but if you have enough RAM this might not be neccesary.

All about swap: https://www.linux.com/news/all-about-linux-swap-space


It work for me same - sudo apt remove --purge libapache2-mod-php7.2 and then sudo apt install libapache2-mod-php*


Well, I have found a solution to this problem myself.

In Gnome online accounts I have added my GMail account, but I switched everything in that account to off. So there is a GMail account but where is says "Use for": mail, calendar, contacts, chat, documents, photos, printers, I have switched the all off. Now the GMail Notifier extension for Gnome works but GMail is no longer present in Evolution. That is what I wanted.


Is it possible to run a command within a login shell using sudo or su?

You can source the variable file in your script. In your script, include the following line before referencing any of the variables:

source full_path_to_variable_file

This will read your variables into the script's session. You must use the full literal path (no aliases), starting with the root directory'/', so for example if your home directory's .bash_aliases defines your variables:

source /home/felima/.bash_aliases

On the command line '.' has the same effect

. ~/.bash_aliases

But in scripts using 'source' is more clear.


How can I find application using hard drive?


How do I install the latest stable version of Firefox?

The latest version of Firefox is available for as a security updates in all supported releases of Ubuntu, just doing a normal update will pull it in. You need to enable at least one of the security or updates repositories (e. g. via Software & Updates → Updates); security should be enabled by default but it's better to check, especially if the package manager doesn't update Firefox yet.

Usually it's available within a few hours of Mozilla's announcement, sometimes faster, depending on the archive builders, and the speed of your local mirror, etc.

See also:

Firefox New Version - Community Help Wiki
How to install the latest stable version of Thunderbird?


How does Firefox resolve CSS font-family to local font

You have to configure the default fonts used by Firefox in Firefox' own preferences. Open them from the Edit → Preferences menu or by typing about:preferences into the address bar.

You should be able to find a Language and Appearance section under General preferences:

The default font dropdown here specifies what font is used when the website does not specify any font family at all.

If you want to change which fonts are used if only a generic font family like serif, sans-serif or monospace is specified in the website's style sheets, you click on Advanced... to open the dialogue below:

The actual look and layout of these preferences may change depending on your used Firefox version and theme.


Operation times out trying to SSH outside LAN i.e. from internet to LAN no connection is established

What's probably happening is that the SSH service isn't running on all of the network interfaces. Check your /etc/ssh/sshd_config file has this

Port (your port)
#Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0

and that the ListenAddress directive is commented out.


Is there an equivalent to FireShot for Chrome

There are a fair few "Screenshot" extensions for Chrome.

As you said, there is FireShot: Quick Captures and Annotations but that is Windows only.

Another alternative I have found Awesome Screenshot: Capture & Annotate extension which seems to have reasonably high ratings and have similar functions.

FireShot's Chrome page states the following.

  ** Only 32-bit version of Google Chrome is supported**

  Guys, this extension currently works only for Windows platform, please do not post your reviews about unavailability of this extension for other platforms, thank you.

Their website posted this comment which unquestionably says that there will be no Linux support.

  Unfortunately, FireShot is and FireShot will be available only for windows because it's based on binaries of Screenshot Studio, which have been compiled for windows.


How to change python3 from python3.5 to python3.6

Changing the default python3 version might break many things on your system, and I'd advise against making python3 point to python3.6. Better to simply call python3.6 explicitly in those programs where it matters, and leave the python3 symlink as is.


No sound on upgrade (18.04 -> 20.04) only have "dummy output"

after lurking some other threads I was able to fix it by running

sudo apt purge timidity-daemon

The alsa reloads and config changes where of no use.


How do I get the ubuntu OS to recognize my device speakers?

It's possible that you have an issue with the jack. Headphone jack has a switch that cuts out the speakers when headphones are plugged in.Maybe dirty or bent or worn . Might try a bit of spray contact cleaner (only a little).


Most modern EFIs are 64-bit. The main exceptions are some tablets and netbooks, which have 32-bit EFIs. This detail (EFI bit depth) is key because the bit depth is somewhat "locked in" by the bit-depth of the EFI. There are ways around this, though. I know of two, one of which has two sub-options:

Use the Compatibility Support Module (CSM) -- CSM is EFI's tool for supporting older BIOS-mode boot loaders. It sounds like you installed your computer using the CSM. Ordinarily, this is a Bad Idea because it greatly complicates the boot path; however, if you really need to boot a 32-bit OS, it may be the simplest way to do so. The trouble is getting it to co-exist with 64-bit EFI-mode OS installations, since switching between the boot modes (BIOS/CSM/legacy vs. EFI/UEFI) is tricky. I know of two ways to do this:

Use the firmware's boot manager -- This is typically accessed by hitting Esc, Enter, or a function key (usually F8 or higher) early in the boot process. You can then select between named EFI boot loaders and BIOS-mode boots of disks. This is usually an awkward solution.
Use rEFInd -- My rEFInd can switch from its native EFI-mode boot to a BIOS-mode boot. This ability is disabled by default on PCs, though; you must edit refind.conf and uncomment the scanfor option, ensuring that hdbios is among the options. Thereafter, you should see a boot menu option for performing a BIOS-mode boot.

Use GRUB -- GRUB can't switch from EFI-mode to BIOS-mode booting (or vice-versa); but it can load a 32-bit kernel from a 64-bit boot, or vice-versa. Ideally, typing sudo update-grub from the 64-bit, EFI-mode Ubuntu should cause it to detect the 32-bit kernel from your new installation and add it to the menu. If not, you may need to do some manual reconfiguration. Note that this is pretty "bleeding-edge" stuff, so it may not work easily or as you expect. I've never done it myself.

Before ending, I'd like to question why you're trying to boot a 32-bit OS. In most cases, there's no need for this. Even if you depend upon some old 32-bit-only binary, you can usually get it to run in a modern 64-bit Ubuntu via compatibility libraries.

If you really do need to run a 32-bit distribution, it may be better to do so inside a virtual machine (VirtualBox, QEMU, VMware, etc.). This practice will eliminate the need for any boot loader hoop-jumping, and is likely to be a little safer overall (although you've already repartitioned, which is part of the risk).


How do I correctly bump the version number when building a kernel package from git?

Package versions come from the most recent changelog entry. So add a changelog entry, with dch -i. The best way to ensure the version will be lower than the next official upload, is to just append something to the end of the previous version, like +local1.


Is there a maximum value for upstart's kill timeout setting?

The code doesn't specify any. See init/parse_job.c, function parse_kill:

if (! strcmp (arg, "timeout")) {
    nih_local char *timearg = NULL;

    /* Update error position to the timeout value */
    *pos = a_pos;
    if (lineno)
        *lineno = a_lineno;

    timearg = nih_config_next_arg (NULL, file, len,
                       &a_pos, &a_lineno);
    if (! timearg)
        goto finish;

    errno = 0;
    class->kill_timeout = strtol (timearg, &endptr, 10);
    if (errno || *endptr || (class->kill_timeout < 0))
        nih_return_error (-1, PARSE_ILLEGAL_INTERVAL,
                  _(PARSE_ILLEGAL_INTERVAL_STR));
}

Aside from the obvious limit of the max value of long, it seems you can use anything.


Why indicator app not showing when started with root

AFAIK, there is only one feature of psensor which requires root privilege, the disk monitoring using the atasmart library (--use-libatasmart). You can use the hddtemp instead. Do you have a specific reason to use libatasmart?

Eventually, you can change the permission of the disk that you want to monitor to avoid the need of being root, but it will open a security hole...

psensor does not use directly dbus, but the appindicator library does...

It sounds like the issue is at dbus level: https://bugs.launchpad.net/indicator-appmenu/+bug/592842


Installation of i386 Deb(Hangul 2008) into AMD64 architecture; dpkg/library error

Try these commands,

sudo dpkg -i --force-architecture --ignore-depends haansoft-hwp7-plugin_7.5.6.482-4axDT3_i386.deb

sudo dpkg -i --force-architecture --ignore-depends haansoft-common7-gst_7.5.6.536-5axDT3_i386.deb


How to start unity after boot into command line with "text"-option?

The startx command load only the default desktop environment without Unity or other user interface. The startx unity command can do this job, but I do not recommend it. You can test it and you'll see why.

To load with success the X display manager along with Unity from TTY, use next command:

sudo service lightdm start


efibootmgr skipping unreadable variable boot0000 no bootorder is set

Not exactly a fix, but more of a workaround. I deleted the ubuntu entry in the EFI partition and reinstalled focal (20.04) by booting into the "try ubuntu without installing" option and starting ubiquity in the terminal command line with sudo ubiquity -b to NOT install grub. Refind is able to boot Ubuntu without grub.


The applet you are interested in is Indicator Applet Session


Monitoring of Windows RDP farm with nagios

There is a plugin for Nagios that allows it to monitor windows servers running RDP services

http://troels.arvin.dk/code/nagios/check_x224

Its not quite a complete solution but it shows how to do it with other similar data from the RDP server so it should just be case of changing the fields requested