How to add .htaccess code to apache2.conf?

Assuming your .htaccess file is currently located at /var/www/.htaccess then you can literally just combine them. .htaccess and <Directory> containers share the same directory "context" - they follow the same (similar) syntax.
In other words:
<Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted

    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^([^\.]+)$ $1.php [NC,L]
    </IfModule>
</Directory>

However, if you are going to use mod_rewrite directives in a <Directory> container then you should consider disabling .htaccess altogether (ie. AllowOverride None), since .htaccess will override the <Dirctory> container (by default) and your directives will be ignored.
There is no need for the <IfModule> wrapper here since it looks like these directives are mandatory.
A couple of minor points...

There is no need to backslash escape a literal dot when used inside a regex character class, since it carries no special meaning here. ie. [^\.] is the same as [^.].

The NC flag on your RewriteRule directive is superfluous since your pattern already matches both lower and uppercase letters.

You explicitly enable directory indexes (Options Indexes), yet your mod_rewrite directives effectively prevent directory access anyway. You should probably disable directory indexes.

Bringing these points together, this becomes:
<Directory /var/www/>
    Options FollowSymLinks
    AllowOverride None
    Require all granted

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^([^.]+)$ $1.php [L]
</Directory>

An alternative approach, and possibly what @ponsfrilus was suggesting in comments, is to add your mod_rewrite directives directly to the server config (a server context) or <VirtualHost> container (a virtualhost context) - outside of the <Directory> container. (Note that if you are already using <VirtualHost> containers - preferable - then you will likely need to add these directives to the relevant <VirtualHost> container. Otherwise, directives in a server context will probably just get overridden.)
An advantage of this approach is that they can't then be overridden by .htaccess. But if you are disabling .htaccess anyway (which you probably should be - since you are moving these directives to your server config) then it doesn't really matter. Also, using mod_rewirte directives outside of a directory context is arguably "simpler".
However, the syntax of mod_rewrite directives in a server (or virtualhost) context is different to a directory context, so they need to be changed slightly.
Since directives in a server context are processed much earlier, before the request is mapped to the filesystem, you can't simply use the REQUEST_FILENAME server variable to get the requested filename (which ordinarily holds the absolute filename after the request has been mapped to the filesystem). You need to use a lookahead instead. ie. LA-U:REQUEST_FILENAME.
Also, in a server context, the URL-path that the RewriteRule pattern matches against is always a root-relative URL-path, starting with a slash. Whereas in .htaccess (a directory context), the URL-path is less the directory-prefix, so never starts with a slash. In this case, you don't actually need to change anything, but note that what happens is slightly different... in a server context you will end up rewriting to a URL-path, whereas in .htaccess you are essentially rewriting to a filesystem path (unless you've set a RewriteBase directive).
So, alternatively, the above directives could be written as:
RewriteEngine On
RewriteCond %{LA-U:REQUEST_FILENAME} !-f
RewriteRule ^([^.]+)$ $1.php [L]

<Directory /var/www/>
    Options FollowSymLinks
    AllowOverride None
    Require all granted
</Directory>


Now how can I compress the folder again to get my odt file back ?

Zip it. When you enter the unzipped directory you can do

zip -r ../{filename}.odt

where {filename} is the name you want it to be and it will recreate your .odt; hopefully with a smaller size.

Extra comment:

The "mimetype" file should be 1st in the archive (though OO does not care about it other software might). You can force that by doing

zip -r ../{filename}.odt mimetype .


I use btrfs for years now and there are situations in which I can not recommend using it. When losing power or shutting down unctrollably, the risk of irreparable damage is high. When the hard disk is operated in nearly full state, sporadic malfunctions may happen and the displayed free space and the usable space may differ strongly. When juggling with big amounts of snapshots, there are rare situations in which data gets inaccessible. Some mechanisms as the deduplication, filesystem repair and scrubbing are systematcally broken.

All that does not appear too good after so many years of development, and I do not have the impression that the situation will improve. btrfs can be used for special purposes, but under no circumstances I would entrust critical data to it.


Why is my Laptop Brightness reset to minimum after every restart?

You could always try this:

edit /etc/rc.local to insert your preffered value:

sudo gedit /etc/rc.local

and add the following

echo X > /sys/class/backlight/intel_backlight/brightness

replace X by the value of your need


Which is the best method to install/uninstall apps in Ubuntu?

For most users, using the Ubuntu software center would be fine because it provides a simple GUI that allows to install and uninstall apps.  sudo apt-get install and sudo apt-get remove would also be good because they're the only commands in the terminal that don't make normal Ubuntu users feel frustrated.

But for advanced users, they might need to use Synaptic Package Manager because they only want to install or uninstall a specific package, like GTK.

So, for installing and uninstalling software, I would use the Software Center.

I would also use sudo apt-get if I can't install through the software center and sudo apt-get --purge remove to remove the software.  And for advanced removal, use Synaptic.


How to create separate swap partitions for 2 linux distro

SWAP is just an "extension" of the RAM. You dont need SWAP partitions for every distro, you can use the same SWAP space for every distro you have installed on you drive, just map it right in your fstab and thats it!!


Where to get a codec pack for Ubuntu 13.04?

You can install the ubuntu-restricted-extras package either by searching for it in the Software Centre or by running the command...

sudo apt-get install ubuntu-restricted-extras

This package contains a lot of the codecs you would usually need. Also if you try playing a media file that you don't have the codec for then you should get asked if you want to download it automatically.

Another option is to install VLC to play your media files, this doesn't need any extra codec packages installed as they are already built into the player itself.


USB 3.0 drive not working in Kubuntu 12.10

Check if usb 3.0 is enabled in bios.
On my computer (Dell precision) usb 3.0 was disabled by default, then only usb < 3.0 devices worked.


Version 31.2 Gotham is in the Ubuntu Universe repositories:

% apt-cache policy xbmc
xbmc:
  Installed: (none)
  Candidate: 2:13.2+dfsg1-4ubuntu1
  Version table:
     2:13.2+dfsg1-4ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ vivid/universe i386 Packages

Therefore install via

sudo apt-get install xbmc

Check, that universe is active in Software & Updates


No gnome-desktop on the LAPTOP screen after connecting a second monitor(hdmi)

I doubt you've wrecked your BIOS.
If you cannot recognize the USB stick with a fresh Ubuntu ISO image on it, do you have other USB sticks that may have older bootable distros of any kind, or another USB device of any kind that it can recognize?  If so, then it maybe a media or formatting issue that is to blame.
There are other ways to get to Terminal besides the short-cut key. You can try Activities in the upper left corner and search for Terminal... or other programs you might want to run.


Error while KVM installation in Ubuntu 14.04

Too few details. I can guess.
Maybe you are trying to virtualize a 64bit OS within a 32bit host.
And if your host is 32bit, "no more than 2047 MB RAM" can be virtualized as PAE couLd not apply to virtualization.


It might be because of the new UEFI thing that they've introduced in this version.
Open the BIOS and try to find and see if you have UEFI option in there. If you have it, make sure it is disabled. If it is disabled, try to enable it :)


Edimax usb wifi (ew-7811un) not connecting on 17.04

Please check to see if two possibly conflicting drivers are loaded:

lsmod | grep rtl

If you find that both rtl8192cu and rtl8xxxu are loaded, then blacklist one:

sudo -i
echo "blacklist rtl8192cu"  >>  /etc/modprobe.d/blacklist.conf
exit

You will also need a change to Network Manager:

sudo nano /etc/NetworkManager/NetworkManager.conf

Add a new section as follows:

[device]
wifi.scan-rand-mac-address=no

Proofread carefully, save and close the text editor.

After making these changes, reboot and let us hear the result.


How to Solve Overscan issues on Nvidia GX?

You can do this with modelines and /etc/X11/xorg.conf, xrandr and cvt:

Use cvt $X_RES $Y_RES to get the "modeline" [substitute with your resolution]
Use xrandr --newmode output to add the modeline. $output is the output of cvt without the 'Modeline' keyword in front of it. The first parameter after 'Modeline' you could consider the "name" of the modeline. Maybe add a suffix to it to denote that it's using custom values.
xrandr --addmode $name $current_output
run xrandr to find the name of the current output (VGA-1, DP0, or similar)
xrandr --output VGA1 --mode $name

NOTE: This will only last for this session. To make this permanent and also for more details, see here:

https://wiki.archlinux.org/index.php/Xrandr#Adding_undetected_resolutions

In case you have access to a correct EDID, you can also specify this instead of adding modelines manually as I wrote here:
https://wiki.archlinux.org/index.php/NVIDIA_Optimus#Resolution.2C_screen_scan_wrong._EDID_errors_in_Xorg.log

In that case I had access to the EDID via another driver - that's why I had that path.


Stop monitor from going to sleep in ubuntu 19.10

This worked for me:

gsettings set org.gnome.desktop.session idle-delay 0
gsettings set org.gnome.desktop.screensaver lock-enabled false

But maybe someone can confirm if this is the recommended way. I just watch the settings with command below and try something:

gsettings list-recursively


Not showing any bootable options on grub

Insert your windows installation cd on the cd-drive.On startup,enter into the bios and change the boot option to CD drive.

Now your pc boots from the CD drive,install windows over Ubuntu.


Teaching bash to beginners who only used Windows

I wrote a class that you could have a look at for understanding the command line, you can find the pdf files here:

http://doctormo.org/2009/07/15/ubuntu-system-admin-class-command-line-basics/

I cover some nice aspects of understanding bash for beginners, running programs, understanding directories etc. feel free to update, rewrite, draw inspiration from etc.


This is a known and reported bug:

https://bugs.launchpad.net/ubuntu/+source/unity-control-center/+bug/1498664


From this post at Linux Mint Community:

"Gnome isn't extremely compatible with Linux Mint. It works but other operating systems probably work better. Ubuntu 14.04 for example. You can even download a gnome version for it. http://ubuntugnome.org/ Another operating system that is gnome-based is Fedora.
Also, I haven't managed to install extensions other than the ones through terminal below. I'm guessing it is possible but extra complicated than in the original gnome version.
Personally, I've removed gnome again, for now. I liked it, but it just isn't as compatible as I'd want it to be... By the way, when I installed gnome I installed it alongside cinnamon; I did not remove cinnamon."

It is really necessary to install the gnome shell on your Mint build? It seems like the pain is not worth it.


Desktop Shortcut with start in and target properties

So, in the Ubuntu .desktop configuration file, the target is Exec. Start in does not have an equivalent value in Ubuntu .desktop file.  In Windows, the "Start in" field is only valid if the target is a console application or it is command prompt/Powershell. So in Ubuntu, the equivalent of Start In is usually the location of .desktop file.
I hope this is helpful to you and will upvote this post.


Add column from one .csv to another .csv file

With only awk command:

awk -F, '{getline f1 <"file2" ;print f1,$3,$4}' OFS=, file1

Get a line from file1 and store it into local variable f1, then print the line that stored in f1 and finally print the third($3) and forth($3) fields from file1 which delimited with comma , altogether, and change the OFS(output field separator [space by default]) to comma(,).

The short command would be like this:

paste -d, file2 <(cut -d, -f3- file1)

 A,B,C,D
 A,B,C,D
 A,B,C,D
 A,B,C,D

paste the file2, then cut and paste the third column to the next(-f3-) from file1.

With awk and paste (option A)

Below command also copies the last two columns (C,D) from file1 at the end of each line in file2:

paste -d',' file2  <(awk -F',' '{print $(NF-1)","$NF}' file1)

Above command paste the file2 content then print a comma delimiter(-d',') then paste the two last field(NF is the index of last field and $NF is the string which its index is NF. So $(NF-1) is the second field before last field ) from file1 when those index redefines or splits with comma spectator(-F',').

With awk and paste (option B)

This command also is the same as above($3 and $4 points to third and forth field of each line from file1 ):

paste -d',' file2  <(awk -F',' '{print $3","$4}' file1)

Or another solution with cut command:

paste -d, <(cut -d, -f1 file1) <(cut -d, -f2 file2) <(cut -d, -f3- file1)

cut command in above command first cut the first field(-f1 which indexed with comma delimiter(-d.)) from file1(cut -d, -f1 file1), then cut and paste the second field of file2(cut -d, -f2 file2) and finally cut and paste the third column(-f3) to the nexts(-) from file1(cut -d, -f3- file1) again.

This command also returns the same result:

paste -d, <(awk -F',' '{print $1}' file1) <(awk -F',' '{print $2}' file2) <(awk -F',' '{print $3","$4}' file1)

paste the second field from file1(awk -F',' '{print $1}' file1) then print a comma(-d,), then paste the second column from file2(awk -F',' '{print $2}' file2), finally paste the second and last column of file1(awk -F',' '{print $3","$4}' file1) again.


Ubuntu Server installation fails with missing packages

The reason you get a 404 error when trying to browse the link you described, is because you typed the link wrong: you forgot to insert /l/ between /main and /linux-firmware, so it should be: http://archive.ubuntu.com/ubuntu/pool/main/l/linux-firmware/linux-firmware_1.173.16_all.deb

According to your screenshot - your installer tries to connect the US archive (and inserts the correct link).

I also verified the release and package files and directories at the repository, and they all seem to be correct.

So about your connection failure: notice that you can't even connect the server, while a 404 indicates that you got to the server but the requested url was wrong.
That leads me to think that from some reason while installing the OS your internet connection from the guest or the host machine goes down, or getting blocked from some reason.
Ubuntu server install always tries to connect to web to get the latest packages and install the system online by default.
If it managed to connect, the whole install will rely on Ubuntu's online repositories.

Things you can do besides debugging your network: just install the OS from the cd itself (ISO in your case).
Block the web access while installing the OS.

The ISO contains all the needed components for your install, and the installer should use them.
After that, you can connect the web and preform updates.

Edit: I had the time so I quickly downloaded a server 18.04.4 ISO and installed it using the us.ubuntu repo. The installation worked.
My hypervisor was vmware ws 15.


Seems to be this bug: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1724317

The fix is promised to be coming on the next kernel update. Let's hope because I'm having the same problem!


No sound in Ubuntu 13.04, only Dummy output device listed

I had this problem after having an Xorg problem, uninstalling unity and reinstalling xfce. My probablem probably revolved around not adding gconf back and the re-install scripts not adding my user back to the various audio groups. I got sound working after:

sudo apt-get install pulseaudio-module-x11 \
    pulseaudio-module-zeroconf \
    pulseaudio-module-gconf

And also adding my username to audio related groups in /etc/groups:

audio:x:29:pulse,jreynolds
pulse:x:123:jreynolds
pulse-access:x:124:jreynolds

And of course, flushing my various pulse related settings:

pulseaudio -k
sudo alsa force-reload
rm ~/.pulse-cookie
rm -rf ~/.config/pulse
sudo shutdown -r now

When my system rebooted (and I don't know if that was necessary) I ran a check:

pacmd list-sinks

And this displayed my sound cards and not the dummy device!


Extracting a password protected .7z file with 'p7zip' returns an error

There is a known bug/limitation in p7zip, in which it cannot work with password-protected encrypted files (technically by design as a 'lighter' kind of 7zip), and throws the error you've stated here when it tries to work with them.

The correct approach for encrypted/passwords 7z files is to use p7zip-full instead of p7zip, which should then work as it should.


Is x-systemd.automount working as intended?

Is this "duplicate" entry normal?

Yes, it is normal. It is how autofs works (see below).

  Why does the systemd line show autofs and relatime instead of xfs and noatime ?

Again, it is how autofs kernel subsystem works.

At boot time, systemd mounts a pseudo-filesystem autofs on the desired mount point. Its mount options should not and will not correspond to your desired mount options.

When userspace accesses any file below this mountpoint, the Linux kernel pauses the userspace process, notifies systemd (which mounts the real xfs filesystem over the pseudo autofs filesystem as specified in the respective .mount unit) and finally allows userspace to proceed, which then accesses the real filesystem.

  When this drive is unplugged, I can boot but I cannot access any partition besides /! e.g. ls / will work but ls /media/bar and even ls ~ will not (/home is on a separate partition).

Accessing paths below a mountpoint that is supposed to be automounted but can't be (for example, due to a missing drive) will fail. If systemd is not able to mount a real filesystem over the pseudo one, the kernel will return failure to the accessing process.

If /home is not automounted, then I cannot explain /home inaccessibility.


Safest, Easiest Way to Format & Mount Multiple Hard Drives without losing data?

It's a little unclear what you're wanting to do, but I'll have a stab at it.

If you want to keep all your windows files, simplest method is to physically remove the SSD from your system. Now install Ubuntu to whichever drive you choose (1Tb, 3Tb or 4Tb). After you've installed you can put your SSD back into your system.

When you boot into Ubuntu you will still be able to see all your windows files, however if you want to run Windows apps you will need to install WINE in Ubuntu. This can be done through the Software Center or through the command-line (open a Terminal and type sudo apt-get install wine


Is your install persistent? Do the following, If not Persistent leave off the word persistent in the code below.

Go to the root folder of your Live USB
Enter the syslinux directory, (or for UNetbootin the root directory).
Make the syslinux.cfg file writeable
Replace the contents of the file syslinux.cfg with:

Code:

default persistent
label persistent
  say Booting a persistent Ubuntu session...
  kernel /casper/vmlinuz
  append  file=/cdrom/preseed/ubuntu.seed boot=casper persistent initrd=/casper/initrd.lz quiet splash noprompt --

Shutdown, remove CD, reboot.


You can try Emesene or Amsn, because they both should feature emoticons customization. They are both available in the Ubuntu software center.


You can try to run

pactl set-card-profile 0 output:hdmi-stereo

This should set the audio output to HDMI.


What is the difference between scp and cp?

TL;DR Read the man pages:

man scp
man cp

From man scp

NAME
     scp — secure copy (remote file copy program)

SYNOPSIS
     scp [-12346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [-o ssh_option] [-P port] [-S program] [[user@]host1:]file1 ...
         [[user@]host2:]file2

DESCRIPTION
     scp copies files between hosts on a network.  It uses ssh(1) for data transfer, and uses the same authentication and provides the same security
     as ssh(1).  scp will ask for passwords or passphrases if they are needed for authentication.

     File names may contain a user and host specification to indicate that the file is to be copied to/from that host.  Local file names can be made
     explicit using absolute or relative pathnames to avoid scp treating file names containing ‘:’ as host specifiers.  Copies between two remote
     hosts are also permitted.

from man cp

NAME
       cp - copy files and directories

SYNOPSIS
       cp [OPTION]... [-T] SOURCE DEST
       cp [OPTION]... SOURCE... DIRECTORY
       cp [OPTION]... -t DIRECTORY SOURCE...

DESCRIPTION
       Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.

       Mandatory arguments to long options are mandatory for short options too.


This stackoverflow question covers the exact same issue. Their conclusion is that Ubuntu will always prefer its shortcuts. You will need to choose which is more important. If it is the IDE's, you need to disable the Ubuntu shortcut (or map it to a different key combination).


run a time taking task in the server without user logged in dependency

In general when logging into a remote system, I recommend using byobu.  Which is a user-friendly face on tmux/screen.

You can then lose connection to the remote system, and re-attach to running sessions at next login.  Magic!


Is GParted a good tool for resizing an NTFS partition?

gparted is a great partitioning tool - I have used it to resize FAT, NTFS, EXT[2..4] and haven't run into any issues as of yet. However - with all disk operations there is always the possibility of failure and that should always be weighed during resizing.

Make sure you have nothing mounted to the drives you're attempting to resize, ensure that you have ample CPU and RAM to perform the operations. If you're on a Laptop make sure it's plugged in and that it won't suspend or hibernate while performing these operations. Lastly this can be time intensive - my last tip is, while gparted is running it may appear unresponsive or frozen. Just let it finish.


The path appears to be the same in your two statements because $PATH has been expanded within the double quotes before being passed to the su command.

Try it with single quotes and I think you'll be pleasantly surprised:

su wojtek -c 'echo $PATH'

vs

su -l wojtek -c 'echo $PATH'


How to make digiKam remember Google's Two-factor Authentication password?

If you go into your google account's security settings you can setup application specific passwords.

https://www.google.com/settings/security then click on "Authorising applications and sites"

Make one for digikam and then use this password where you would normally use your regular google password.


I keep getting this error when I try running sudo apt-get install nvidia-current

It seems like there is something problem with nvidia drivers.
To solve this I would recommend first to remove the drivers using the command
sudo apt-get purge nvidia*

then try to install the drivers from addtional drivers in software and updates. If you still get the error please let me know :)


Display the contents of an HTML file on my desktop

Life is much easier than that!
Step by step

Use google-chrome in --app mode with wmctrl like so:
google-chrome --app="https://askubuntu.com/" && wmctrl -r :ACTIVE: -b add,below

There you have it... your "widget" is at your desktop... move it, resize it or close it.

To make it transparent, use xprop like so:
xprop -f _NET_WM_WINDOW_OPACITY 32c -set _NET_WM_WINDOW_OPACITY "0xCCFFFFFF"

Then, touch it.

To strip it naked, use xprop again like so:
xprop -f _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS "0x2, 0x0, 0x0, 0x0, 0x0"

Then, touch it again.

All at once

You can do all the above in one step, like so:
google-chrome --disable-gpu --disable-software-rasterizer --app="https://askubuntu.com/" && \
wmctrl -r :ACTIVE: -e 0,0,0,550,800 -b add,below && \
xprop -id "$(xprop -root _NET_ACTIVE_WINDOW | awk '{print $5}')" \
-f _NET_WM_WINDOW_OPACITY 32c -set _NET_WM_WINDOW_OPACITY "0xCCFFFFFF" && \
xprop -id "$(xprop -root _NET_ACTIVE_WINDOW | awk '{print $5}')" \
-f _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS "0x2, 0x0, 0x0, 0x0, 0x0"

-e 0,0,0,550,800 sets window position and size... the last four numbers. See man wmctrl

-set _NET_WM_WINDOW_OPACITY "0xCCFFFFFF" sets the window transparency. Change CC to one of these to change transparency level.


Why doesn't Ubuntu Software return relevant results?

Your search string example means entries with "sticky" or "notes" in it, and probably "notes" is existent in most of the entries.


ubuntu 16.04 freeze during high cpu activity

I had noticed similar behavior, but not (necessarily) tied to high load. My server ran 4.4.0-164 and after a powerloss booted the then-current 4.4.0-166. Then, after some time it would just freeze. No terminal output during the freeze, no dumps etc. After the third time, i booted with 4.4.0-164 and it is currently running for 10 days without any issue.

Maybe try running an older kernel.


Extending my root partition on windows/ubuntu dual boot

Warning: FIRST backup all important files on /dev/sda5
To perform the required tasks, you'll need to have a Ubuntu Live DVD for the same version of Ubuntu that you have installed now.
Before (unallocated and sda4/sda5)

After (sda4/sda5 and swap)

In gparted:

boot to the Ubuntu Live DVD in Try Ubuntu mode

start gparted from the Unity dashboard

make sure that you're viewing the proper hard disk... if you only have one hard disk, it's probably /dev/sda

make sure it's set to align partitions on MiB boundries

note: the following steps may vary slightly and you should stay in contact if there are any difficulties or questions.

info: partitions are moved or resized in two different ways. The easy way is to use the graphic representation and use the hand cursor to drag/move partitions, and grab handles on the left/right sides of partitions to resize. The other way is to enter specific numeric values into the space before and space after entry fields. We'll use both methods here.

in the lower pane of gparted, right-click on sda4 and select move/resize

in the new window that appears, enter a 1 (one) into the space before and the space after numeric fields, then click OK

observe the graphic representation in the upper pane, and confirm that sda4 covers the previous unallocated space, and its original location, and that sda5 still only takes up a small portion of the left side sda4

if it doesn't appear as instructed, then STOP

if it does appear as instructed, click the Apply icon

right-click on sda5 and select move/resize

in the graphic representation, drag the right side of sda5 to the right, leaving 12-16G free space at the right, then click OK

in the bottom pane, right-click on the 12-16G of unallocated space that appears to the right of sda5, and select new logical partition, with a swap file system, sized to consume the entire 12-16G space, then click OK

compare the upper pane with the "After" image that I posted earlier, and if they don't look similar (the yellow portion represents swap), then STOP, if they do look similar click the Apply icon

note the sda representation of the new swap partition, it'll probably be sda6, you'll need that later when you edit /etc/fstab

In Ubuntu:

boot into Ubuntu

In terminal...

edit: type sudo mkswap /dev/sda6 changing sda6 to the sdaX number from the previous step, if required
type sudo blkid and note the UUID of the new swap partition, and copy it to the clipboard
type sudo cp /etc/fstab /etc/fstab.bak # to backup fstab
type gksudo gedit /etc/fstab # to edit fstab
add the following two lines to the end of fstab, changing the UUID to the one noted above, by pasting the clipboard

# swap was on /dev/sda6 during repartition
UUID=071f8b0e-8e16-4f4d-90ff-a4ae9cc56e2b  none  swap  sw  0  0

check your work, save the file, and quit gedit
type sudo swapon -a # to enable swap
type swapon and verify that it shows memory and swap
type reboot

In Windows:

boot into Windows
open the Power control panel
click on change what the power buttons do
click on change options that are unavailable
uncheck fast start
close the Power control panel
open an administrative command prompt window
type powercfg /h off (turns off hibernation)
type chkdsk /f c:
approve that chkdsk runs at next boot time
reboot Windows


Can't enable Ralink RT2561/RT61 wireless card

The Ralink Technology cards, and specifically RT2561/RT61, have compatibility issues with later drivers (developed for later cards).

see: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/665364/

Your best bet is to try blacklisting the later drivers, which will stop them trying to control the card (and failing).  The only other alternative is to compile your own driver.

see: http://ubuntuforums.org/showpost.php?p=10829039&postcount=10

Otherwise: (not good news)

http://ubuntuforums.org/showpost.php?p=9842725

http://ubuntuforums.org/showpost.php?p=10926618

etc.

SUPPORT PAGE:

(Ralink, Linux drivers)

http://ubuntuforums.org/showpost.php?p=10926618&postcount=1


How to get Nautilus to propagate group ownership permissions when mounting with gvfs/sftp

Please take care of the following consideration.

Any new file will use the default umask 022
Any new file will be owned by the creator user and his primary group.
A file modified from SFTP is not modify on the server, but a copy is made in RAM on opening, then the file is overwritten in the save. This is the same than deleting the file then create a new one.

The solution:

There are probably more than one solution, but the easiest way is using ACL. From the server (e.g. by ssh), first check you have the acl command available.

apt install acl

You may have to check that your file system is mounted with ACL (this is the default since a while now). Replace / by the appropriate mount location of your folder.

mount -o remount,acl /

  note : you may need to alter your /etc/fstab to make it permanent.

Finally, you have to change the default ACL of the folder where you want to save your file. Note any new file created in this folder will get this new right.

setfacl -d -m g:group:rwx /your/folder

Replace group by the wanted "group" and "/your/folder" by the folder you will store your file. You may also adapt rwx in case of you don't need executable right (in that case, use only rw).


Why does Apache2 disable DISPLAY environment variable?

Apache does not disable it since Apache does not know a DISPLAY variable. DISPLAY is related to the X Window system.

If you want to set DISPLAY I would use /etc/rc.local. But you must make sure that the command for setting the DISPLAY variable is called before starting the application server.

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.


After some days with this issue and many SO threads read, I found that this seems to be an Ubuntu open Bug (Status 'Incomplete' as of July 2015).

More information about it here: https://bugs.launchpad.net/ubuntu/+bug/1285444

The quick solution seems to be to rename the file that stores dconf settings:

$ mv ~/.config/dconf/user{,.old}


Install mkvtoolnix with sudo apt-get install mkvtoolnix.

Run from terminal: mkvextract tracks <your_mkv_video> <track_numer>:<subtitle_file.srt>

Use mkvinfo to get information about tracks.

Using this utility you can extract any track, even audio or video.


BASH: Given a partial directory name ... how to cd into that directory

You will never be able to change the current path of the underlying session, only the session in which the command runs.However, you can source your script: source script.sh <dir>
read -d '' -r < <( \
find "${1:-.}" -maxdepth 1 -type d -name 'binutil-*' -print0 | sort -rVz) && cd "$REPLY"

Or create a function in .bashrc or .bash_aliases:
cd-binutil(){ # <dir>
    read -d '' -r < <( \
    find "${1:-.}" -maxdepth 1 -type d -name 'binutil-*' -print0 | sort -rVz) && cd "$REPLY"
}

source ~/.bash_aliases will apply the changes to the current session.


How can I copy a directory without copying a specific file or subdirectory in terminal?

In bash, you can use an extended glob to implement negation.

Given

$ tree main_dir
main_dir
├── dir1
│   ├── other file
│   └── somefile
├── dir2
│   ├── other file
│   └── somefile
├── dir3
│   ├── other file
│   └── somefile
└── file

3 directories, 7 files

then

shopt -s extglob
cp -r main_dir/!(dir2) main_dir_copy/

resulting in

$ tree main_dir_copy
main_dir_copy
├── dir1
│   ├── other file
│   └── somefile
├── dir3
│   ├── other file
│   └── somefile
└── file

2 directories, 5 files

Note that since this recursively copies the contents of main_dir (excluding the given dir2) rather than main_dir itself, the target directory main_dir_copy must already exist - if it doesn't, add mkdir main_dir_copy to the command sequence.

See also

How to exclude some files from filename expansion mechanism in bash?
Delete subdirectories leaving a given one


Running J2ME (Java Micro Edition) Applications

You can use MicroEmulator it is a pure Java implementation of Java ME in Java SE. You can find its homepage on Sourceforge.


How to bypass/remove/disable the untrusted package authentication

This is a generic issue for all Ubuntu releases.

Run from a terminal

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

that should throw up the signature that is wrong:

Use the numbers after the NO_PUBKEY to replace XXXXXXXXX  in the following

sudo apt-key adv --recv-key --keyserver keyserver.ubuntu.com XXXXXXXXX

Similar Question:

What is the easiest way to resolve apt-get BADSIG GPG errors?


I had the same issue on a dual monitor system. I was able to recreate it by changing the suggested nvidia video driver (yours may be different) for the suggested updated one. This prevented me from having an extended monitors and I could only mirror mine as well.

I solved this by stepping back to the driver first installed with ubuntu on first load and this fixed the issue. If you remember updating the video drivers to the newest model or newer, this may be the issue.

Please let us know if this solved it. I am new to ubuntu and would love to get my feet wet by actually figuring something out. lol Good luck!


saving screenshots from before OS is installed

I would suggest using a cloud service like Ubuntu One for this! I'm not sure if file sync would work from the live CD, but you could open the Ubuntu One web interface in Firefox and upload your files to it there. If you don't have an Ubuntu One account, you can register for one at https://one.ubuntu.com/ - it's free and already built into the installation of Ubuntu 12.10 you'll have once you're done installing.

Or, if you use another cloud service (Dropbox, Google Drive, etc), Firefox on the Live CD should be able to access those too.

Good luck!


Cannot install Ubuntu along with Windows 8 in Sony Vaio

@user3180373

I had similar issue when I configured the my laptop to dual boot. I used a Live CD. Below are some links that helped configure the system.

DUAL boot issues with windows 8 and Ubuntu 12.04
Dual boot with Windows 8.1 on Toshiba Satellite


issue with graphics on motherboard biostar

With some searching, it looks like that motherboard has integrated VIA S3 UniChrome graphics. Unfortunately, Linux support looks a bit tricky for those cards.

I found a thread here:
http://ubuntuforums.org/showthread.php?t=2184594

And a bug here:
https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-sis/+bug/1066464

That bug is supposedly fixed, so you can give the new Ubuntu a try (14.04), or try the workaround mentioned on that but with your 13.10 installation.


Cannot upgrade to 16.04 after failed attempt

It appears that your upgrade was partially successful except for perhaps the latest kernel.  Since you have now made room in /boot, you can try installing the metapackage linux-generic-lts-xenial which will get you the latest xenial kernel.

If other portions of the upgrade didn't succeed, I do not know how to diagnose that.


What is a good location for a server-like application to save its permanent data?

It depends on what kind of data you're planning to store.

Read-only (Machine independent)-> /usr/share/"your_app"

Read-only (Machine specific) -> /usr/lib/"your_app"

Read-Write -> /var/lib/"your_app"

Please visit Filesystem Hierarchy Standard for more detailed information.


trying to install libncurses dev package for ubuntu 14.04

The package libncurses5-dev is available on base:main repository for Ubuntu 14.04.

So, make sure you have enable main & universe repositories:

  The main component contains applications that are free software, can be freely redistributed and are fully supported by the Ubuntu team. & The universe component is a snapshot of the free, open-source, and Linux world.

If you choose command-line, following command may help you:

sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe"
sudo apt-get update
sudo apt-get install libncurses5-dev

If you face any unmet-dependencies then refer How do I resolve unmet dependencies after adding a PPA?


Why is resume from hibernate not working?

Jhonnytunes,This comes in late, but you will find food for thought and action here. What you experieince seems to be a documented bug. If you find a work-around or (better yet!) a solution, please post it here in extenso.-


Keyboard command/shortcut to resize window

Hold down Alt and press space.

Then press R on your keyboard. You can now use the arrows to resize the window.


Is there any benefit to partioning hdd data-only disk?

One ext4 partition will suffice. You can assign folders within it with differing rights in case you have multiple users.


If you don't have any manually installed drivers like nvidia or wifi drivers, then you can run the following command to update your kernel and headers to the newest version:

sudo apt update
sudo apt install linux-generic

The package linux-generic is a "meta package" which means that the package is only a group of dependency packages. This meta package has the dependencies of the latest kernel version. When you perform an upgrade, this package will install the latest version of both the kernel and the kernel header automatically.

To upgrade (update) your kernel version in the future, you will need to run sudo apt dist-upgrade or sudo apt full upgrade (both of these commands do the same thing) because sudo apt upgrade will not upgrade your kernel.

If you do have manually installed drivers, you will need to reinstall the drivers after you upgrade the kernel.

I found this package using the following command:

apt-cache search linux-generic | grep linux-generic

For more info, run the following command:

apt-cache show linux-generic


Disadvantages of using custom patched kernel

Since you can install multiple kernels at one time, you will be fine when upgrading to Natty.  The upgrader will basically ignore that you have a custom kernel and proceed normally.

As for getting updates, that is up to the maintainer of the custom kernel to put the work in to keep the kernel uptodate.  Typically the goal of a custom patch maintainer is to provide the patch against the latest Ubuntu kernel.  I use tuxonice myself, and they (the tuxonice maintainers) are very good at pushing out updates.

It is generally a good idea to feel free to install whatever custom kernels you want and keep around the standard kernel, just-in-case.


optimizing Ubuntu dualbooting from pendrive (running from RAM and virtual swaps)

0k here is what i did and works wonders:

-1 truecrypt swapping from hdd (didnt do it yet, i will because i need some 10gb swap space later on for some gimp image processing

2 thx to blankreg i used some of his code:

vm.swappiness = 10
vm.vfs_cache_pressure = 50
vm.dirty_writeback_centisecs = 1500

these 3 lines are very useful but the later ones became useless once i implemented the 3rd option, although swappiness(do not set it to 0 as when ram will get full you will need to wait to swap parts of it before running the current program, when set to 10, imagine that the os will leave 10% free ram space for unexpected applications and while running them free some other 10%)

and cache pressure is important as programs can break if the next command to be run is not in memory(setting this value to low will cause data-ram to be ejected to swap when needed and code-ram be constantly present in ram - which is bad because when you are not using firefox for example you dont need the code-ram of it so those rams could be used by the active aplication to store data-ram)

and writeback is useful for the /home directory read writes not overflood the pdrive with lots of small writes, instead use few big writes (NOT SURE) so that the pdrive can be free whenever a read operation need to be performed(you do want firefox not to freze, do you? this is because programs dont need to wait for writes, they just say they want to save this there and then continue on with their business, but when a program reads something, it is waiting (99% of the time) to receive what it wants and in the case of the pdrive it will take more than a few seconds and so firefox freezes)

to implement these commands you need to edit the /etc/sysctl.conf soo run

gksudo gedit /etc/sysctl.conf

in my case the lines were not present(default values were loaded) so i just added these lines, it is possible for you to edit the lines that have these variables (append or overwrite, who cares, just do it)

3 boot to ram,
http://ubuntuforums.org/showthread.php?t=1594694
here is the forum, a great boot to ram script, it creates another os (now you have 2 ubuntus) one is readonly-fast-ram(do not missunderstand readonly, you can read and write in the filesystem whatever you want ie install games and programs, but once reboot or shutdown occurs those files will be lost) other one is readwrite-slow-pdrive
to enable your /home folder to store data between restarts you need to make a partition for "/home", and another for "/"
i noticed that the "/" partition used 2x800mb soo take into consideration how many applications you are going install there
I HAVE NO IDEA if the readonly-fast-ram os can move to swap instead of ram (preferably the hdd swap, making it just as slow as it were installed on the hdd (instead of pdrive which is 10 slower), but as fast as it was installed on a pc from the future) or it will always eat ram

to install the script without reading the forum run

sudo apt-get install git
git clone git://github.com/terminator14/RAM_booster.git
cd /home/UserName/RAM_booster
sudo bash RAM_booster_Ubuntu_12.04.sh

CAFERUL as the above example is for 12.4 version
durring the installation(about 45minutes in my case) you will be asked some question like make the homefolder save data between sessions and making an automatic scheduled operation at midnight (i prefer to update manually, and reading the forum beforehand i already made my /home partition separate)
afterwards your grub will have an extra (new default) option to boot the readonly-fast-ram os, in here IT IS AWESOME! i mean i click firefox and it feels like i didnt release my finger from the button and firefox already pooped(pun intended) open
to save any updates (the simple way) that you have done to the readonly-fast-ram os run

sudo rupdate --both

this operation saves the data inside the ram os to the readwrite-slow-pdrive, and to the readonly-fast-ram container (they are separate, this container is loaded to ram in about 45seconds in my case at bootup)

4 preloader, cant not talk about preloader, preloader is nice because it tries to load all the libraries that can be needed (instead of being needed at that moment in time and then removed) to the ram, but since step 3 already does this it is useless to install preloader if you installed boot to ram, but in case you dont want to install boot to ram then use this code

sudo apt-get install preload

but if you are already here (didnt install boot to ram) think of using blankreg's code to store some temporary files to ram instead of disk (though it wont help a lot, i tried it a few days ago, and firefox froze frequently enough to piss you off when the pc was doing lots of things (i was updating the local dropbox folder + installing some aplications + sufring the net about boot to ram and it still froze every 45 seconds or so, good thing i could read the letter while it was frozen)
i dont recomend using the last line of code, as my ubuntu broke a few times(~4) when running from the pendrive in workspace switcher ie mose was moving, keyboard no efect, nothing on screen was updated clock showed same time for the past 30minutes, and i really wanted to check the crash report

gksudo gedit /etc/fstab

tmpfs   /tmp                tmpfs   defaults,noatime,mode=1777  0  0
tmpfs   /var/tmp            tmpfs   defaults,noatime,mode=1777  0  0
tmpfs   /var/backups            tmpfs   defaults,noatime,mode=1777  0  0
tmpfs   /var/cache/apt/archives/    tmpfs   defaults,noatime        0  0
tmpfs   /var/log            tmpfs   defaults,noatime,mode=0755  0  0


How to change pulseaudio sink with  "pacmd set-default-sink" during playback?

PulseAudio pacmd is not capable of switching the default sinks while there is an actively playing stream to the sink input. However there is a way to still achieve this.
Changing default sink from command line
First we need to determine the index number of the sinks we want to switch. This can be done by calling:
pacmd list-sinks

Depending on our system this will give you a more or less lengthy list of sinks and properties that are at present accessible:
 >>> 2 sink(s) available.
      * index: 0
            name: <alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1>
            driver: <module-alsa-card.c>
    :
    :
        index: 1
            name: <alsa_output.pci-0000_00_14.2.analog-stereo>
            driver: <module-alsa-card.c>

The index or the name given here is what we need for adressing the sink by command line. The present default sink is marked with an asterix (here 0).
To be able to switch the default sinks from command line we may need to disable stream target device restore by editing the corresponing line in /etc/pulse/default.pa to:
load-module module-stream-restore restore_device=false

To change the default output sink to sink 1 we then run
pacmd set-default-sink 1

Sucess can be visualized by opening the Sound Settings menu.
Moving a stream to another sink
Changing the default sink while we have an active input stream playing to a given sink has no effect. This should rather be done by moving this input to another sink.
pacmd list-sink-inputs

will tell us the index of the input stream
>>> 1 sink input(s) available.
    index: 5
    driver: <protocol-native.c>

We now know that we want to move the input stream 5 to sink 1 by calling
pacmd move-sink-input 5 1

or back to sink 0 if we like. This will be done immediately without the need of stopping playback.
Changing default sink while playing
Of course we can combine those two commands to immediately switch default sinks during playback e.g. with
pacmd set-default-sink 1 & pacmd move-sink-input 5 1

A drawback of this method is that the input stream index changes every time we stop and restart the music player. So we always have to find out the current stream index before we can switch using the commmand line.


On the official site of Fenvi, they do not seem to have drivers for Ubuntu. However, when i checked the chipset used in the wireless card, it was Intel® Dual Band Wireless-AC 8265. Intel has provided drivers for linux. Here


How do I sign Ubuntu Code of Conduct with specific OpenPGP key?

Signing the Ubuntu Code of Conduct

The general signing procedure is described in Ubuntu's GnuPG how-to. It boils down to performing a clear-text signature of a text document:

gpg --clearsign UbuntuCodeofConduct-2.0.txt

Selecting a Specific Key for Signing

To sign using a specific key, you need to tell GnuPG which one to use. From man gpg:

   --clearsign
          Make a clear text signature.  The content in a  clear  text
          signature is readable without any special software. OpenPGP
          software is only needed to  verify  the  signature.   Clear
          text signatures may modify end-of-line whitespace for plat-
          form independence and are not intended  to  be  reversible.
          The  key to be used for signing is chosen by default or can
          be set with the --local-user and --default-key options.

   [snip]

   --local-user name
   -u     Use  name  as  the  key to sign with. Note that this option
          overrides --default-key.

The changed clearsign command form above is:

gpg --local-user [key-id] --clearsign UbuntuCodeofConduct-2.0.txt

Setting a Persistent Default Key

This just modifies the behavior for the current call of GnuPG. To set a default key (which can still be overridden using --local-user), set default user [key-id] in ~/.gnupg/gpg.conf instead.


How to save text buffer to file using Python and gtk?

In the first place, consider updating your code to Python 3 and Gtk+3 (PyGObject) as @SylvainPineau suggests. Then, you need to make the GtkTextView an instance property/member so you can access it from within on_saveButton_clicked. Lastly, to actually save the contents of the GtkTextBuffer you can use Python builtin functions or GIO.

With Python builtin functions (and assuming you save the GtkTextView in self.view):

if response == gtk.RESPONSE_OK:
    filename = savechooser.get_filename()
    print(filename, 'selected.')

    buf = self.view.get_buffer()
    text = buf.get_text(buf.get_start_iter(),
                        buf.get_end_iter(),
                        True)
    try:
        open(filename, 'w').write(text)
    except SomeError as err:
        print('Could not save %s: %s' % (filename, err))

PS: I notice you are not using classes, since your on_saveButton_clicked function doesn't have the self argument. If so, for the sake of testing your current code you can make self.view into a TEXT_VIEW global variable.


How can I increase the size of crashkernel/issues when setting up kdump

The file configuration file you're looking for is actually in /etc/default/grub.d/kexec-tools.cfg. Just modify that file and change crashkernel to:

crashkernel=<xxx>M

Then run:

update-grub

And reboot.


Run sudo apt install lubuntu-desktop or sudo apt install ubuntu-desktop. great job man! i use ubuntu-desktop and now it work, i've in login page the possibility to choose between xfce, xubuntu, ubuntu, ubuntu on wayland. just ubuntu work. all fine. do you think that i need anything else to clean my system? thx very much


tomcat7's CATALINA_HOME in Debian/Ubuntu

It is under /usr/share/tomcat7/.

One way to find the location is to look into the service startup script /etc/init.d/tomcat7. You will find these lines in it:

NAME=tomcat7
...
CATALINA_HOME=/usr/share/$NAME


Alacarte creating entries shown in menu but not in editor

When I tried to redo what you did, I got two new desktop files at:

~/.local/share/applications/alacarte-made.desktop
~/.local/share/applications/alacarte-made-1.desktop

Since they are top-level, they do not have any category, it seems.

Alacarte takes the system default from /usr/share/applications and adds from ~/.local/share/applications.

Repairing or deleting installed desktop files is not a commendable approach for a multi-user system, so each user can only modify his/her own view of what's installed.

In case you misconfigured your view, there's a nice Revert button next to Close.


Can't Find the Ubuntu Software Center After upgrade to Ubuntu 18.04

Your commands are wrong for both, it's:

sudo apt-get install software-center*

with an asterisk (*) at the end, and the same with:

sudo apt install gnome-software*

However the store constant crashes and currently won't allow or stay open long enough to install software, it's a broken mess.


If this situation occured after a password change from your user you can use

ecryptfs_rewrap_passphrase ~/.ecryptfs/wrapped-passphrase PREVIOUS_LOGIN_PASSWORD NEW_LOGIN_PASSWORD

to reset the passphrase in the keyring, otherwise you can use

ecryptfs-insert-wrapped-passphrase-into-keyring .ecryptfs/wrapped-passphrase`

to store the passphrase in the keyring.


Use Crontab UI. This is something I made to allow easy and safe management of crontab.

These are some of the features provided by it:

Easy setup
Safe adding, deleting or pausing jobs. Easy to maintain hundreds of jobs.
Backup your crontabs.
Export crontab and deploy on other machines without much hassle.

Read this for more details.


Start a second X session with different resolution and sound

For sound, all you have to do is run ck-launch-session in the script:

#!/bin/sh

X :3 -ac & nvidia-settings --load-config-only
sleep 10 # wait for X to catch up

cd ~/.wine/drive_c/Program\ Files/Steam/
DISPLAY=:3 ck-launch-session
DISPLAY=:3 WINEDEBUG=-all wine "Steam.exe"

Sound from both X displays get merged.


External USB HD doesn't show up on 'sudo fdisk -l' on one Ubuntu, shows up on another (both Ubuntu 12.04 LTS, 'Precise Pangolin')

I believe you are trying to use USB 3.0 port. If yes, you can try connecting to USB 2.0 port on system A and it should work. I had a similar problem. I think it is a bug with the newer kernel.


Proxy and ssl don't walk together. If you wish to filter ssl traffic you must practically do man-in-the-middle attack. Communication will go pc -> ssl1 -> proxy -> ssl2 -> https_site.

Where is ssl1 fake ssl between pc and proxy. in this case ssl2 is true ssl with valid certificates.

In this traffic flow you have unencrypted packets on proxy server and can be read.
This is unsecure.

Also check legal regulation because do proxy on ebanking is crime.


How could I possibly be infected by "s0.2mdn.net" virus?

Any ideas on how to delete this virus, and do not ever face this problem again?

Generic method (in order of less to very destructive):

remove all extensions, and addons you installed in firefox. One by one and check each time if it got removed. Then do not install that extension or addon ever again. If that does not fix it ...
... purge firefox, and check manually through command line all files in /home/$USER (including hidden directories) are clear of anything related to firefox. This will also remove saved passwords, bookmarks unless you saved them to online so they get synched again.
Install firefox again and see if it got removed.
If that does not fix it you got to check all the regular locations for commands that got inserted or settings that got changed. To name a few: crontab, /etc/crobtab, /etc/hosts, /etc/profile,  /etc/network/interfaces all the .bash* files in your home that get sourced. Also check with command top if you can locate an executable responsible for this. If you find any outside your /home/ I would suggest a re-install since that software then will have been given your admin password. All bets are off if that is the case.

And it is not a virus:  2mdn.net  (links to wiki-domains) is the name of a domain owned by google which is used for loading ad content for Doubleclik.com (links to wikipedia) from the google CDN (content delivery network).

So you call it a virus, I call it malware but it basically is considered a service from google by google.

  I use Ubuntu because I believe it's safer, but this was unexpected.

Ubuntu does not stop you from installing software, that includes virusses, malware, rootkits, keyloggers. It is your task to know when to give software your admin accont so it is you that keeps your Ubuntu save from this kind of junk ;)


New build want to install Windows 10 and Ubuntu Dual boot on M.2 drive with Sata HDD for storage

General tip

Maybe the detailed instructions in this link will be helpful for you: Boot Ubuntu from external drive

Detailed answer

  Q.) How do I ensure that this drive is sda?

A.) When booted into the Ubuntu live drive, run the following commands to identify the drives and partitions,

df -h
sudo lsblk -f
sudo lsblk -m
sudo parted -ls

  Q.) Next step fro Oldfred is to:  partition new SSD with gpt and include an ESP, whether That ESP is currently used or not.

  I think this step is covered in more detail here correct?
  UEFI Partitioning for Dummies

A.) Yes, I think so. You can also see this link:

help.ubuntu.com/community/DiskSpace

  Q.) Ubuntu now only needs / (root) and ESP if UEFI. Install of 17.04 or later now use swap file not a swap partition.

  What does he mean Ubuntu now only needs / (root)?
  What does he mean by use a swap file not a swap partition?

A.) You need no swap partition, when you use a swap file (which is automatically selected in most cases in the new versions of Ubuntu). It means that you need only the EFI system partition and the root partition.

  Q.) Do I have to partition (or do anything else) to the data drive as well?

A.) You can select an automatic partitioning method or 'Something else' alias manual partitioning. It is easiest to select the automatic partitioning 'Erase disk and install Ubuntu'.

Edit: But I am not sure what you mean by 'data drive'. A data drive is more or less independent of the operating system, as long as the file systems on the data drive are compatible and can be accessed (read/write).

Please explain in a comment, if you think I misunderstood the question.


Would it work if I put grub2 boot mount on mbr hdd and the rest on gpt on non-UEFI

There shouldn't be an issue.

An installation with /boot/ on an MBR partitioned disk is still a BIOS/MBR installation and the scripts should automatically find and configure the corresponding root filesystem, even if it is on a GPT partitioned disk.


How to show the transfer progress and speed when copying files with cp?

While cp hasn't got this functionality, you can use pv to do this:

pv my_big_file > backup/my_big_file

Note: this method will lose the file's permissions and ownership. Files copied this way will have the same permissions as if you'd created them yourself and will belong to you.

In this example, pv basically just outputs the file to stdout*, which you redirect to a file using the > operator. Simultaneously, it prints information about the progress to the terminal when you do that.

This is what it looks like:

stefano@ubuntu:~/Data$ pv my_big_file > backup/my_big_file
 138MB 0:00:01 [73.3MB/s] [=================================>] 100%

You may need to  Install pv (alternatively, type sudo apt-get install pv) on your system.

*: The technical bit

There are three important streams of data in a unix-like system: stdout (standard output), stderr (standard error) and stdin (standard input). Every program has all three, so to speak. The > redirection operator redirects program output to a file. Without arguments, as you see above, > redirects a program's standard output to a file. cp basically does nothing fancier than

cat source > destination

(where cat just reads a file and prints it to stdout). pv is just like cat, but if you redirect it's output stream somewhere else, it will print progress information to stdout instead.

Take a look at man pv to learn more about it.

Another option, as DoR suggests in this answer, is to use rsync instead:

$ rsync -ah --progress source-file destination-file
sending incremental file list
source-file
        621.22M  57%  283.86MB/s    0:00:01

This will preserve the files permissions/ownership while showing progress.


The package ifupdown and so /etc/network/interfaces are no longer used. Ubuntu 17.10 Server uses the package netplan instead, which configures systemd-networkd.

Make sure you use the default content for the config file /etc/network/interfaces

# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
# Generated by debian-installer.
# The loopback interface
auto lo
iface lo inet loopback

And create this netplan config file for a static IPV4 address (works for me):
/etc/netplan/01-netcfg.yaml.

# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    ens3:
      dhcp4: no
      dhcp6: no
      addresses: [192.168.0.97/24]
      gateway4: 192.168.0.1
      nameservers:
        addresses: [8.8.8.8,8.8.4.4]

Make sure you use the correct network interface name ("ens3" in this example).

Make sure you use the correct DNS servers (nameservers->addresses) for your network environment.

Once this file has been created, run the following commands as root to test & activate the configuration:

sudo netplan --debug generate
sudo netplan apply


Wine starts slowly due to font abundance

The purpose of this answer is to give the full details of the solution of oiaohm mentioned above based on my experience.

Fontconfig is the system-wide font configuration library. See the following man page for explanation on the font configuration customization done below.

man fonts-conf

The idea is to create a custom font configuration and have Wine use it in lieu of the default one. The steps I suggest are as follows:

Find out which fonts are actually required by your Wine programs. A reasonable way to do this is running lsof -p [PID of Wine application] | grep ttf (and ditto with otf) for all Wine applications you use.
Create a custom font configuration directory: mkdir ~/.wine/myfonts
Create a custom font cache directory: mkdir ~/.wine/myfonts-cache
Create a custom font configuration file in the custom font configuration directory. Do so by copying the system's default file: cp /etc/fonts/fonts.conf ~/.wine/myfonts and editing it as follows.

In the font directory list, replace all (or most) <dir> elements by ones pointing to the specific directories of the fonts you need (see Step 1). For instance, put <dir>/usr/share/fonts/truetype/unfonts-core</dir>.
In the font cache directory list, remove all <cachedir> elements and put only your custom font cache directory: <cachedir>~/.wine/myfonts-cache</cachedir>.
Importantly, in both lists remove the elements with the xdg prefix, as those require more steps to customize.

Your custom font configuration file has an <include> element, which, unless changed, contains the value "conf.d". So, create a directory with this name inside your custom font configuration directory, e.g, mkdir ~/.wine/myfonts/conf.d. Then, copy to this directory the additional configuration files residing in the original conf.d directory that are required for the fonts you chose to keep. For example, cp /etc/fonts/conf.d/90-fonts-unfonts-core.conf ~/.wine/myfonts/conf.d.
Environment variable changes: Wine applications should be run with the values of FONTCONFIG_FILE and FONTCONFIG_PATH set to, respectively, your custom font configuration file and custom font configuration directory. For instance, suppose you installed Wine application XYZ. Click the Application Launcher, type XYZ, right click, choose "Edit Application", and in the "Application" tab, change the "Command" field to something like

env FONTCONFIG_FILE="~/.wine/myfonts/fonts.conf" FONTCONFIG_PATH="~/.wine/myfonts" wine C:\\windows\\command\\start.exe /Unix ~/.wine/dosdevices/c:/users/Public/Start\ Menu/Programs/XYZ.lnk

Alternatively, locate the file XYZ.desktop and change it directly. This should be done for every Wine application. Actually, you only need the environment variables to be set like that the first time a Wine application is run after the Wine server loads.
Generate the font cache for your custom font configuration using the same environment variables. For example:

export FONTCONFIG_FILE=~/.wine/myfonts/fonts.conf
export FONTCONFIG_PATH=~/.wine/myfonts
fc-cache -fv

Finally, either reboot or restart the Wine server:

wineserver -k
wineserver -p

One can check the font list actually processed by Wine in the following registry key. Be sure to run regedit with the required environment variables, or after having run another Wine application with them.

  HKEY_CURRENT_USER\Software\Wine\Fonts\Cache


gnome shell menu doesn't load on startup in ubuntu 12.04

All my extensions are disabled and I still have this problem after logging out and then in. I haven't, to my knowledge, changed any drivers. I have been able to go to the tty terminals and type 'gnome-shell --display :0' and that starts the shell. But is not a fix, sorry.


View PDF with "fit to page size" by default

Evince (default PDF viewer) should automatically remember individual display settings for different documents. However, in 10.04, there doesn't appear to be a preference for the default view mode.
In Ubuntu 10.10+ (GNOME 2.30+), Evince has an option on the Edit menu for this: "Save current settings as default".

In that case you would change the zoom to Best Fit and set up all of your display preferences, and then activate that option which would apply to future documents. There are other PDF viewers out there that also do this, but I haven't found any as simple to use as Evince.


How do I check the external hard disk I purchase would support Ubuntu or other linux platforms

I have never seen an external hard disk which is incompatible with Ubuntu. Most external HDD's work "plug & play". The software (or crapware) delivered with the package might not be compatible, but it does not matter.

The software delivered with that external HDD:

encryption software, alternative: LUKS
SmartWare (backup software?), alternative: deja-dup (front-end of duplicity)
In some cases, partitioning software is included, the alternative would be GParted

To get the full power out of it, I recommend formatting the Linux partition ext4 and the Windows one NTFS. You can use GParted for that.

Ubuntu can be booted from external HDD's, you might need to enable booting from USB drives in your BIOS or change the booting order to make the external HDD be booted before the internal one.


Restore Ubuntu-Tweak from recover cd or external HD

OP solved problem:

  I just finished an ugly fix. I used an external drive I use to install Ubuntu. Once I gained access to the files I installed U.T. on it and made some back-ups. Next I copied the broke system's backups and replaced them with the external b-up's, imported the old backups into the install drive, then cp'ed them into the old OS. I just gained access, but have some bugs to work out. I'm sure there's a better way and hoped someone had encountered/fixed it already. Thanks for your reply. I'm sure I'll be back to help if I can and get a little advice.


Don't know how you removed it but run the following commands from terminal to install it again:

echo deb http://debian.koha-community.org/koha stable main | sudo tee /etc/apt/sources.list.d/koha.list
wget -O- http://debian.koha-community.org/koha/gpg.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get upgrade
sudo apt-get clean
sudo apt-get install koha-common

Source:

https://wiki.koha-community.org/wiki/Koha_on_ubuntu_-_packages


How to optimize wifi usb for gaming in Ubuntu 16.04

There are so many things that can cause what you describe. You didn't help your situation with the "Speed up slow wifi connection" blog. But never mind that for now.

I have two quick recommendations out of the blue for you.

in terminal, type sudo iwconfig wlan0 power off. Replace wlan0 with the correct name for your wireless adapter. This will turn off power management for your adapter, and allow it to run full speed all the time.
make sure that your connection is using WPA2-AES. This will assure the fastest connection.

Let us know how you do. Cheers, Al


What is apt. I did some googling and its a command utility. So is it just a piece of software for handling repositories? What is the difference between apt and apt-get?

Advanced packaging tool or apt for short is a tool to manipulate the .deb packages on your system or to be installed on your system. The apt-get is the old name for the new apt command, they are the same command. Then there is aptitude and dpkg that can do the same job and install/manipulate packages. The dpkg being the original tool with apt-get coming next then the aptitude in terms of their development.

There seems to this "Ubuntu software center", which repository is that? Is it like Ubuntu's official repository? Or is it a collection of all the repositories on your computer?

Both it will have all applications available in the repositories contained in your /etc/apt/sources.list and the files contained in the /etc/apt/sources.d/. The directory being a new idea for easily adding a repository without editing the /etc/apt/sources.list file. And it is where they prefer you install it from, their "official" place for installation of software.

How do you search for a package without using the Ubuntu software center (if it's even possible)?

In the Terminal application apt-cache search package_name will do a search of the cache for your package. Want to see the version to be installed apt-cache policy package_name will show you the version installed if any, the versions available, the repository it comes from and if any newer version is available.

When you use apt for installing packages from a third party repository, it doesn't seem like you need to specify which repository. Thus it seems like when you add a repository, it all gets added to this one big abstract repository. Won't that cause name conflicts?

No there are strict naming practices for packages designed to avoid this conflict , in addition they have version number added onto to the to further allow packages to co-exist. When a repository is added you must make certain it is made for the version of the OS it runs on.
deb http://deb.debian.org/debian buster main contrib non-free

Above is a line for Debian Buster it shows you the repository in the name, it could be stable too as that is the status of Buster until the next release in a month or two. When new stable is released the distribution would be updated if you had stable for your line and not Buster.

When you want to add a repository, it seems that you can do something like this, sudo add-apt-repository ppa:webupd8team/java How does apt locate that repository? There doesn't seem to be a URL of any sort.

I have no clue on how Ubuntu's system for that works I just use it when necessary and am too lazy to edit the file myself.


unexplainable kernel upgrade to 3.5.x in 12.04?

Kernel 3.5.x is the default kernel for installs of v12.04.2 version of Ubuntu.  This is logically the only way you could have this kernel series unless someone manually installed this kernel as part of the hardware-enablement-stack (explained below) - you cannot via a normal sudo apt-get update etc.

This is explained in the release notes

  In an effort to support a wider variety of hardware on an existing LTS
  release, the 12.04.2 point release will ship with an updated kernel
  and X stack by default. This newer hardware enablement stack will be
  comprised of the kernel and X stack from the Quantal 12.10 release.

The readme continues to explain if you want to stick with the default 3.2.x series:

  Install from a previous 12.04.0 or 12.04.1 point release and update.
  The previous 12.04.0 and 12.04.1 releases are archived at
  http://old-releases.ubuntu.com/ Perform an update or upgrade to
  Precise from a previous Ubuntu release. Only those installing from the
  12.04.2 media will automatically receive a newer hardware enablement stack by default.

  Perform a network install using the netboot images rather than the new
  quantal-netboot images.

Note - the current version of Ubuntu is 12.04.3 - this comes with the 3.8 kernel series (i.e. the raring kernel).

Naturally, this being Ask Ubuntu - we have great questions that explain how to uplift your older Ubuntu installs to newer kernels:

-How to upgrade 12.04.2 kernel and HWE to raring?

The answer is equally applicable to older ubuntu versions.

You should be aware, you dont need to install the newer kernels - the older 3.2.x series is supported for the full 5 year support period.

This is explained also in the community wiki about the hardware-enablement-stack

Linked Question:

What is hardware enablement (HWE)?


Did you mean a 160GB SSD drive?  16GB probably won't be big enough for both Windows 10 and Ubuntu.

If it is 160GB, then just download and burn the Ubuntu 14.04 iso to a DVD, and tell it to install alongside your Windows 10 OS.


Cause of the issue

The default configuration for logging in as root user in MySQL 5.7 requires use of an authentication socket. This can be verified via querying the user table:

mysql> select user,authentication_string,plugin from user where user='root';
+------+-----------------------+-------------+
| user | authentication_string | plugin      |
+------+-----------------------+-------------+
| root |                       | auth_socket |
+------+-----------------------+-------------+
1 row in set (0.00 sec)

From the documentation:

  The socket plugin checks whether the socket user name (the operating
  system user name) matches the MySQL user name specified by the client
  program to the server. If the names do not match, the plugin checks
  whether the socket user name matches the name specified in the
  authentication_string column of the mysql.user system table row. If a
  match is found, the plugin permits the connection.

In other words, mysql by default doesn't have root password set - you need to either run phpMyAdmin as root or via sudo (both of which are bad idea for security reasons), or you change the authentication method and reset the root password as shown in Digital Ocean tutorial.

Note that aside from same name, MySQL users and system users are not the same. You can have a MySQL user jdoe and have no such user on the host system. Thus, root is MySQL's root user, not system user.

Steps to change plugin and password:

open terminal and run sudo mysql -u root. You should see a greeting message and mysql> prompt. This is the MySQL shell, which is different from your command-line shell, so only SQL statements are accepted here.
Enter the following sequence of SQL queries:

mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql>  UPDATE user SET plugin='mysql_native_password',authentication_string=PASSWORD('newpassword') WHERE user = 'root';
Query OK, 1 row affected, 1 warning (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 1

Exit and attempt to sign in:

 mysql> exit
Bye

$ sudo systemctl restart mysql
$ sudo mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.7.21-1 (Debian)

Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

If everything goes well, you should be able to sign in from phpMyAdmin via the new password. If something goes wrong, attempt to restart the server without permission checking (that's step num. 3 in the Digital Ocean tutorial). For other issues, feel free to ask another question here or on Database Administrators - Stack Exchange


As the 3.8 kernel is originally from Raring (13.04), you should try installing linux-headers-generic-lts-raring, which will pull in the latest headers. In short:

sudo apt-get install linux-headers-generic-lts-raring


Why is a group writable directory considered unsafe?

From the manual of sendmail/Majordomo:

2.4.1. Consequences of Unsafe Group Writes
If a user has write permission to access an aliases file, she should be a trusted user. By putting an entry into the aliases file (such as the one used to execute wrapper) a user can execute any program with the privileges of Sendmail (daemon or, in older versions, root). This gaffe would allow people to remove or change the permissions of files that belong to daemon (using the rm or chmod commands in the aliases file). To some extent, this possibility is avoided by using smrsh; however, one must still be careful as to what files are in the /etc/smrsh/ directory.
Another important security issue is that the user who can access the aliases file can append or write to files that belong to daemon by using file redirection (a >> or > instead of a |). Even so, this breach too can be countered by adding a line to the sendmail.cf file limiting what files can be written to through the aliases file.

<..>

In the case of include or .forward files, commands or redirections are run as the user who owns the file. Therefore, if a file is group writable, a member of the group can execute commands as the user who owns the file. In other words, any user in the group could execute commands as that user. However, since the user is created without a shell, commands or redirections will not be processed in include files owned by that user.
4.2. Consequences of Unsafe Group Writable Directory Paths
If a user has group write permission to a directory, for example /etc/, the user could simply move any file and create a new one in its place. An attack might go something like this

[user@system etc]$ mv aliases ...
[user@system etc]$ vi aliases

The user can then make her own aliases! This attack, however, could be prevented by Sendmail's security checking for unsafe group writable paths. Such an attack also would work with include and .forward files having unsafe paths.

Source.
This manual explains it pretty well and the same logic applies to many other pieces of software: mind that you are using a multi-user system even though you might be the sole user of that system. And on a multi-user system a user needs to be protected from other users.


Delete the hardy lines. They're not needed. You already have modern precise versions of the -security repo so there's nothing else to do.

And yes, this should be perfectly safe. The repos are already not doing anything (they're 404ing so aren't contributing to the current available package list) and even if they were working, all its packages should have been superseded by more modern packages in precise-security.

I'd be curious to know how you ended up with hardy repos in your sources. Looks like you installed at Oneiric so this isn't a hangover from an original install… Very odd.


Display settings changes automatically with dual monitors in 12.04 and 12.10 AMD

I had some problems with dual monitors as well in Ubuntu 12.04.
It turned out that my graphics card did not support 3D acceleration features and after deactivating any proprietary drivers and using unity2D instead of regular unity, the monitors are working without any problems.


How can I track a bug that caused a crash and was reported via apport / whoopsie?

Thanks for your interest in the Ubuntu error tracker project.

As of Precise 12.04, this behavior and workflow changed. As I discovered in Bug #993450 “Apport fails to submit bug report”, by default apport no longer opens a bug report (and it is awkward but not impossible to get it to do so).

Apport never created bug reports post-release. When a release is still in development you can use apport to file Launchpad bugs (and error reports).
In a final released version of Ubuntu we now show error dialogs. This is a great improvement from a program "going away" without any feedback and the user being left wondering what just happened.
The statistics from the data collected when people choose to send these reports show up on http://errors.ubuntu.com.

I'm left with this question: how does a user learn what the status of the problem is? The blueprint now has this requirement

The user should have some way to check back on the status of their crash report; e.g. have some report ID they can look at to see statistics and/or any associated bug #. E.g. provide a serial number at time of filing that they can load via a web page later on.

I'm going to remove that. That was never the intent. The user interface is careful not to make promises about getting any feedback on the report.
These are not bug reports.
Our intent is to reduce the amount of time it takes for developers to find the most pressing issues, collect the needed information to fix them, and get the fixes to users.
We've solved the problem of finding the most pressing issues. That's the front page of http://errors.ubuntu.com.
Collecting the needed information quickly, and without involving a long feedback loop with users who are experiencing the problem is addressed in foundations-q-bucketing-improvements. The plan is to allow developers to hook into the information collection process server-side. If I need /var/log/syslog but it's not already provided, I just change a setting on http://errors.ubuntu.com and the next person who experiences the error automatically adds it to the data they're sending.
Getting fixes to users quickly is addressed in foundations-q-updates-from-crash-reports. When users submit an error report and that error has already been fixed and released, a dialog will come up asking if they would like to upgrade to the version of the software which fixes the problem they just experienced.

And how does a developer get into the game? Going to https://daisy.ubuntu.com just provides an "Incorrect Content-Type" error message.

http://daisy.ubuntu.com is not intended to be used by humans. It's there for the error reporting daemon (whoopsie) to send reports to.
It would be absolutely wonderful for other people to get involved. I'm currently the only one hacking on this full-time.
There are four parts to the system.

Apport, which provides the desktop user interface.
Whoopsie, which takes reports (and core dumps) created by Apport and shovels them into the error tracker server, Daisy.
Daisy, which collects reports from Whoopsie and processes them. This is the heart of the service. It's what turns the core files into retraced reports and generates the statistics you see on http://errors.ubuntu.com.
Errors, which is a Django-based website providing both a human readable view of the data and a RESTful API for working with it.

There is a slightly out-of-date set of scripts under the setup/ directory in lp:daisy that should give you some idea of how the pieces fit together. I've been working on juju charms to replace this. The goal is a single command to deploy the entire infrastructure in the cloud for testing and development.
You can find my email address on Launchpad if you have further development questions.
More info:

What is the 'whoopsie' process and how can I remove it?
https://www.youtube.com/watch?v=PPQ7k0jRUE4#t=30m10s


Kernel updates don't install some packages on Ubuntu 20.04

These packages are dependencies of linux-image-generic-hwe-20.04 and linux-headers-generic-hwe-20.04 meta packages.
It is hard to tell why they are not installed, but you can fix the issue by running
sudo apt install linux-generic-hwe-20.04

It should install both meta packages.


How to extract details from an mp3 file?

Did you read man mp3info? It says, in part:

     -p "FORMAT_STRING"

          Print MP3 attributes according to FORMAT_STRING.  FORMAT_STRING is similar to a printf(3) format string in that it is printed verbatim except  for  the
          following conversions and escape sequences. Any conversion specifier may optionally include the various alignment, precision, and field width modifiers
          accepted by printf(3).  See the EXAMPLES section below for examples of how format strings are used in mp3info.

          Conversion Specifiers

             %f     Filename without the path [string]
             %F     Filename with the path [string]
             %k     File size in KB [integer]
             %a     Artist [string]
             %c     Comment [string]
             %g     Musical genre [string]
             %G     Musical genre number [integer]
             %l     Album name [string]
             %n     Track [integer]
             %t     Track Title [string]
             %y     Year [string]
             %C     Copyright flag [string]
             %e     Emphasis [string]
             %E     CRC Error protection [string]
             %L     MPEG Layer [string]
             %O     Original material flag [string]
             %o     Stereo/mono mode [string]
             %p     Padding [string]
             %v     MPEG Version [float]
             %u     Number of good audio frames [integer]
             %b     Number of corrupt audio frames [integer]
             %Q     Sampling frequency in Hz [integer]
             %q     Sampling frequency in kHz [integer]
             %r     Bit Rate in kbps (type and meaning affected by -r option)
             %m     Playing time: minutes only [integer]
             %s     Playing time: seconds only [integer] (usually used in conjunction with %m)
             %S     Total playing time in seconds [integer]
             %%     A single percent sign


dpkg -l miktex will return if MiKTeX is installed. To wipe MiKTeX : MiKTeX Console -> Cleanup -> Reset the TeX installation, then

sudo apt-get remove miktex
sudo apt autoremove

To install TeXLive on 18.04, you can install one of

texlive-base
texlive-latex-recommended
texlive
texlive-latex-extra
texlive-full

The first package texlive-base will install just the basics of LaTeX. texlive or texlive-latex-extra will suit the majority of users. Go with texlive-full if you have plenty of space and don't mind nonessential packages.

sudo apt-get update
sudo apt-get install texlive-full


Error in installing Ubuntu 16.04 on Dell Optiplex 745

Your downloaded Ubuntu 16.04 may be corrupted.

Did you check the hash of your ISO? Here's a list of them (MD5SUM):

0d9fe8e1ea408a5895cbbe3431989295 *ubuntu-16.04.3-desktop-amd64.iso
75a7782576b1cf6fde2aa242df9e4c05 *ubuntu-16.04.3-desktop-i386.iso
10fcd20619dce11fe094e960c85ba4a9 *ubuntu-16.04.3-server-amd64.img
10fcd20619dce11fe094e960c85ba4a9 *ubuntu-16.04.3-server-amd64.iso
8428cead4ee139873da19248590e354f *ubuntu-16.04.3-server-i386.img
8428cead4ee139873da19248590e354f *ubuntu-16.04.3-server-i386.iso

If your MD5SUM is incorrect, redownload your Ubuntu ISO.

And of course, you can redownload the ISO without checking the hash sum, recreate your live USB and boot the live USB again to see if the problem persists.


Releasing a package from being held back

As OP found out themselves

sudo update-alterantives --config gcc

allowed them to choose a different default gcc version.


Ubuntu 17.10 64bit won't mount Samsung Galaxy A3 any more

OK, i got it now... There 2 use cases. One is working, the other not.

Case 1) (working)

Unlock the phone
Plug the USB cable into the phone
Click the button "Allow access to the phone data" in the popup window
Access the phone data with files

Case 2) (not working)

Plug the USB cable into the phone
Unlock the phone
Click the button "Allow access to phone data" in the popup window
You cannot access to the phone data

The problem is the order of the first 2 operations.

Hoping this post helps...


How to run a script that is in mutiple directories

Make sure all your scrips are executable.
Make one new script in which you can execute your other scripts, let's call it backup_all.sh and save it in the dictionary /home/jeff/:

#!/bin/bash
./Database/Tellico/MyBoooks/Software-Backup.sh
./Database/Tellico/Tellico-MyHardware/MyHardware-Backup.sh
./Database/Tellico/Tellico-MySubscriptions/MySubscriptionstc-Backup.sh

chmod +x backup_all.sh
Backup everything by running ./backup_all.sh from the dictionary where you saved it (/home/jeff/).

Another option might be to make all your files executable from anywhere.

A fun feature might be to add the command ./backup_all.sh a shortkey in Settings. Then you could just press alt+B for example to backup everything.


How to compile & install Compiz Blur plugin?

Compiz blur plugin has been discontinued, and it never arrived for latest version of Compiz. If you really need the blur plug-in, you have to downgrade to Compiz 0.8.4 stable version. Please be aware of the facts:

If you downgrade you will no longer be able to use Ubuntu's Unity Desktop, as it requires Compiz 0.9 to work. Therefore you will have to change your desktop environment to something else like gnome-flashback-session or MATE desktop
When you successfully install Compiz 0.8.4, you will have no tools to tweak it. The compatible version of Compiz Config Settings Manager for Compiz 0.8.4 does not work in recent versions of Ubuntu as it has conflicts with Python versions. (Which is beyond the scoop of this question) Therefore you will have to deal with the conflict manually or use something like gconf-editor to tweak Compiz after the installation.

NOTE: Downgrading is not generally recommended as the newer version is considered to be superior to the old versions. DO NOT CONTINUE IF YOU ARE AN INEXPERIENCED UBUNTU USER.
Downgrading to Compiz 0.8.4

Instead of compiling from the source, we will be installing Compiz 0.8.4 from packages.
Before proceeding further make sure you are on a desktop environment which does not use Compiz.
First remove the existing compiz installation:

sudo apt-get remove --purge compiz*

Open your terminal and execute:

sudo echo "deb http://http.debian.net/debian squeeze main universe contrib" >> /etc/apt/sources.list

Then update the sources:

sudo apt-get update

Then install Compiz 0.8.4 series:

sudo apt-get install compiz-core=0.8.4-4 compiz=0.8.4-4 compiz-fusion-plugins-extra=0.8.4-2 compiz-fusion-plugins-main=0.8.4-2+b1 compiz-gnome=0.8.4-4 compiz-plugins=0.8.4-4

After the installation run:

compiz --replace

Uninstallation

sudo apt-get remove --purge compiz*
sudo apt-get install ubuntu-desktop

In case you get broken packages, execute:

sudo apt-get install -f


Solution to slow transfer of files from PC to USB

Now that you mention it: No one ever asked what the solution to the slow USB speed is.  Everyone just wants to know why...

Solution:
Don't buy don't buy SLC USB sticks, buy MLC ones!

Why?
SLC USB sticks are cheap and you get what you pay for: MLC ones are 2-8 times faster (depending on the technology of your original SLC), last 2-8 times longer (again: compared you your Crap Inc Ⓡ Mega! Hyper! USB stick)  However, they're 2-3 times more expensive and are generally not on stock if you walk into any random corner-store.

Basically: these are mini-SSD drives in a USB form factor.


Microsoft Office 2010 on PlayonLinux has incorrect icon when executing

If you run xprop WM_CLASS in Terminal the mouse pointer will change into a crosshair. Place the crosshair over an open Exel window and click.

You'll probably get an output like

WM_CLASS(STRING) = "excel.exe", "Wine"

Open the .desktop file associated with Excel and add (or modify) a

StartupWMClass=excel.exe

line using the WM_CLASS(STRING) value for Excel (case sensitive) to the .desktop file.


Some applications use "archaic" character instead of modern Japanese one

It just looks like your window title font uses an older font.  All you need to do is goto System -> Appearance -> Fonts and change your Window Title Font to the same ones as your actual application font.

You may also associate your prettier kanji font as a family of your current windows title font alias in fonts.conf under /etc/fonts/fonts.conf

eg.

<alias>
        <family>sans-serif</family>
        <prefer>
                <family>Ubuntu</family>
                <family>Your Japanese Font</family>
                  .....
                <the rest of previous defined family fonts>
        </prefer>
</alias>

This way font system will default to your preferred Kanji font when the code page is missing in your original font.

By the way, that's not century old character, it's just a font type.  It's like saying using Times New Roman is wrong because it's used in Roman times and centuries old.  The 社 character can be written with both 示 or ⺭ on the side.  All you need to change it is use another font, and that's the way it is in the rest of CJK languages as well.

Same page on my computer, which uses English US as default locale (even though I am Taiwanese).  Using the one kind of Kanji font that shows it the way you want:

Easily changed to the way you don't want by changing the font for Windows Title: