Why is the cache in my memory always full?

Caching data is RAM is supposed to make things faster, not slower - fetching things repeatedly from disk when you have unused memory is just silly. If you're spilling into swap space though, that will hit performance. You can easily tell if you're using any swap by running System Monitor. If the swap-space graph isn't climbing at the time the problem starts, then the problem isn't memory related.

Certainly, when you stream video it will get cached in memory, but it takes quite a lot of video to fill 6Gb! I'd expect it to take more than just a few minutes to download that much data, and much more to cause a problem!

Are you sure something else isn't the problem? Say, cooling perhaps? Many notebooks have processors that are overspeced compared to the cooling system. This is good - it gives high peak performance, good for bursty traffic, while keeping the bulk down - but it can't keep up the performance for long before it is forced to dial back the clock rate or melt. Video can be fairly processor intensive, so you never know?

Anyway, you should be able to see from the memory usage whether it's swapping or not. If it is, then that's a software problem, and those can be fixed. :)


Change shell script file access permissions (chmod) from itself

It is possible, so let's start a simple test:

% cat foo
#!/usr/bin/env bash
chmod 777 foo

% chmod 555 foo

% ls -laog foo
-r-xr-xr-x 1 34 Nov  4 12:58 foo

% ./foo

% ls -laog foo
-rwxrwxrwx 1 34 Nov  4 12:58 foo


Google Music Manager - error while installing

The warning message is actually telling you what Ubuntu think is wrong with the package. Google installs a script and not a config file into /etc/, which is against best practice (or otherwise you wouldn't get a warning message).

What this specific script is doing is checking whether the Google's repository has been disabled by upgrading between releases and if so re-enables it (this is based on very basic skimming of the code of the script /etc/cron.daily/google-musicmanager).

It installs fine and the permission of the script are also set correctly, so you can probably just ignore the warning message as long as you are okay with the fact that Google adds a repository for the google-music-manager and runs said script every day once. And you are trusting Google anyway or otherwise you wouldn't be installing their binaries.


If you want to get rid of it you could alter the file
/boot/grub/grub.cfg
look for the timeout fields
if [ "${recordfail}" = 1 ] ; then
  set timeout=30
and alter yours to 0
I had the opposite problem and had to alter the following two exception clauses from timeout=0 to timeout=10 otherwise I would not see that grub menu.
shorter answer: just press the enter key to continue booting.
note too that any update-grub will put back in the default grub.cfg, so you will need to do it again.


How to get Scilab 6.1.0 working on Ubuntu 20.04 LTS?

It is known that Scilab is working normally in the Ubuntu 20.10, so one can download packages from it and install into the 20.04 LTS system:

mkdir -p ~/Downloads/scilab
cd ~/Downloads/scilab

wget -c http://archive.ubuntu.com/ubuntu/pool/universe/s/scilab/scilab-cli_6.1.0+dfsg1-6build2_all.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/s/scilab/scilab-data_6.1.0+dfsg1-6build2_all.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/s/scilab/scilab-doc-fr_6.1.0+dfsg1-6build2_all.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/s/scilab/scilab-doc-ja_6.1.0+dfsg1-6build2_all.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/s/scilab/scilab-doc-pt-br_6.1.0+dfsg1-6build2_all.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/s/scilab/scilab-doc_6.1.0+dfsg1-6build2_all.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/s/scilab/scilab-full-bin_6.1.0+dfsg1-6build2_amd64.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/s/scilab/scilab-include_6.1.0+dfsg1-6build2_amd64.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/s/scilab/scilab-minimal-bin_6.1.0+dfsg1-6build2_amd64.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/s/scilab/scilab-test_6.1.0+dfsg1-6build2_all.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/s/scilab/scilab_6.1.0+dfsg1-6build2_all.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/h/hdf5/libhdf5-103-1_1.10.6+repack-2_amd64.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/h/hdf5/libhdf5-hl-100_1.10.6+repack-2_amd64.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/libm/libmatio/libmatio9_1.5.17-5_amd64.deb

sudo apt-get install ./lib*.deb
sudo apt-get install ./scilab*.deb

But anyway it is strange method, and the Scilab packages should be fixed on the repository level by its maintainers.


Kubuntu 20.04.1 fails to boot after dist-upgrade

I managed to sidestep this problem by manually executing
update-initramfs -u

after dist-upgrade.
UPDATE:
Ok, I've found the hidden variable. Each time update-initramfs was called automatically after new kernel installation, I had an external filesystem mounted somewhere (for irrelevant reasons). This filesystem happened to contain liblzma.so.5 of it's own. Using lsinitramfs | grep lzma I managed to spot that automatically generated initrd actually contained the missing library, but it was copied to the path mirroring the path of the library from the mount. I.e. instead of /usr/lib/x86_64-linux-gnu/liblzma.so.5 initrd contains /mnt/test/liblzma.so.5. I tried to mount the external filesystem to other locations (e.g. /root/mnt, /media/root/mnt) but yet to find the place where it won't break initrd generation.
For the time being I just unmount the external filesystem before manually regenerating initrd. I have no idea why update-initramfs is behaving this way and if it is an intended behavior so any clarification are still highly welcome.


Not enough free disk space when trying to update 14.04

Follow these instructions to clear space:

Not enough free disk space when upgrading

I find the ubuntu-tweak method works well.


Okay so the problem was that I used a custom 4.4 kernel that I needed because the touchpad on my laptop wasn't working. The issue is described in this kernel bugzilla thread.

The required changes were included in the 4.5 version of the Linux Kernel which I am running now. The moment I changed from the custom kernel to the mainline kernel, wine started to work without a problem. I then also tested with an official 4.4 mainline kernel and wine worked with that one as well. So I am pretty certain that the custom kernel was the cause of the issue, although I can't really explain how.

Hope this might help someone with similar issues.


How to control internet access for each program?

NOTE: Douane is no longer actively developed and is reported to not work in later Ubuntu versions.  This solution may not work, but the answer is kept as is for historical reasons.

In case you're still looking for this kind of application, I am currently developing exactly that application: http://douaneapp.com/ https://gitlab.com/douaneapp/Douane
My application blocks any unknown applications (new versions of an authorized application are blocked) and asks you if you Allow or Deny its traffic.
Have a look at the website ;-)


Transfer "BackinTime" saves from old PC to new one

That's one of the biggest advantage of BackInTime! You can access the snapshots from everywhere. Even without BackInTime because they are just normal files which you can browse with every file browser.

But you can also install BackInTime on your new PC and just copy over the config file ~/.config/backintime/config or reconfigure everything in the same way like on your old machine.

You will have to uncheck Auto Host/User/ProfileID in Settings > General Tab and change Host and maybe User to match the name and user of your old PC. After that is done all your snapshots should show up in BackInTime again.

Disclaimer: I'm member of BIT-Dev Team


dumpe2fs is specific to the ext2/ext3/ext4 family of file systems, so if you use something else, then that would complain in exactly the way described that this is not an Extended file system.

If it is one of the ext family, then running fsck will clean this up nicely, as ext stores multiple copies of the superblock in different spots of the disk, and fsck would just use another one and restore the one in the beginning.

If it is a different file system, fsck still has a good chance of working, although a lot of the newer file systems are not that resilient anymore.

Last but not least, check that the device names are the same when booting from a live stick -- it is quite likely that the USB stick as the boot device is now the first one found, so it is named sda, and the harddisk is now named sdb. Use fdisk to look at the partition table, whether it matches what you expect, especially the size of the disk and the partitions.


NVidia Optimus: how to disable onboard Intel GPU so that NVidia drivers work - other than in BIOS

If you don't have the option to switch GPUs in the BIOS then it's quite likely you have a muxless laptop, where the Nvidia GPU doesn't have direct access to the internal laptop display, and where it wouldn't make sense to switch off the Intel GPU.

Apart from the BIOS, there is a the vga_switcheroo command, which allows one to change which GPU acts as the primary GPU, but this command doesn't work on muxless laptops either -- you're not missing much though, it's tricky to use, and only works on a very limited set of hardware anyway.

It's not that dire though, as you have three options available to you:

Bumblebee (Nvidia)
Nvidia Prime (Nvidia)
Optimus Prime (Nouveau / Proper Linux Way(TM))

Bumblebee and Optimus Prime allow you to use the Intel GPU most of the time, but to offload 3D rendering to the Nvidia GPU on a per program basis, and Nvidia Prime allows you to 'switch' which GPU is active, but using software muxing rather than hardware muxing.

I'd recommend reading an article I've written (Driving Multiple Monitors on an Optimus Laptop) that should hopefully give you a better understanding as to your options, and allow you to confirm whether your laptop definitely is muxless or not.


The PLYR1 instructions refer to Sound Control Panel for Windows in order to choose S/PDIF. To do the equivalent then, for Ubuntu, the first thing should be to get to your Sound preferences.

click your system tray sound icon
sound settings

alternatively, you may choose to use Dash, search Sound to find and open the Sound Preferences.

Depending on your version of Ubuntu, there will be a tab labeled as Output or Output Devices.

There, find and choose S/PDIF, something resembling:

Image from Enabling 7.1 audio passthru in 14.04 for Kodi


My ubuntu--vg-ubuntu--lv out of disk space

Your 250GB disk only has about 50GB of partitions. You probably have about 200GB unallocated. This should be obvious if you open GParted. Assuming this is the case proceed as follows:
Make sure you backup any data you cannot afford to lose.
Follow this guide from the section below Logical Volume Extending https://www.tecmint.com/extend-and-reduce-lvms-in-linux/
Don’t forget to complete the resize2fs step.
If you need more help ask specific questions
Good luck


How do I map the audio motherboard jack to some other jack?

I think this will help 3 year ago question

If not here is a project that suppose to do the same as hda-jack-retask
JACK


Unable to EFI boot after Ubuntu 12.10 install (Lenovo E30)

Try this command from a Linux EFI-mode emergency boot:

efibootmgr -o 3

Note that's a lowercase letter -o in the command.

If that doesn't work, then your firmware is broken, and I recommend the following:

Mount your ESP (/dev/sda1) somewhere convenient (say, /boot/efi).
cd to /boot/efi/EFI.
Type sudo rm -r Microsoft. (This assumes that you do not have a Windows installation on the computer. If I'm mistaken in this, then do not perform this step.)
Type sudo mv boot boot-old.
Type sudo cp -a ubuntu boot.
Type sudo mv boot/grubx64.efi boot/bootx64.efi.


How to configure apache2 with symbolic links in /var/www/?

These permissions are preventing apache from accessing you

drwxrwx--- 3 user user     4096 okt 13 17:31 ..

You need to give execute permissions for others:

chmod o+x /home/juul/Workspaces/

(and perhaps on /home/juul/ as well).


Why are my launcher and panel all glitchy when I open dash since updating my nVidia drivers?

I don't have an answer, but for what it's worth, you're not alone. I'm running an older Nvidia 9600 GT and I noticed the same thing.


I think you just have to install RubyGems to:

sudo aptitude install rubygems

(or search in synaptic for rubygems)

Ok, just recognized there is no RubyGems > 1.3.7 in the Ubuntu repository (Debian actually has a 1.6 in sid...). So you have to install it from their website.


You can use Yahoo chat with Empathy. Simply go to Edit->Accounts then click 'Add...' and choose Yahoo as the protocol. You need to enter your Yahoo account details.


This error is caused when the GRUB is damaged.

So my solution is:

Update the GRUB.

Have an installation disc of Ubuntu 12.04.
There boot from with this disc.
Then choose Rescue broken system.

That's all.


You've already mentioned the use of the SMART features found in the Disks app, Tests & Data, and gsmartcontrol. A+

Another quick thing that you can do is to monitor /var/log/syslog* in terminal, like so...

grep -i sda /var/log/syslog*

change sda to your desired drive to search for
note the trailing * after syslog


Based on your output of ubuntu-drivers device I would say you are missing the driver for your wifi card. Install the package listed by ubuntu-drivers device:

sudo apt-get install bcmwl-kernel-source

and reboot. Afterwards the wifi card should be recognised.


CPU info reported by lscpu inconsistent with AMD website

In my opinion, lscpu is correct.  The screenshot states 2 threads per core, 4 cores per socket and 1 socket. 2 X 4 X 1 = 8 CPU(s).  I don't see how you get to 16.

AMD's claim the FX8350 is an "Eight-Core Processor" is controversial.  They describe it has having 8 cores, but only 4 modules.  For example, it only has 4 FPUs (floating point units), each shared by two threads.

The reddit user bridgmanAMD who works on linux drivers for AMD states:

  IIRC the reason SW treats it as 4 cores with hyper-threading was because we asked to have it done that way - was the most practical way to get the OS to allocate threads optimally, ie spreading them across modules first and only putting two threads on a module after all four modules already had a first thread.


Flash Player slows down when I move mouse

I will focus on the mouse/perfomance problem, ask another question for the last one.
In your case I would suggest forcing the activation of Hardware Acceleration. For some reason or other Mozilla decided to blacklist a bunch of cards because of some (very old) problems with the drivers that were solved in posterity, but they didn't bother to test again. That's for the reason, now to solve the problem:

Open a new tab and type about:config. We will be carefree carefull, I prommise

In the search box, write layers.acceleration.force-enabled, if no results come up, right click the empty area, point "New >" then select boolean.

Write layers.acceleration.force-enabled, hit ok.

Now the search came up with a result, make the value true by double clicking, or right click > Toggle. This is how it should looks like:

Please, ignore that it says Iceweasel, it's just Firefox rebranded.

Restart Firefox.


Change K3B behavior when clicking "Open File Manager"

k3b uses the default file manager for KDE.  Make sure that Nemo is set as your default file manager:

Open up system-settings and start the Default Applications panel.
Choose File Manager in the list on the left and make sure Nemo is selected as your default file manager.
Click Apply

Files should now open up using Nemo when you right click a file from k3b and choose Open File Manager.


Main, restricted, multiverse, universe - how to know from where package is?

apt-cache show can give you this (along with a load more details) and doesn't require root.

apt-cache show <<package>> | grep 'Section'


You can have a dualboot system, and run the Windows partition in a VM, consult this thread.

You may not use remote control (RDP/VNC) without somehow booting the Windows partition in a VM, so the remote control is kind of superflous.


This will cause if you have hibernated windows or shutdown windows 8(without restarting). Here you will get a solution.

Unable to mount Windows (NTFS) filesystem due to hibernation


Ubuntu 20.04 vnc no window 'decorations' to allow resize of apps

I use xfce (xubuntu) and this fixes it, won't work for ubuntu unless you're using xfce, but I expect there is some equivalent.
xfwm4 --replace


Weird Image on the top right of terminal!

Seemed like an icon error.

sudo apt-get install gnome-icon-theme

and then selecting , 'gnome' under tweaks, solved this issue.

\m/


You can confirm if it'll work or not by downloading the Live CD ISO and booting with the Live CD. This will not install ubuntu on your machine, but will let you run it for the session. This way you can verify if all your hardware is supported.

You can try Lubuntu, which is a lightweight version of Ubuntu with a very fast and light window manager.


Solved:

sudo apt-get install software-properties-common python-software-properties

Found in this article: Missing add-apt-repository command


USB stick bootable on both Wintel and Mac hardware

Just use startup disk creator(linux) unetbootin(windows) to do it.
Set persistence mode on to be able to save files to it without the usb deleting your files.


Why can't I find gnomad2 in the repositories?

This was removed from Debian (and subsequently Ubuntu) for the following reasons:

  ROM; buggy, obsolete, abandoned upstream

A glance at the project's home page doesn't really show any activity since 2008. Perhaps it might be useful to ask a question on how to get your specific hardware to work, maybe some other tool has the support you need.


Can Ubuntu 12.04 be upgraded to 14.04 instead of 16.04?

You can check the release you'll get with do-release-upgrade by adding the -c flag like so:

do-release-upgrade -c

As far I understand, there is not yet an upgrade possibility for upgrading 12.04 LTS to 16.04 without going step by step (i.e. to 14.04 on the first run), so do-release-upgrade can be expected to do exactly what you want.


Dell Wireless 360 bluetooth not working in lubuntu 14.04 LTS

You can try rfkill ublock all in your terminal.


How do I authorise the update in Kubuntu 16.04?

Thanks, mook765. The icon on the panel which I opened was just a notification warning of available updates. I was confused because these notifications came in a dialog box in 14.04. I found the necessary program as before in K>Applications>System as you said.


Google wallet mysteriously appeared on Ubuntu 14.10

It is a plug-in for Chromium browser.
I guess it comes from google itself to introduce their payment system Google Wallet.
I deleted this plug-in (the folder) at ~/.config/chromium/Default/Extensions/nmmhkkegccagdldgiimedpiccmgmieda.
Is not new published.


Cyborg R.A.T 3 gaming mouse stops working after a while and/or misbehaves

The reason (as I understand) that this particular mouse misbehaves on Linux is because of the mode button. In terms of key presses, each mode corresponds to a different button being held down. For my mouse (R.A.T.7) the mode buttons are 13, 14, and 15 for red, blue, and purple respectively.

I don't know if yours are going to be the same, but there's a nice and easy way to figure it out. Open a terminal and type:

xinput list | grep "id"

Find the entry that has the corresponding label (for me it's "Saitek Cyborg R.A.T.7 Mouse") and note the ID to the right. Then, type:

xinput query-state ID

(Where ID corresponds to the ID of your mouse)

Note which mode color is currently active, switch it to the next one, and retype the above command. Do that one more time.

Now that you know which buttons correspond to the modes, you should be able to edit your xorg.conf file appropriately. Type:

gksu gedit /etc/X11/xorg.conf

(Obviously you can use a different text editor if you feel more comfortable with one. If you use a command-line text editor, use sudo instead of gksu.)

You'll want to insert a block that's similar to this:

Section "InputClass"
    Identifier      "Mouse Remap"
    MatchProduct    "Saitek Cyborg R.A.T.7 Mouse"
    MatchDevicePath "/dev/input/event*"
    Option      "ButtonMapping" "1 2 3 4 5 6 7 8 9 10 11 12 0 0 0"
EndSection

The important thing is the "ButtonMapping" part. Just go through the list of buttons sequentially until you get to the buttons that correspond to the modes and enter 0s instead.

You'll have to restart your X server for the changes to work, but this should fix it up!


Accessing a LAMP webserver that's behind a Ubuntu VM acting as a firewall

So I ended up figuring out my problem, just posting an answer for anyone else potentially having the issue.

The command:

iptables -t nat -A PREROUTING -d outerip -p tcp --dport 80 -j DNAT --to webip

Was what eventually allowed it to work. This rule appends the prerouting table to allow connections from the outer ip of the firewall, as long as they are tcp packets destined for port 80, to be directly NAT'd across the firewall to the webserver IP.

IT should also be noted that I changed the internal facing adapter of my firewall from "link local only" to "shared with other computers" This assigned that eth adapter an address of 10.42.0.x, instead of 169.254.x.x. I'm not sure if that fixed any functionality, another user suggested that I get off the 169.254.x.x address field.


How to make font rendering auto-adjust to monitor orientation changing

I'd starting using udev. I concur that this should go as bug. But until Canonical is moving you may create an udev rule (on a monitor change event) that updates the font color rendering from RGB to vRGB.
This might you give a hint : autorandr


"Cannot import name genshi" error when installing the Swab library

I've run sudo easy_install swab in Ubuntu 10.10 and got all dependencies installed (no need to run sudo easy_install Genshi separately).

Unfortunately, when I look at pestotools module (installed in /usr/local/lib/python2.6/dist-packages/pestotools.genshi-0.2.3.py2.6.egg/pestotools/genshi/__init__.py in my system), I don't see any genshy or render_docstring.

This means that swab package is assuming that those symbols are present in pestotools.genshi namespace when they're not. I'd say that both packages went out of sync and that maybe some older version of pestotools.genshi still works fine together with swab. Anyway, the best way to make sure is to contact swab maintainer.


Save session settings in KDE environment without shutting down

First, you must have selected "Restore manually saved session" under "System settings" -> "Startup and Shutdown" -> "Desktop session"

Then there will be an entry in the "Leave" section of the standard Plasma launcher widget, called "Save session".


How do I increase screen resolution in ubuntu 12.04? I want 1366x768

According to that output, your laptop's native resolution is 1280x800, not 1376x768. Which laptop is it? You can run xrandr -s 1366x768, but it likely won't work, given your hardware seems to report it doesn't support that resolution.


How to install Ubuntu 14.04 on laptop Dell Inspiron 3147 using USB stick?

You could try with Ubuntu 14.10, it has been reported to work out of the box with this machine:

Dell Inspiron 11 3000 Series budget 2-in-1 convertible review


ubuntu 18 - "sudo apt install tor" fails with "Depends: libevent-2.0-5 (>= 2.0.10-stable) but it is not installable"

as suggested in a comment by guiverc, snap install tor did the trick.

"you can accept your own answer in 2 days"... :|


Git via ssh not automatically finding key after update to 16.04

As already said, add

IdentityFile ~/.ssh/my_key
AddKeysToAgent yes

to your ~/.ssh/config to achieve similar behavior.

  If I add (AddKeysToAgent yes) to my local ssh config (~/.ssh/config) the keys are also saved. However the query is in the terminal, which by itself is not bad, but I would like to understand how to get this pop-up back.

The popup in older Ubuntu was coming from gnome-keyring, where you had your key stored. It is obviously not in the KDE version of Ubuntu.

There is no simple way to get the same prompt from the pure OpenSSH. But you might try to experiment with KWallet, which might have similar functionality.


Display grub menu and options without rebooting?

Updated May 7, 2018

Developing the script: Bash script to clone Ubuntu to new partition for testing 18.04 LTS upgrade I discovered you get some ridiculously long menu options that causes the menu to malign:

4>8  Ubuntu, with Linux 4.14.30-041430-generic (recovery mode) (on /dev/nvme0n1p8)

This was fixed today by truncating lines longer than 68 characters.

Updated April 5, 2018

This update introduces grub-menu.sh a much superior version to previous answer (still available below). The new grub menu features:

Displays grub 2 menu entry numbers. ie 0, 1, 1>0, 1>1 ... 2, 3
Default short version without (upstart) and (recover mode) submenu options can be set.
Parameter 1 can be passed as short or long to override default.
column headings dynamically formatted based on short or long setting.

Color Screen shot (short version)

Text Screen shot (long version)

Grub Version: 2.02~beta2-36ubuntu3.15

        ┌─────────┤ Use arrow, page, home & end keys. Tab toggle option ├──────────┐
        │ Menu No. --------------- Menu Name ---------------                       │
        │                                                                          │
        │     0    Ubuntu                                                     ↑    │
        │     1    Advanced options for Ubuntu                                ▮    │
        │     1>0  Ubuntu, with Linux 4.14.31-041431-generic                  ▒    │
        │     1>1  Ubuntu, with Linux 4.14.31-041431-generic (upstart)        ▒    │
        │     1>2  Ubuntu, with Linux 4.14.31-041431-generic (recovery mode)  ▒    │
        │     1>3  Ubuntu, with Linux 4.14.30-041430-generic                  ▒    │
        │     1>4  Ubuntu, with Linux 4.14.30-041430-generic (upstart)        ▒    │
        │     1>5  Ubuntu, with Linux 4.14.30-041430-generic (recovery mode)  ▒    │
        │     1>6  Ubuntu, with Linux 4.14.27-041427-generic                  ▒    │
        │     1>7  Ubuntu, with Linux 4.14.27-041427-generic (upstart)        ▒    │
        │     1>8  Ubuntu, with Linux 4.14.27-041427-generic (recovery mode)  ▒    │
        │     1>9  Ubuntu, with Linux 4.14.24-041424-generic                  ▒    │
        │     1>10 Ubuntu, with Linux 4.14.24-041424-generic (upstart)        ▒    │
        │     1>11 Ubuntu, with Linux 4.14.24-041424-generic (recovery mode)  ▒    │
        │     1>12 Ubuntu, with Linux 4.14.23-041423-generic                  ▒    │
        │     1>13 Ubuntu, with Linux 4.14.23-041423-generic (upstart)        ↓    │
        │                                                                          │
        │                                                                          │
        │                   <Display Grub Boot>        <Exit>                      │
        │                                                                          │
        └──────────────────────────────────────────────────────────────────────────┘

grub-menu.sh bash script

Previous versions grub-display.sh and grub-display-lite.sh required many tweaking options in the code. grub-menu.sh only has one option to tweak:

# Default for hide duplicate and triplicate options with (upstart) and (recovery mode)?
HideUpstartRecovery=false

Set the value to true or false.

The default format can be overridden when calling the script using:

grub-menu.sh short

or:

grub-menu.sh long

The code:

#!/bin/bash

# NAME: grub-menu.sh
# PATH: $HOME/bin
# DESC: Written for AU Q&A: https://askubuntu.com/q/1019213/307523
# DATE: Apr 5, 2018. Modified: May 7, 2018.

# $TERM variable may be missing when called via desktop shortcut
CurrentTERM=$(env | grep TERM)
if [[ $CurrentTERM == "" ]] ; then
    notify-send --urgency=critical "$0 cannot be run from GUI without TERM environment variable."
    exit 1
fi

AllMenusArr=()      # All menu options.
# Default for hide duplicate and triplicate options with (upstart) and (recovery mode)?
HideUpstartRecovery=false
if [[ $1 == short ]] ; then
    HideUpstartRecovery=true    # override default with first passed parameter "short"
elif [[ $1 == long ]] ; then
    HideUpstartRecovery=false   # override default with first passed parameter "long"
fi
SkippedMenuEntry=false  # Don't change this value, automatically maintained
InSubMenu=false     # Within a line beginning with `submenu`?
InMenuEntry=false   # Within a line beginning with `menuentry` and ending in `{`?
NextMenuEntryNo=0   # Next grub internal menu entry number to assign
# Major / Minor internal grub submenu numbers, ie `1>0`, `1>1`, `1>2`, etc.
ThisSubMenuMajorNo=0
NextSubMenuMinorNo=0
CurrTag=""          # Current grub internal menu number, zero based
CurrText=""         # Current grub menu option text, ie "Ubuntu", "Windows...", etc.
SubMenuList=""      # Only supports 10 submenus! Numbered 0 to 9. Future use.

while read -r line; do
    # Example: "           }"
    BlackLine="${line//[[:blank:]]/}" # Remove all whitespace
    if [[ $BlackLine == "}" ]] ; then
        # Add menu option in buffer
        if [[ $SkippedMenuEntry == true ]] ; then
            NextSubMenuMinorNo=$(( $NextSubMenuMinorNo + 1 ))
            SkippedMenuEntry=false
            continue
        fi
        if [[ $InMenuEntry == true ]] ; then
            InMenuEntry=false
            if [[ $InSubMenu == true ]] ; then
                NextSubMenuMinorNo=$(( $NextSubMenuMinorNo + 1 ))
            else
                NextMenuEntryNo=$(( $NextMenuEntryNo + 1 ))
            fi
        elif [[ $InSubMenu == true ]] ; then
            InSubMenu=false
            NextMenuEntryNo=$(( $NextMenuEntryNo + 1 ))
        else
            continue # Future error message?
        fi
        # Set maximum CurrText size to 68 characters.
        CurrText="${CurrText:0:67}"
        AllMenusArr+=($CurrTag "$CurrText")
    fi

    # Example: "menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu" ...
    #          "submenu 'Advanced options for Ubuntu' $menuentry_id_option" ...
    if [[ $line == submenu* ]] ; then
        # line starts with `submenu`
        InSubMenu=true
        ThisSubMenuMajorNo=$NextMenuEntryNo
        NextSubMenuMinorNo=0
        SubMenuList=$SubMenuList$ThisSubMenuMajorNo
        CurrTag=$NextMenuEntryNo
        CurrText="${line#*\'}"
        CurrText="${CurrText%%\'*}"
        AllMenusArr+=($CurrTag "$CurrText") # ie "1 Advanced options for Ubuntu"

    elif [[ $line == menuentry* ]] && [[ $line == *"{"* ]] ; then
        # line starts with `menuentry` and ends with `{`
        if [[ $HideUpstartRecovery == true ]] ; then
            if [[ $line == *"(upstart)"* ]] || [[ $line == *"(recovery mode)"* ]] ; then
                SkippedMenuEntry=true
                continue
            fi
        fi
        InMenuEntry=true
        if [[ $InSubMenu == true ]] ; then
            : # In a submenu, increment minor instead of major which is "sticky" now.
            CurrTag=$ThisSubMenuMajorNo">"$NextSubMenuMinorNo
        else
            CurrTag=$NextMenuEntryNo
        fi
        CurrText="${line#*\'}"
        CurrText="${CurrText%%\'*}"

    else
        continue    # Other stuff - Ignore it.
    fi

done < /boot/grub/grub.cfg

LongVersion=$(grub-install --version)
ShortVersion=$(echo "${LongVersion:20}")
DefaultItem=0

if [[ $HideUpstartRecovery == true ]] ; then
    MenuText="Menu No.     ----------- Menu Name -----------"
else
    MenuText="Menu No. --------------- Menu Name ---------------"
fi

while true ; do

    Choice=$(whiptail \
        --title "Use arrow, page, home & end keys. Tab toggle option" \
        --backtitle "Grub Version: $ShortVersion" \
        --ok-button "Display Grub Boot" \
        --cancel-button "Exit" \
        --default-item "$DefaultItem" \
        --menu "$MenuText" 24 76 16 \
        "${AllMenusArr[@]}" \
        2>&1 >/dev/tty)

    clear
    if [[ $Choice == "" ]]; then break ; fi
    DefaultItem=$Choice

    for (( i=0; i < ${#AllMenusArr[@]}; i=i+2 )) ; do
        if [[ "${AllMenusArr[i]}" == $Choice ]] ; then
            i=$i+1
            MenuEntry="menuentry '"${AllMenusArr[i]}"'"
            break
        fi
    done

    TheGameIsAfoot=false
    while read -r line ; do
        if [[ $line = *"$MenuEntry"* ]]; then TheGameIsAfoot=true ; fi
        if [[ $TheGameIsAfoot == true ]]; then
            echo $line
            if [[ $line = *"}"* ]]; then break ; fi
        fi
    done < /boot/grub/grub.cfg

    read -p "Press <Enter> to continue"

done

exit 0

Previous versions (not recommended)

Below is the original answer where menu entry numbers followed the grub 1 format.

grub-display.sh displays grub menu options and parameters

Without relying on third party applications you can use a bash script to display the grub menu and the boot parameters for any given option. The boot parameters are more than just the cat /proc/cmdline values. They also include the drivers loaded before Linux is booted.

grub-display.sh bash script

Here is the full program listing you can copy and paste:

#!/bin/bash

# NAME: grub-display.sh
# PATH: $HOME/bin
# DESC: Written for AU Q&A: https://askubuntu.com/q/1019213/307523
# DATE: Mar 24, 2018. Modified: Mar 26, 2018.

# $TERM variable may be missing when called via desktop shortcut
CurrentTERM=$(env | grep TERM)
if [[ $CurrentTERM == "" ]] ; then
    notify-send --urgency=critical "$0 cannot be run from GUI without TERM environment variable."
    exit 1
fi

# Must have the dialog package. On Servers, not installed by default
command -v dialog >/dev/null 2>&1 || { echo >&2 "dialog package required but it is not installed.  Aborting."; exit 99; }

# Version without upstart and recovery options displayed
#awk -F\' '/menuentry / { print i++, $2}' /boot/grub/grub.cfg \
#        | grep -v upstart | grep -v recovery > ~/.grub-display-menu

# Version with upstart and recovery options displayed
awk -F\' '/menuentry / { print i++, $2}' /boot/grub/grub.cfg \
        > ~/.grub-display-menu

MenuArr=()

while read -r line; do
    MenuNmbr=${line%% *}
    MenuName=${line#* }
    MenuArr+=($MenuNmbr "$MenuName")
done < ~/.grub-display-menu
rm ~/.grub-display-menu

LongVersion=$(grub-install --version)
ShortVersion=$(echo "${LongVersion:20}")
DefaultItem=0

while true ; do

    Choice=$(dialog \
        --title "Use arrow, page, home & end keys. Tab toggle option" \
        --backtitle "Grub Version: $ShortVersion" \
        --ok-label "Display Grub Boot" \
        --cancel-label "Exit" \
        --default-item "$DefaultItem" \
        --menu "Menu Number       ----------- Menu Name ----------" 24 76 16 \
        "${MenuArr[@]}" \
        >/dev/tty)

    clear
    if [[ $Choice == "" ]]; then break ; fi
    DefaultItem=$Choice

    for (( i=0; i < ${#MenuArr[@]}; i=i+2 )) ; do
        if [[ "${MenuArr[i]}" == $Choice ]] ; then
            i=$i+1
            MenuEntry="menuentry '"${MenuArr[i]}"'"
            break
        fi
    done

    TheGameIsAfoot=false
    while read -r line ; do
        if [[ $line = *"$MenuEntry"* ]]; then TheGameIsAfoot=true ; fi
        if [[ $TheGameIsAfoot == true ]]; then
            echo $line
            if [[ $line = *"}"* ]]; then break ; fi
        fi
    done < /boot/grub/grub.cfg

    read -p "Press <Enter> to continue"

done

exit 0

Note to Ubuntu Server users

This bash script was designed for Ubuntu Desktop. For Ubuntu Server and other Linux Distros that do not have dialog package installed by default, a different script called grub-display-lite.sh is included below. That version uses whiptail instead of dialog.

Reducing the menu size by 66%

To shorten the grub menu option list displayed you can remove the (upstart) and (recovery) options. To do this uncomment these lines:

# Version without upstart and recovery options displayed
awk -F\' '/menuentry / { print i++, $2}' /boot/grub/grub.cfg \
        | grep -v upstart | grep -v recovery > ~/.grub-display-menu

Then apply comments to these lines:

# Version with upstart and recovery options displayed
#awk -F\' '/menuentry / { print i++, $2}' /boot/grub/grub.cfg \
#        > ~/.grub-display-menu

Screenshots

Here's what it looks like when invoked from the command line. Unfortunately I was not able to copy and paste the menu and had to use Print Screen:

Turn off mouse support for copy & paste

 Grub Version: 2.02~beta2-36ubuntu3.15
 ──────────────────────────────────────────────────────────────────────────────────────────
       ┌──────────Use arrow, page, home & end keys. Tab toggle option─────────────┐
       │ Menu Number  ----------- Menu Name ----------                            │
       │ ┌──────────────────────────────────────────────────────────────────────┐ │
       │ │    0   Ubuntu                                                        │ │
       │ │    1   Ubuntu, with Linux 4.14.30-041430-generic                     │ │
       │ │    2   Ubuntu, with Linux 4.14.30-041430-generic (upstart)           │ │
       │ │    3   Ubuntu, with Linux 4.14.30-041430-generic (recovery mode)     │ │
       │ │    4   Ubuntu, with Linux 4.14.27-041427-generic                     │ │
       │ │    5   Ubuntu, with Linux 4.14.27-041427-generic (upstart)           │ │
       │ │    6   Ubuntu, with Linux 4.14.27-041427-generic (recovery mode)     │ │
       │ │    7   Ubuntu, with Linux 4.14.24-041424-generic                     │ │
       │ │    8   Ubuntu, with Linux 4.14.24-041424-generic (upstart)           │ │
       │ │    9   Ubuntu, with Linux 4.14.24-041424-generic (recovery mode)     │ │
       │ │    10  Ubuntu, with Linux 4.14.23-041423-generic                     │ │
       │ │    11  Ubuntu, with Linux 4.14.23-041423-generic (upstart)           │ │
       │ │    12  Ubuntu, with Linux 4.14.23-041423-generic (recovery mode)     │ │
       │ │    13  Ubuntu, with Linux 4.14.21-041421-generic                     │ │
       │ │    14  Ubuntu, with Linux 4.14.21-041421-generic (upstart)           │ │
       │ │    15  Ubuntu, with Linux 4.14.21-041421-generic (recovery mode)     │ │
       │ └────↓(+)──────────────────────────────────────────────────────16%─────┘ │
       │                                                                          │
       ├──────────────────────────────────────────────────────────────────────────┤
       │             <Display Grub Boot>       <      Exit       >                │
       └──────────────────────────────────────────────────────────────────────────┘

When the default mouse support is enabled, you can't copy the screen to the clipboard but must use Print Screen for a graphical screen snapshot. In order to support copy & paste you need disable mouse support by searching for these lines:

    --default-item "$DefaultItem" \
    --no-mouse \
    --menu "Menu Number       ----------- Menu Name ----------" 24 76 16 \

The argument --no-mouse has been inserted below --default-item. This means you loose mouse support but gain better resolution and copy to clipboard ability by highlighting text and pressing Ctrl+C.

Display grub boot parameters

Use the navigation keys to highlight an option and press Enter to see the boot parameters for it:

menuentry 'Ubuntu, with Linux 4.14.27-041427-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.14.27-041427-generic-advanced-f3f8e7bc-b337-4194-88b8-3a513f6be55b' {
recordfail
savedefault
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root f3f8e7bc-b337-4194-88b8-3a513f6be55b
else
search --no-floppy --fs-uuid --set=root f3f8e7bc-b337-4194-88b8-3a513f6be55b
fi
echo 'Loading Linux 4.14.27-041427-generic ...'
linux /boot/vmlinuz-4.14.27-041427-generic root=UUID=f3f8e7bc-b337-4194-88b8-3a513f6be55b ro quiet splash loglevel=0 vga=current udev.log-priority=3 fastboot kaslr acpiphp.disable=1 crashkernel=384M-2G:128M,2G-:256M $vt_handoff
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-4.14.27-041427-generic
}
Press <Enter> to continue

Grub menu entry #94

menuentry 'Windows Boot Manager (on /dev/nvme0n1p2)' --class windows --class os $menuentry_id_option 'osprober-efi-D656-F2A8' {
savedefault
insmod part_gpt
insmod fat
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root D656-F2A8
else
search --no-floppy --fs-uuid --set=root D656-F2A8
fi
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
Press <Enter> to continue

Grub menu entry #96

menuentry 'System setup' $menuentry_id_option 'uefi-firmware' {
fwsetup
}
Press <Enter> to continue

grub-display-lite.sh for Ubuntu Server

Ubuntu Server and Lubuntu do not have dialog package installed by default like Ubuntu Desktop has. A different version has been written for these users based on the whiptail package which is included by default on most Linux Distributions.

The disadvantage of whiptail is less functions but they aren't used in this case. Another disadvantage appears to be less colors but that can make it easier to read for some people. There are advantages to whiptail over dialog such as copy to clipboard, mouse scroll wheel support and probably faster processing.

grub-display-lite.sh bash script

#!/bin/bash

# NAME: grub-display-lite.sh
# PATH: $HOME/bin
# DESC: Written for AU Q&A: https://askubuntu.com/q/1019213/307523
# DATE: Mar 26, 2018.
# NOTE: "lite" version written for Ubuntu Server and Lubuntu which do
#       not have `dialog` installed by default. `whiptail` is used
#       instead. Nice consequences are better resolution, mouse scroll
#       wheel and copy to clipboard support.

# $TERM variable may be missing when called via desktop shortcut
CurrentTERM=$(env | grep TERM)
if [[ $CurrentTERM == "" ]] ; then
    notify-send --urgency=critical "$0 cannot be run from GUI without TERM environment variable."
    exit 1
fi

# Version without upstart and recovery options displayed
awk -F\' '/menuentry / { print i++, $2}' /boot/grub/grub.cfg \
        | grep -v upstart | grep -v recovery > ~/.grub-display-menu

# Version with upstart and recovery options displayed
#awk -F\' '/menuentry / { print i++, $2}' /boot/grub/grub.cfg \
#        > ~/.grub-display-menu

MenuArr=()

while read -r line; do
    MenuNmbr=${line%% *}
    MenuName=${line#* }
    MenuArr+=($MenuNmbr "$MenuName")
done < ~/.grub-display-menu
rm ~/.grub-display-menu

LongVersion=$(grub-install --version)
ShortVersion=$(echo "${LongVersion:20}")
DefaultItem=0

while true ; do

    Choice=$(whiptail \
        --title "Use arrow, page, home & end keys. Tab toggle option" \
        --backtitle "Grub Version: $ShortVersion" \
        --ok-button "Display Grub Boot" \
        --cancel-button "Exit" \
        --default-item "$DefaultItem" \
        --menu "Menu Number       ----------- Menu Name ----------" 24 76 16 \
        "${MenuArr[@]}" \
       >/dev/tty)

    clear
    if [[ $Choice == "" ]]; then break ; fi
    DefaultItem=$Choice

    for (( i=0; i < ${#MenuArr[@]}; i=i+2 )) ; do
        if [[ "${MenuArr[i]}" == $Choice ]] ; then
            i=$i+1
            MenuEntry="menuentry '"${MenuArr[i]}"'"
            break
        fi
    done

    TheGameIsAfoot=false
    while read -r line ; do
        if [[ $line = *"$MenuEntry"* ]]; then TheGameIsAfoot=true ; fi
        if [[ $TheGameIsAfoot == true ]]; then
            echo $line
            if [[ $line = *"}"* ]]; then break ; fi
        fi
    done < /boot/grub/grub.cfg

    read -p "Press <Enter> to continue"

done

exit 0

The grub-display-lite.sh bash script is basically the same as grub-display.sh except there is no error message if dialog isn't installed. Also some whiptail arguments have different names.

grub-display-lite.sh screenshots

The colour screen seems to be easier to read than grub-display which uses dialog package:

Here is the text based image which needs no modifications to copy to clipboard:

Grub Version: 2.02~beta2-36ubuntu3.15

        ┌─────────┤ Use arrow, page, home & end keys. Tab toggle option ├──────────┐
        │ Menu Number       ----------- Menu Name ----------                       │
        │                                                                          │
        │              55 Ubuntu, with Linux 4.13.9-041309-generic   ↑             │
        │              58 Ubuntu, with Linux 4.10.0-42-generic       ▒             │
        │              61 Ubuntu, with Linux 4.10.0-40-generic       ▒             │
        │              64 Ubuntu, with Linux 4.10.0-38-generic       ▒             │
        │              67 Ubuntu, with Linux 4.10.0-37-generic       ▒             │
        │              70 Ubuntu, with Linux 4.10.0-28-generic       ▒             │
        │              73 Ubuntu, with Linux 4.9.77-040977-generic   ▒             │
        │              76 Ubuntu, with Linux 4.9.76-040976-generic   ▒             │
        │              79 Ubuntu, with Linux 4.4.0-104-generic       ▒             │
        │              82 Ubuntu, with Linux 4.4.0-103-generic       ▒             │
        │              85 Ubuntu, with Linux 4.4.0-101-generic       ▒             │
        │              88 Ubuntu, with Linux 4.4.0-98-generic        ▒             │
        │              91 Ubuntu, with Linux 3.16.53-031653-generic  ▒             │
        │              94 Windows Boot Manager (on /dev/nvme0n1p2)   ▮             │
        │              95 Windows Boot Manager (on /dev/sda1)        ▒             │
        │              96 System setup                               ↓             │
        │                                                                          │
        │                                                                          │
        │                   <Display Grub Boot>        <Exit>                      │
        │                                                                          │
        └──────────────────────────────────────────────────────────────────────────┘

As mentioned above you can reduce the size of the grub menu displayed here by 66% when removing (upstart) and (recovery) menu options. Such is the case here but as a consequence the detail lines get narrower and the headings don't line up perfectly. You can tweak the column headings by changing this line:

    --menu "Menu Number       ----------- Menu Name ----------" 24 76 16 \

to something like this:

    --menu "      Menu Number ----------- Menu Name ----------" 24 76 16 \


I want to reinstall Ubuntu on a new drive and keep my personal data on the old drive

You can keep the hdd as storage and install Ubuntu to the SSD.

First, to be safe, you can unplug the HDD and just do the installation for the SSD while the HDD is unplugged.

Then, make sure the SSD is the first boot device in your BIOS settings to prevent the HDD from booting your old installation.

After installation, plug in both drives and when you boot Ubuntu, you will be able to access the HDD as a storage device.

You can either leave your old Ubuntu installed on the HDD and it won't make a difference or you can delete the old system files individually. Just be careful not to delete your movie files (and probably make a backup first just in case). However, the old system files really won't take up much space.

If you have any trouble or if you're about something let me know. Thanks!


Problem with fixed frequencies using CPUFreq Gnome extension

The processor will back off on CPU frequency by itself, if the load is low enough, even with both min and max set to highest level. You shouldn't notice performance wise. However if it really matters the only way that i know of to lock the CPU frequencies at maximum is to disable every idle state deeper than 0, but at the cost of a tremendous amount of power.
So, for normal default settings:
doug@s18:~/c$ grep . /sys/devices/system/cpu/cpu*/cpufreq/scaling_driver
/sys/devices/system/cpu/cpu0/cpufreq/scaling_driver:intel_pstate
/sys/devices/system/cpu/cpu1/cpufreq/scaling_driver:intel_pstate
/sys/devices/system/cpu/cpu2/cpufreq/scaling_driver:intel_pstate
/sys/devices/system/cpu/cpu3/cpufreq/scaling_driver:intel_pstate
/sys/devices/system/cpu/cpu4/cpufreq/scaling_driver:intel_pstate
/sys/devices/system/cpu/cpu5/cpufreq/scaling_driver:intel_pstate
doug@s18:~/c$ grep . /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor:powersave
/sys/devices/system/cpu/cpu1/cpufreq/scaling_governor:powersave
/sys/devices/system/cpu/cpu2/cpufreq/scaling_governor:powersave
/sys/devices/system/cpu/cpu3/cpufreq/scaling_governor:powersave
/sys/devices/system/cpu/cpu4/cpufreq/scaling_governor:powersave
/sys/devices/system/cpu/cpu5/cpufreq/scaling_governor:powersave

you would get something like this for light loads:
doug@s18:~/c$ grep . /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq
/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq:800229
/sys/devices/system/cpu/cpu1/cpufreq/scaling_cur_freq:800287
/sys/devices/system/cpu/cpu2/cpufreq/scaling_cur_freq:800174
/sys/devices/system/cpu/cpu3/cpufreq/scaling_cur_freq:800286
/sys/devices/system/cpu/cpu4/cpufreq/scaling_cur_freq:800049
/sys/devices/system/cpu/cpu5/cpufreq/scaling_cur_freq:800188

now, make the changes, as you have done:
doug@s18:~/c$ echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
performance
doug@s18:~/c$ grep . /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor:performance
/sys/devices/system/cpu/cpu1/cpufreq/scaling_governor:performance
/sys/devices/system/cpu/cpu2/cpufreq/scaling_governor:performance
/sys/devices/system/cpu/cpu3/cpufreq/scaling_governor:performance
/sys/devices/system/cpu/cpu4/cpufreq/scaling_governor:performance
/sys/devices/system/cpu/cpu5/cpufreq/scaling_governor:performance
doug@s18:~/c$ grep . /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq
/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq:3987126
/sys/devices/system/cpu/cpu1/cpufreq/scaling_cur_freq:4600628
/sys/devices/system/cpu/cpu2/cpufreq/scaling_cur_freq:2559618
/sys/devices/system/cpu/cpu3/cpufreq/scaling_cur_freq:4600104
/sys/devices/system/cpu/cpu4/cpufreq/scaling_cur_freq:4601383
/sys/devices/system/cpu/cpu5/cpufreq/scaling_cur_freq:4600459
doug@s18:~/c$ echo 1 | sudo tee /sys/devices/system/cpu/intel_pstate/no_turbo
1
doug@s18:~/c$ grep . /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq
/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq:3700405
/sys/devices/system/cpu/cpu1/cpufreq/scaling_cur_freq:3700291
/sys/devices/system/cpu/cpu2/cpufreq/scaling_cur_freq:3700381
/sys/devices/system/cpu/cpu3/cpufreq/scaling_cur_freq:3700612
/sys/devices/system/cpu/cpu4/cpufreq/scaling_cur_freq:3701802
/sys/devices/system/cpu/cpu5/cpufreq/scaling_cur_freq:3700702

Actually, surprisingly stable. And power is still low:
doug@s18:~/c$ sudo ~/turbostat --Summary --quiet --show Busy%,Bzy_MHz,PkgTmp,PkgWatt,GFXWatt,IRQ --interval 6
Busy%   Bzy_MHz IRQ     PkgTmp  PkgWatt GFXWatt
0.01    3689    196     30      1.91    0.00
0.01    3700    90      30      1.90    0.00
0.01    3667    142     30      1.91    0.00
0.01    3701    93      30      1.91    0.00
0.01    3620    119     30      1.89    0.00
0.01    3648    118     30      1.88    0.00
0.01    3603    147     30      1.86    0.00
0.00    3701    85      30      1.77    0.00
0.01    3700    102     30      1.84    0.00

However, if you want it even more stable at 3.7 GHz, then disable deep idle states, such the processor never goes into idle (idle state 0, or poll, is not actually idle at all):
doug@s18:~/idle/perf/results/a04$ echo 1 | sudo tee /sys/devices/system/cpu/cpu*/cpuidle/state8/disable
1
doug@s18:~/idle/perf/results/a04$ echo 1 | sudo tee /sys/devices/system/cpu/cpu*/cpuidle/state7/disable
1
doug@s18:~/idle/perf/results/a04$ echo 1 | sudo tee /sys/devices/system/cpu/cpu*/cpuidle/state6/disable
1
doug@s18:~/idle/perf/results/a04$ echo 1 | sudo tee /sys/devices/system/cpu/cpu*/cpuidle/state5/disable
1
doug@s18:~/idle/perf/results/a04$ echo 1 | sudo tee /sys/devices/system/cpu/cpu*/cpuidle/state4/disable
1
doug@s18:~/idle/perf/results/a04$ echo 1 | sudo tee /sys/devices/system/cpu/cpu*/cpuidle/state3/disable
1
doug@s18:~/idle/perf/results/a04$ echo 1 | sudo tee /sys/devices/system/cpu/cpu*/cpuidle/state2/disable
1
doug@s18:~/idle/perf/results/a04$ echo 1 | sudo tee /sys/devices/system/cpu/cpu*/cpuidle/state1/disable

And now the CPU frequencies are locked, the power is not terrible, mainly because turbo is disabled (turbostat, with the setting I used, does not distinguish between idle state 0 and really busy):
doug@s18:~/c$ sudo ~/turbostat --Summary --quiet --show Busy%,Bzy_MHz,PkgTmp,PkgWatt,GFXWatt,IRQ --interval 6
Busy%   Bzy_MHz IRQ     PkgTmp  PkgWatt GFXWatt
100.26  3700    36069   36      21.66   0.00
100.26  3700    36072   36      21.70   0.00
100.26  3700    36065   36      21.66   0.00
100.26  3700    36079   36      21.89   0.00
100.26  3700    36070   36      21.65   0.00
100.26  3700    36101   36      21.80   0.00
100.26  3700    36072   37      21.74   0.00

As a side note, the power for real work will be higher:
doug@s18:~/idle/perf/results/a04$ sudo ~/turbostat --Summary --quiet --show Busy%,Bzy_MHz,PkgTmp,PkgWatt,GFXWatt,IRQ --interval 6
Busy%   Bzy_MHz IRQ     PkgTmp  PkgWatt GFXWatt
100.26  3700    36169   55      72.08   0.00
100.26  3700    36260   55      71.96   0.00
100.26  3700    36074   55      71.97   0.00
100.26  3700    36082   55      71.99   0.00
100.26  3700    36080   56      72.03   0.00

The examples for this answer were done with Intel(R) Core(TM) i5-9600K CPU @ 3.70GHz. Readers might have a different number of idle states, depending on their processor.
To enable all idle states again, after the test work:
doug@s18:~/idle/perf/results/a04$ echo 0 | sudo tee /sys/devices/system/cpu/cpu*/cpuidle/state*/disable

And then check:
doug@s18:~/idle/perf/results/a04$ grep . /sys/devices/system/cpu/cpu*/cpuidle/state*/disable
/sys/devices/system/cpu/cpu0/cpuidle/state0/disable:0
/sys/devices/system/cpu/cpu0/cpuidle/state1/disable:0
/sys/devices/system/cpu/cpu0/cpuidle/state2/disable:0
...
/sys/devices/system/cpu/cpu5/cpuidle/state6/disable:0
/sys/devices/system/cpu/cpu5/cpuidle/state7/disable:0
/sys/devices/system/cpu/cpu5/cpuidle/state8/disable:0


Some times our systems may not be up-to-date to receive an install so we can update with:

update package information:

sudo apt-get update

upgrade packages on system and fix broken packages in the process:

sudo apt-get -f dist-upgrade

only fix broken packages:

sudo apt-get -f install


Hm, perhaps you should run the sudo update-grub or sudo update-grub2 command. That will likely look for the bootable systems in your computer and add them to the grub list.

I think it should be in the /dev/sda, isn't that your primary partition?


Are these desktop features or are they bugs?

I believe these are bugs related to GTK4.  With 20.04 the Xfce desktop is being ported to GTK4/3 from GTK3/2, and Thunar (Xfce's desktop uses that as a component to render the desktop) has the same issues as the GNOME Desktop.

Among the bugs I have seen:

Desktop zoom is broken - partial window updates while zoomed update an area much smaller than the actually updated area, breaking zoom for everything but video playback.  ie Widgets get partially rendered, scrolls affect a small window within the scrolled region, text editing happens invisibly... so this Accessibility feature now renders the desktop unusable.
No drag & drop on the desktop / can't re-arrange desktop items
Desktop backgrounds spuriously switch between different scaling methods
Vsync option removed from Window Manager Tweaks; Xfce no longer offers tear-free video
Brutally flickering mouse pointer when window below it is being updated, worse than DOS days.
Turning font smoothing on/off no longer takes effect immediately
Xfce panel config backups disappeared after update
New dekstop layouts settings tool doesn't remember display scaling
Desktop icon font shadow/outline is low-contrast, creating a readability/accessibility issue worse than if the shadow wasn't there, when it's primary purposes is to increase contrast.
XUbuntu, on the download page, has a link to Launchpad for their bug tracking and problem reporting.  Their IRC is not working, they encourage you to sign up to Launchpad to report bug and join the release testing team.  Well, having joined the team there's no code, no issues, no FAQ, nothing at all.  No wonder we have all these quality issues.

Those are the issues that are motivating me to return to 18.04.  There's regressions with the Intel display driver too.  GPU-accelerated video presentation and scaling is broken.  VAAPI works if you replace intel-media-va-driver with intel-media-va-driver-non-free, but I'm getting segfaults from all presentation methods other than X11-shm, VAAPI, and xv, so no shader-accelerated interpolating/sharpening scaling :-(


How to change the order of execution of services at startup?

update-rc.d(8) enables or disables services, while the ordering of services is handled by insserv(8), and can be customized by editing the LSB header of the service and setting/adding:

Required-Start: $all

In oldest versions, i can do something like this to determine the order:

update-rc.d myservice start 95 2 3 4 5 . stop 70 0 1 6 .

But after Ubuntu 14, i tried this Ubuntu 16.04 (4.4.0-31-generic):

update-rc.d myservice defaults 95 70

And doesn't work, always creates the order defined in the header:

 sudo find /etc/ -name ???myservice | sort
/etc/rc0.d/K01myservice
/etc/rc1.d/K01myservice
/etc/rc2.d/S03myservice
/etc/rc3.d/S03myservice
/etc/rc4.d/S03myservice
/etc/rc5.d/S03myservice
/etc/rc6.d/K01myservice

Also al try:

update-rc.d myservice defaults any_text_wath_you_want lalala

Ands seems like ignores all the text after "defaults". I don´t know wath it do when my installation order, I do not think that orders previously installed services.


The wine version is 1.4, currently without using the wine repository, thus without updates to newer versions.
Meanwhile and for another reason I restored a one year old image of the root partition and did all updates. Surprisingly now also the Wine/MSO installation works fine again.
So currently the issue is solved, but what can I do to avoid further problems ?


Just Create a 'application_name'.desktop file and save it in /usr/share/applications

Here is the format of the desktop file:

[Desktop Entry]
Version = <Version of the Application>
Name = <Name of the Apllication not the binary>
Exec=</path/to/binary>
Icon=</path/to/icon>
Terminal=False
Type=Application
Categories=<whatever the application falls into>

Enter the respective Names , binary and icons except the < and >

EDIT:

Here is an example of desktop file as @Zanna pointed out.


Problems with Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter [168c:003e] (rev 32)

First, it is unlikely that switching to an earlier kernel version will fix your problem. However, it is easy enough to reboot, interrupt the boot process and select an earlier kernel version at the GRUB menu and try. If it helps, please report back. The searchers will appreciate it.

Second, it is often useful to disable power saving in Network Manager. It can be done from the terminal with:

sudo sed -i 's/3/2/' /etc/NetworkManager/conf.d/*
sudo service network-manager restart

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

sudo iw reg get

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

sudo iw reg set IS

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

sudo nano /etc/default/crda

Change the last line to read:

REGDOMAIN=IS

Proofread carefully, save and close the text editor.

I notice that you are connected to an unsecured network. Often, Linux drivers are more reliable connected to a WPA2 network. If you have the option, I’d see if the connection is more reliable connected to CAMPUS_SECURED.

Finally, I notice that the signal strength is quite low in every network that you scanned. I wonder if both antenna wires are securely snapped in place on the wireless card. If you can stand very close, say one meter or so, from a router, scan and get a good signal strength, say 90% and then stand 5-6 meters away and get a very low strength, say 35%, then I’d suspect that the antenna is not correctly connected.


Unable to change virtual machine power state: This host supports AMD-V, but AMD-V is disabled

FIXED:

On MSI Motherboard enter BIOS mode and turn:

SVM: enable


Here's a quick'n'dirty expect script that you can try (I can't test it myself, since I'm not using openvpn anywhere):

#!/usr/bin/expect

set timeout 20
set username [lindex $argv 0]

spawn ./build-key $username

while 1 {
  expect {
    "y/n]" { send "y\r" }
    "]:" { send "\r" }
    eof { break }
  }
}

It basically sends y whenever it sees a y/n] question and just a newline whenever it sees any other closing square bracket ], until it runs out of input.

You can save it as whatever, make it executable, and then execute

./whatever usernametest


Cannot create file/directory in home directory

The current directory (your home) is missing the "w" (write) permission.
Try these commands

cd ~
chmod u+w .

Don't forget the dot at the end. It represents the current directory.

Or you can do the same with just one command:

chmod u+w ~

You don't even need sudo according to my tests.


Change Login Resolution in Xubuntu 13.04?

Doesn't xubuntu use lightdm by default?

Regardless what you need to do is build the /etc/X11/xorg.conf, by running the following command:

sudo aticonfig --initial

This will make a generic xorg.conf but should do the job. If it still occurs then you may need to do additional (or follow the research you have done) in order to modify that file to your optimal settings.

One extra hint, after logging in use the command xrandr which should display that monitor as "connected" and give a list of supported modes. perhaps use one of those?

If you want to go the DM init script route then according to Run a startup script with lightdm

"You might want to try adding pre-start or post-start scripts to

/etc/init/lightdm.conf
(see http://upstart.ubuntu.com/getting-started.html for an introduction to upstart that parses this file)

Also /etc/lightdm.conf allows to specify scripts to be loaded. You have a detailed description of all (many) the options that can be used in the configuration file lightdm.conf at /usr/share/doc/lightdm/lightdm.conf."

For example, for gdm, I resolved an issue by adding the following command to /etc/gdm/init/Default:

if xrandr -q | grep -q "CRT1 disconnected"; then
  xrandr --output LVDS --mode 1600x900 --pos 0x0 --primary
fi

So perhaps you can research into that answer (and the upstart link) to determine if you can add a script which basically does the same thing (tho you won't need the if statement, if only running 1 monitor)...

I had do this modification because after futzing around with xorg.conf to act like I wanted when booting from single monitor (laptop) to multi-monitor, when in single monitor mode, the GDM login screen was using the wrong resolution (it was using the multi-monitor virtual display size... I think), so issuing that BEFORE the initctl command for GDM resolved, and it should resolve for you too (I say should because I haven't looked into lightDM too heavily).


Network only using one DNS when connected to VPN

From your configuration, your dnsmasq installation is getting the list of DNS servers to use from /etc/resolv.conf. By default, dnsmasq tries to favor using DNS servers that are up, but will only send a given request to a single DNS server.  This can cause problems if you have multiple DNS servers that can/will only serve certain queries.

I believe you can solve this issue by making sure you have a DNS server on your LAN (the one you use when you aren't connected to the VPN) set up in /etc/resolv.conf, as well as the DNS server on the corporate network you want to use over the VPN.

Then, you will need to edit /etc/default/dnsmasq and add or edit the DNSMASQ_OPTS= line to include --all-servers.

If you are still unable to get DNS queries with this setup, copy the resolv.conf file you created during the steps above to another location, like ~/resolv.conf, set /etc/resolv.conf up with nameserver 127.0.0.1 and set the following option in /etc/dnsmasq.conf:

resolv-file=/home/your_username/resolv.conf

That should configure your system to query your dnsmasq installation for DNS, and it will in turn use both your local DNS server and the VPN DNS server for every query.

Edit: You can find the DNS servers you are currently using for a particular connection using the nmcli tool.  For finding the DNS servers used by my wireless connection, I used the following syntax:

nmcli dev list iface wlan0 | grep IP4.DNS

If you run this command while you are not connected to your VPN, and then again when you are connected and are able to resolve your corporate addresses, you should get your list of DNS servers off and on the VPN.  I hope this helps.

Edit 2: Looking at your routing tables, it appears your VPN administrator has set you up to route all your traffic through the VPN while you're connected (your default gateway changes to a VPN address).  Since both of your DNS servers are public addresses, and neither have a specific route set up while you are on the VPN, you are trying to do normal DNS lookups through the VPN and that is what is failing.

You may have a couple ways to make this work, depending on your VPN setup:

If the VPN will allow you to access the internet through the corporate network, but not perform DNS queries to servers on the internet, add routes to your DNS servers like so: sudo route add -host 83.255.245.11 gw 192.168.0.1, and sudo route add -host 193.150.193.150 gw 192.168.0.1 after connecting to the VPN.
If the VPN will not allow you to access the internet through the corporate network, you will need to change the default gateway settings on your computer to point at 192.168.0.1 after you connect to the VPN.  In this case, you will want to set up your usual default gateway and then add network routes to access VPN-only equipment.

You may need to whittle down your routing table in the connected-to-the-VPN case shown in your second pastebin to the following:

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth0
192.168.0.0     0.0.0.0         255.255.255.0   U     1      0        0 eth0
10.100.0.0      10.100.0.105    255.255.255.0   UGH   0      0        0 tun0
10.100.0.105    0.0.0.0         255.255.255.255 UH    0      0        0 tun0

Then, add routes as you need to in order to access the corporate equipment.  In the routing table shown above I have assumed a /24 network on the VPN, which may be incorrect.  You'll have to set the mask appropriately.


Rename Music Files with Missing File Extensions

Here's a bash script that renames the files passed to it based on their guessed format. It calls file to figure out the format by looking at characteristic patterns in the first few bytes. file -i prints lines like /path/to/file: type/subtype where type/subtype is a MIME type. The script then associates extensions to known types and renames the file to have the extension. Files that already have the extension are left alone. Files that have an unrecognized type are left alone. The script will prompt before overwriting a target file.

#!/bin/bash
# usage:
# fixmime ./{**/,}*
file --mime-type "$@" |
while read -r line; do
  file=${line%:*}
  type=${line##* }
  case $type in

    #Audio
    audio/x-flac) ext=flac;;
    audio/mpeg) ext=mp3;;
    application/ogg) ext=ogg;;

    #Video
    video/mp4) ext=mp4;;
    video/x-flv) ext=flv;;
    application/octet-stream) ext=webm;;
    application/x-shockwave-flash) ext=swf;;

    #Images
    image/png) ext=png;;
    image/jpeg) ext=jpg;;
    image/gif) ext=gif;;
    image/x-ico) ext=ico;;

    #Text
    text/plain) ext=md;; #markup your notes, even when they are plain
    text/html) ext=html;;
    text/x-pascal) ext=py;;
    text/x-c++) ext=js;; #conflicts with .cpp, so use prefered
    text/x-c) ext=scss;; #usualy it is .c
    text/x-shellscript) ext=sh;;
    application/pdf) ext=pdf;;

    #Fonts
    application/x-font-ttf) ext=ttf;;
    application/vnd.ms-opentype) ext=otf;;

    #Archive
    application/x-gzip) ext=tar.gz;;
    application/x-bzip2) ext=tar.bz;;

    *) continue;;
  esac
  [[ $file = *.$ext ]] || mv -i -- "$file" "$file.$ext"
done

Save the script as ~/bin/rename-based-on-content-type (or whatever you like) and make it executable (chmod +x ~/bin/rename-based-on-content-type). Pass the names of the files you want to rename to the script on the command line. If you have a directory tree /path/to/music/directory that you want to traverse recursively, invoke the script as

~/bin/rename-based-on-content-type /path/to/music/directory/{**/,}*


How Do I Add SSL/TLS Connection Security Option to Evolution Mail?

You already have that option, it's just named differently between Thunderbird and Evolution.
Thunderbird's "SSL/TLS" option is equivalent to Evolution's "TLS on a dedicated port".
Use the port and "TLS on a dedicated port" options to emulate Thunderbird's "SSL/TLS" options.
Under the hood they both say that it's a dedicated port that only accepts TLS connections by default, rather than StartTLS which starts on a plaintext connection and then upgrades to TLS Encrypted automatically after the initial connection is established.

But, why is "SSL" not listed?
"SSL" and "TLS" are two protocols that do encrypted connectivity but with different handshake mechanisms, etc.  "SSL" died effectively when SSLv3 was effectively killed by the POODLE vulnerability in 2014, and is effectively considered "dead" now.  TLS is now the protocol that is supported for encrypted connections.
However, "SSL" itself has such a known history in terms of being discussed as the "encryption mechanism" and "SSL Certificates" and such that "SSL" and "TLS" are synonymous for "TLS" nowadays in the average person's vocabulary and such.  Whenever we say "SSL" we usually mean "TLS" nowadays though.
(And since OpenSSL versions in 18.04 and later have SSLv2 and SSLv3 disabled by default, SSL is effectively dead, but TLS lives on)


This sounds more like a general networking issue than anything wrong with SSH itself. I'd try:

Pinging known hosts on the network
Using a tool like whatismyip.com to make sure you're really on the VPN
If they both work, trying to access other protocols on other servers in the remote network (most Universities have an intranet, for example).
Use IPs when possible. If you're using mDNS or a local DNS server (inside the remote network) this can mess around with things especially if your computer has cached an external DNS record (which doesn't line up with the VPN-internal version). I'm not explaining that particularly well, but try an IP if you're currently using a domain name.

If you know you're on the VPN properly and can access other network services, that's when it's time to ping your IT department an email. There could be a policy to segregate VPN connections from the cluster for security reasons and they're likely the people who will know about it.


Where did you download your Ubuntu installation image? Latest 12.04.4 should have this drivers?

You can check this answer. As I can see Dell Vostro 3460/3560 has same Broadcom Corporation BCM43142. So check @izx's answer, download drivers and install it.

Or you can download latest XUbuntu 13.10 if you want use XUbuntu.

Or you can wait until April 17-th, 14.04 LTS release date.


I have recently installed ubuntu after i erased my hdd and I dont know if the hdd has only one partition now

You have two hard disks that seem to have valid partitions.

Because of:

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        2048      499711      248832   83  Linux
/dev/sdb2          501758   312313855   155906049    5  Extended
/dev/sdb5          501760   312313855   155906048   83  Linux

your have a HDD (/dev/sdb: 159.9 GB) that have only 2 partitions: /dev/sdb1 and /dev/sdb2. /dev/sdb2 is an extended partition that is subdivided in only one logical partition: /dev/sdb5.

Because of:

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63    15687679     7843808+   c  W95 FAT32 (LBA)

you have disk (most probably a flash drive - /dev/sda: 8032 MB) with one partition: /dev/sda1.

To understand better how exactly are partitioned your drives, install and use GParted .


How do I mount an eCryptFS encrypted partition on login?

Tried this on XFCE, but I'm not positive if Unity/Gnome/KDE/etc are all the same for run-on-login startup files, so YMMV.

A .desktop file in ~/.config/autostart will get run on login, telling it to run a bash script that mounts your encrypted folder should work. Since your home is already encrypted, you could store the other mount passphrase in the bash script, not perfect security but still encrypted on disk, if you didn't want to enter it each time.  For example ~/.config/autostart/test.desktop. A very basic one like this should work:

[Desktop Entry]
Type=Application
Exec=/home/user/.config/autostart/runme.sh

Or to wait a few seconds before starting (ex. give the desktop time to initialize before prompting for a passphrase) and run as root, try this:

[Desktop Entry]
Type=Application
Exec=sudo bash -c "sleep 5; /home/user/.config/autostart/runme.sh"

Or if it needs more detail, copy & edit an existing one (if there are any), or there should be a GUI way to make one under System → Preferences → Startup Applications, then click Add. Or more lines like this should work too (for XFCE anyway, probably cut the OnlyShowIn line):

[Desktop Entry]
Encoding=UTF-8
Version=0.9.4
Type=Application
Name=test.sh
Comment=test.sh
Exec=/home/user/.config/autostart/test.sh
OnlyShowIn=XFCE;
StartupNotify=false
Terminal=true
Hidden=false

It just runs the target file, and doesn't work with Exec=~/.config/autostart/test.sh so replace "user" accordingly. You could probably use one long line instead of pointing it at a bash script.

I'm looking into the mount part now, testing with a virtual pc. There are some complications since you're already using eCryptFS with an encrypted home, and I tested a while ago & you can't have an encrypted home and another encrypted "Private" folder in your home (with encrypted-setup-private & encrypted-mount-private), but just using ecryptfs-add-passphrase & calling mount.ecryptfs / mount -t ecryptfs should work...

Skip to the below script for one that does work. Here's what could work, but I didn't have much luck with. Both these scripts ask you to enter your passphrase, so they're not insecure, though you could edit it if you want, or use xenity to enter it instead of in a terminal. Here, mount needs to be run as root, so need to insert keys to "sudo" keyring. Running whole script as root should work...? Probably was barking up the wrong tree here.

#!/bin/bash
# mostly copied from ecryptfs-mount-private

# otherhome should be the path to the folder just outside the actual encrypted home,
# For example, /home/.ecryptfs/[user] and must be readable
otherhome=/otherpartition/home/.ecryptfs/user
decrypted=/media/decrypted

WRAPPED_PASSPHRASE_FILE="$otherhome/.ecryptfs/wrapped-passphrase"
MOUNT_PASSPHRASE_SIG_FILE="$otherhome/.ecryptfs/Private.sig"

PW_ATTEMPTS=3
MESSAGE=`gettext "Enter your login passphrase:"`

if [ ! -d "$decrypted" ]; then
    mkdir -p "$decrypted" || { echo "$decrypted does not exist, can not create"; exit 1; }
fi

# interactively prompt for the user's password
if [ -f "$WRAPPED_PASSPHRASE_FILE" -a -f "$MOUNT_PASSPHRASE_SIG_FILE" ]; then
    tries=0
    stty_orig=`stty -g`
    while [ $tries -lt $PW_ATTEMPTS ]; do
        echo -n "$MESSAGE"
        stty -echo
        LOGINPASS=`head -n1`
        stty $stty_orig
        echo
        if [ $(wc -l < "$MOUNT_PASSPHRASE_SIG_FILE") = "1" ]; then
            # No filename encryption; only insert fek
            if printf "%s\0" "$LOGINPASS" | ecryptfs-unwrap-passphrase "$WRAPPED_PASSPHRASE_FILE" - | ecryptfs-add-passphrase -; then
                sig=`head -n1 $otherhome/.ecryptfs/Private.sig`
                break
            else
                echo `gettext "ERROR:"` `gettext "Your passphrase is incorrect"`
                tries=$(($tries + 1))
                continue
            fi
        else
            if printf "%s\0" "$LOGINPASS" | ecryptfs-insert-wrapped-passphrase-into-keyring "$WRAPPED_PASSPHRASE_FILE" - ; then
                sig=`head -n1 $otherhome/.ecryptfs/Private.sig`
                fnek_sig=`tail -n1 $otherhome/.ecryptfs/Private.sig`
                break
            else
                echo `gettext "ERROR:"` `gettext "Your passphrase is incorrect"`
                tries=$(($tries + 1))
                continue
            fi
        fi
    done
    if [ $tries -ge $PW_ATTEMPTS ]; then
        echo `gettext "ERROR:"` `gettext "Too many incorrect password attempts, exiting"`
        exit 1
    fi
    if [ -v fnek_sig ]; then
        # filename encryption enabled, $fnek_sig has been set
        mount -i -t ecryptfs -o ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_sig=$sig,ecryptfs_fnek_sig=$fnek_sig $otherhome/.Private $decrypted
    else
        # no filename encryption
        mount -i -t ecryptfs -o ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_sig=$sig $otherhome/.Private $decrypted
    fi
else
    echo `gettext "ERROR:"` `gettext "Encrypted private directory is not setup properly"`
    exit 1
fi
if grep -qs "$otherhome/.Private $decrypted ecryptfs " /proc/mounts 2>/dev/null; then
    echo
    echo `gettext "INFO:"` `gettext "Your private directory has been mounted."`
    echo
fi
exit 0

This script does work,

though I had trouble running any executable script from inside an encrypted home. Had to call it as an argument to bash/sh, with

sudo bash -c ./ecryptfs-mount-single.sh [--rw] [encrypted folder] [mountpoint]

Here it is:

#!/bin/sh -e
#
# ecryptfs-mount-single
# Modified by Xen2050 from:
#
#    ecryptfs-recover-private
#    Copyright (C) 2010 Canonical Ltd.
#
#    Authors: Dustin Kirkland <kirkland@ubuntu.com>
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, version 2 of the License.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.

error() {
    echo "ERROR: $@" 1>&2
    echo "Usage:  ecryptfs-mount-single [--rw] [encrypted private dir] [mountpoint]"
    echo "\tWill attempt to mount [encrypted private dir (.Private)] to [mountpoint]"
    echo "\twith standard options: ecryptfs_cipher=aes,ecryptfs_key_bytes=16"
    echo "\n\t--rw\tmount with read-write access (optional)"
    echo "\t[mountpoint] will attempt to be created if it does not exist"
    exit 1
}

info() {
    echo "INFO: $@"
}

# We need root access to do the mount
[ "$(id -u)" = "0" ] || error "This program must be run as root."

# Handle parameters
opts="ro"
if [ "$1" = "--rw" ]; then
    opts="rw"
    shift
fi

if [ -d "$1" ]; then
    # Allow for target directories on the command line
    d="$1"
    # Only supplying one directory
else

    error "No private directory found; it must be supplied."
fi

if [ ! -d "$2" ]; then
    mkdir -p "$2" || error "mountpoint $2 does not exist, can not create"
fi
    # mount directory on the command line
    tmpdir=$2

# Determine if filename encryption is on
ls "$d/ECRYPTFS_FNEK_ENCRYPTED"* >/dev/null 2>&1 && fnek="--fnek" || fnek=
if [ -f "$d/../.ecryptfs/wrapped-passphrase" ]; then
    info "Found your wrapped-passphrase"
    echo -n "Do you know your LOGIN passphrase? [Y/n] "
    lpw=$(head -n1)
    case "$lpw" in
        y|Y|"")
            # Use the wrapped-passphrase, if available
            info "Enter your LOGIN passphrase..."
            ecryptfs-insert-wrapped-passphrase-into-keyring "$d/../.ecryptfs/wrapped-passphrase"
            sigs=$(sed -e "s/[^0-9a-f]//g" "$d/../.ecryptfs/Private.sig")
            use_mount_passphrase=0
        ;;
        *)
            use_mount_passphrase=1
        ;;
    esac
else
    # Fall back to mount passphrase
    info "Could not find your wrapped passphrase file."
    use_mount_passphrase=1
fi
if [ "$use_mount_passphrase" = "1" ]; then
        info "To recover this directory, you MUST have your original MOUNT passphrase."
    info "When you first setup your encrypted private directory, you were told to record"
    info "your MOUNT passphrase."
    info "It should be 32 characters long, consisting of [0-9] and [a-f]."
    echo
    echo -n "Enter your MOUNT passphrase: "
    stty_orig=$(stty -g)
    stty -echo
    passphrase=$(head -n1)
    stty $stty_orig
    echo
    sigs=$(printf "%s\0" "$passphrase" | ecryptfs-add-passphrase $fnek | grep "^Inserted" | sed -e "s/^.*\[//" -e "s/\].*$//" -e "s/[^0-9a-f]//g")
fi
case $(echo "$sigs" | wc -l) in
    1)
        mount_sig=$(echo "$sigs" | head -n1)
        fnek_sig=
        mount_opts="$opts,ecryptfs_sig=$mount_sig,ecryptfs_cipher=aes,ecryptfs_key_bytes=16"
    ;;
    2)
        mount_sig=$(echo "$sigs" | head -n1)
        fnek_sig=$(echo "$sigs" | tail -n1)
        mount_opts="$opts,ecryptfs_sig=$mount_sig,ecryptfs_fnek_sig=$fnek_sig,ecryptfs_cipher=aes,ecryptfs_key_bytes=16"
    ;;
    *)
        continue
    ;;
esac
(keyctl list @u | grep -qs "$mount_sig") || error "The key required to access this private data is not available."
(keyctl list @u | grep -qs "$fnek_sig") || error "The key required to access this private data is not available."
if mount -i -t ecryptfs -o "$mount_opts" "$d" "$tmpdir"; then
    info "Success!  Private data mounted at [$tmpdir]."
else
    error "Failed to mount private data at [$tmpdir]."
fi

Unmounting before/when logging out, and maybe removing the keys from the kernel keyring (with keyctl clear or purge, sudo keyctl clear @u clears all) are probably good ideas. I had a 2nd folder mounted inside an encrypted home, and logged out, it apparently unmounted the 2nd folder (not in /proc/mounts) but still showed up in mount.


Okay, now you've asked for a tiny app, and as any tiny app, this is missing features. But anyway. I've written one, very simple, that may do what you want.

You can Download it here, save this file somewhere, right click it, go to Properties → Permissions and make it Executable, then double click to run it. You can also create a launcher for it and add it to your Applications menu.

Please note: I can't promise you to support this, like a paid developer would do for you, but I hope it's helpful none the less. But if you want me to do some little adjustments, just post a comment.

Technical notes:
This will store all of the data in a file called task_timer.json, in the same directory the file is run from (probably your home directory). You can change this directory at the top of the file. If the app crashes or doesn't start properly, run it from the Terminal (use cd path/to/file and ./filename to run it) and provide the output, so that I know what's wrong)


How to change system timezone permanently?

See this answer: https://serverfault.com/a/84528/459227

In short, you can set the timezone you want in /etc/timezone and then you can call dpkg-reconfigure -f noninteractive tzdata so it applies the settings without asking on a text based GUI.


Well, a module called PAM (Pluggable Authentication module) can be customized to achieve your need. A beautiful article is available on linuxconfig describing this in detail.

The steps are:

Install PAM

$ sudo apt-get install pamusb-tools libpam-usb

Add USB device to PAM config

$ sudo pamusb-conf --add-device <my-usb-stick>

Select your volume and "Y" to save
Define user for PAM auth

$ sudo pamusb-conf --add-user <ubuntu-user>

Select and "Y" to save
Configure PAM

$ sudo gedit /etc/pam.d/common-auth

Add the line below and save

auth    sufficient      pam_usb.so

Test the PAM auth

$ su ubuntu-user

Lock when disconnected

$ sudo gedit /etc/pamusb.conf

Modify the block "user" block to look like:

<user id="ubuntu-user">
      <device>
              my-usb-stick
      </device>
      <agent event="lock">gnome-screensaver-command -l</agent>
      <agent event="unlock">gnome-screensaver-command -d</agent>
 </user>*

cuttlefish could be one solution to do it as @maythux suggested. I really can't comment on its capabilities, I prefer to stay away from 3rd party apps as much as possible.


ANSWER:

After researching on other sites, I've discovered that the version of Transmageddon available in Ubuntu Software Center is outdated (v0.25) and the latest is v1.3.

So I bumped into this very helpful site (LINK), and followed the instructions on how to install the updated version of Transmageddon.

Here is a screenshot with xvid codec:
http://i.imgur.com/6pOMZke.png


deploy multiple wordpress sites with juju

You've got a few questions mixed in here, so I'll try to address each in turn, starting with the last one as it's the easiest to answer.

Can the charm deploy standalone html sites along side WordPress?

Yes, you can! This is functionality that currently exists within the structure of the charm, but you'll need to keep your "files" (WordPress themes, plugins, and static files) all in a repository. The charm exposes a configuration option wp-content, while a little deceiving, this option allows you to point to any Git, BZR, Mercurial, or SVN repository. In the root of the repo is where you'd place all additional files you want at the root of your WordPress install. For instance if you want to add a plugin "foo" and a static file named "client-login.html" you would structure your repository like so:

.
├── client-login.html
└── wp-content
    └── plugins
        └── foo

Then, you would use juju set wordpress wp-client=<url-to-repo>. You can learn more about this in the WordPress charm documentation under "wp-content". You can find and example of this on Githubtwo example repositories.

Take note that this won't be a separate website but static content within the WordPress site. If you're looking to host different websites, on different domains, within the context of the Juju Charm you'll need to create a new charm that would handle those scenarios

As for your second question,

Can we deploy multiple WordPress sites to the same machine?

This is a feature I wanted to add from the start but wasn't quite possible at the time. Now Juju has advanced far enough that this is possible and I'm working on making this possible. The workflow involves using Juju's Subordinate charms to allow you to deploy a base WordPress install with:

juju deploy wordpress-mu

Then, you would deploy a subordinate charm, wordpress-site, on top of this base. From there the charm would configure it with it's own wp-content, configuration, and apache/nginx configuration, but it would share the same core base. So the configuration options like domain, wp-content, and debug would be moved to this separate charm. In the end you could deploy multiple wordpress-site charms, each unique, on to the single wordpress-mu deployment and still scale wordpress-mu (which would in turn scale all other WordPress site deployments). An example of the commands follow:

juju deploy wordpress-mu
juju deploy mysql

juju deploy wordpress-site personal-blog
juju deploy wordpress-site professional-blog
juju deploy wordpress-site client-x

juju add-relation personal-blog wordpress-mu
juju add-relation professional-blog wordpress-mu
juju add-relation client-x wordpress-mu

juju add-relation personal-blog mysql
juju add-relation professional-blog mysql
juju add-relation client-x mysql

At the end of the day you still only have one server for WordPress but you've deployed three unique instances of WordPress to that server which you can control independently with Juju.


Just as an follow-up close this issue, it appears that there was failing hardware - Ubuntu was just more sensitive.  Windows eventually exhibited issues as well, although different.

Although the issue appeared to be with the track pad, ultimately it was the replacement of the keyboard/pointer stick mouse that resolved the issue.  The keyboard does connect into the track pad assembly on this model prior to connecting to the laptops motherboard.

Thanks.


dpkg: dependency problems prevent configuration

Use
RUN apt-get install -y /opt/scratch3-desktop.deb

instead of RUN dpkg -i ....


Via the menu option System --> Administration --> Users and Groups

Click on Advanced Settings (bottom right - under your account that is shown - there may be more than one user shown)

Click on User Privileges and check the box that says "Use floppy Drives"

Insert your floppy disk into your disk drive and then type in a terminal:

udisks --mount /dev/fd

Look on your desktop and the floppy icon should be there ready for you to access.

source


From what I see there you want to install Ubuntu on that 30 GB free space. Boot your PC from Ubuntu CD and choose something else when prompted to select partition. In the list click on your free space and then click the plus sign button to add a partition. Choose a size slightly larger than your RAM and select At the end option and use as Swap. Click Ok.

Now create the main partition by clicking the plus button again, but this time select ext4 filesystem and mount point as /. Check the Format box.

That's it. Click Install Now.

Here is a good tutorial.


Please help me install Ubuntu on my Acer Aspire 3

I had an interesting time installing Xubuntu on my new laptop.
I searched the internet, and found several answers to my problems, including a very good solution at this location:
forums.linuxmint.com/viewtopic.php?t=265615

Here is an explanation on how I installed Xubuntu on an Acer Aspire 3 A317.
This may also work for other models of Aspire 3 laptops, as well.
NOTE:  Acer may deny warranty on Aspire 3 laptops that have Linux installed by the end user.  They will only support the original OS provided with the laptop.
When you first start the laptop, out of the box, DO NOT go through the Windoze set up.  You must make some changes in the BIOS first.
NOTE:  If Windoze was set up before you make the changes to the BIOS, then it will not boot.  You may have to run a Windoze repair, in order to allow it to boot properly.
Step 1
Disable Intel RST and set system to use AHCI.
Power on the laptop for the first time, and enter the BIOS using the F2 key.
In order to make and save changes in the BIOS, you must set a Supervisor Password.
In the BIOS, go to "Security" - Set Supervior Password
(I used a simple 4 digit PIN, as I am the only one who will be using the computer.)
Go to the BIOS "Main" to enable Supervisor privileges, buy pressing "ctrl-s".
Select the "SATA Mode" and change from "Intel Optane" to AHCI.
Also, disable Fast Boot.
Step 2
Check your BIOS version.
It must be version 1.17 or later.  If it is not, you must go through the Windoze setup to upgrade it.
If you already have version 1.17, skip this step and go to Step 3.
Save the BIOS changes and boot into Windoze set up.
Do not connect a network cable to the laptop.
During setup, you can disable Cortana (Optional).
At the Network screen, in the bottom left corner, tell setup that you have NO INTERNET.
Select minimal options for Windoze.
Provide a user name and password.  The password can be optional, if you do not intend to use dual boot, as you will be erasing Windoze anyway.
You can now boot into Windoze and connect to your network.
Go to Acer Support and obtain the latest version of you BIOS.
Download and install the update.
Allow the system to boot back to Windoze, to ensure that BIOS update completes properly.
Step 3
If you intend to use Dual Boot, you must resize the storage partition on the hard drive.
Do not use gparted.
You must use the native Windoze disk manager.
If you have not done so, go through the Windoze setup, as described in Step 2.
If you do not want to save Windoze, skip this step and go to Step 4.
Open "Computer Management" in Windoze, and select the "Disk Management Tool".
Select the storage partition, (it's the largest partition on the disk.)
Shrink the partition to provide enough space to install Xubuntu.
Step 4
Set your install media as a trusted boot device in the BIOS.
Insert your installation USB into the laptop.
Restart the laptop and enter the BIOS using F2.
Go to the "Security" tab, "Select an UEFI file as trusted for executing" (Acer's grammatical error, not mine!)
Navigate to USB0\EFI\ubuntu\grubx64.efi and add it as a trusted boot option.
Go to the "Boot" tab and select the USB as the primary boot option.
Save changes and exit the BIOS.
Step 5
Boot the laptop with the USB install media, and install your favourite flavour of Ubuntu.
I prefer Xubuntu, with my own customized xfce desktop.
Post install, reboot the laptop, and go back into the BIOS.
Add HDD0\EFI\ubuntu\grubx64.efi as a trusted boot option in the "Security" tab, and set it as primary in the "Boot" tab.
Cheers!
Naught.
Acer Aspire 3 17.3" Laptop - Intel Core i5-1035G1/512GB SSD/8GB RAM A317-52-58ZK


Update: I rebooted using the trick Robert mentioned. The system kept freezing while booting, so I rebooted again and immediately held down the left shift key to get kernel options, and chose recovery mode. From recovery mode I ran dpkg which finished the installation; I can now boot normally and it seems to work.


How can I use Ubuntu server 14.04 to remotely access my homenetwork?

Here are your answers:

If you need maximum security I suggest to use a VPN. I suggest OpenVPN, you can find details over here: wiki - VPN. If you don't want to use VPN you can still open your router ports to web, please consider changing port numbers (for instance don't use port 80 for http)
For 'watching streams which are only available in The Netherlands' you should instead use a proxy (e.g. squid). For this you must take in account your NL home network bandwith, if it's too slow you won't be able to watch streams fluenty.


How to hide files without renaming them in Ubuntu 18 Nautilus?

OK I have solved it guys thanks everybody.

It seems like my problem was HOW I create the .hidden file.

it doesn't work if I copied any file (instead of creating a new one) & renamed it to .hidden and delete it's content & put the files names I want to hide in it.

I used to copy a .txt file & do that & that was my problem apparently.

Seems like I MUST create a new file using the terminal

touch .hidden

command to work.

Sorry for the disturbance.


19.10 and android mount : no such inteface org.gtk.vfs.Mount

There are several possible solutions:

Install MTP Tools via the command line. There are command line instructions online you can find for that.
Or, Download Android File Transfer (MTP) off of Software Packages. You can't launch the program itself because it contradicts other MTP programs, but it still solved the issue for me. Beats me why. 0_o
And if that doesn't work, you can enable your phone to automatically connect to any USB device. This was disabled in more recent Android versions for security reasons, and though it's a good idea, I've often found that my phone will randomly disconnect from my device, so I'll have to grant permission over and over again on my cell phone screen. Very annoying. You can enable an automatic USB connection by enabling the Developer Options in Android Settings (which is different for each manufacturer and model)- then by going to USB options.


Ubuntu install fails reporting insufficient space on Asus Eee PC?

With 11.10, at the end of the partitioning stage, make sure the EEE internal disk is selected for install, this should probably be indicated as sda under "Select drive" in the "Erase disk and install Ubuntu" window.


xulrunner is no longer available in the repositories for 12.04, but it's very easy to install the latest versions provided by the Mozilla Foundation here. Since these xulrunner releases are self-contained, we'll put them in the /opt directory.

Open the terminal with Ctrl+Alt+T
Type cd /opt
The below steps will automatically download the appropriate version of xulrunner based on the currently installed version of Firefox and whether your Ubuntu is 32-bit or 64-bit. (If you are running a Firefox beta, etc., please copy the URL manually from your browser and set XURL= to it (see below)

Copy and paste in the terminal, line by line:

FFVER=`grep -Po  "\d{2}\.\d+" /usr/lib/firefox/platform.ini`
ARCH=`uname -p`
XURL=https://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/$FFVER/runtimes/xulrunner-$FFVER.en-US.linux-$ARCH.tar.bz2
cd /opt
sudo sh -c "wget -O- $XURL | tar -xj"
sudo ln -s /opt/xulrunner/xulrunner /usr/bin/xulrunner
sudo ln -s /opt/xulrunner/xpcshell /usr/bin/xpcshell

xulrunner is now installed, and can be run with simply xulrunner from anywhere.

To uninstall it, simply remove the xulrunner directory under /opt, and the /usr/bin/xulrunner and /usr/bin/xpcshell symbolic links.


How to make super key only show Chrome window in current workspace in Ubuntu 18?

Gnome Shell Extension Multi Monitors Add-On solves everything!

Thanks


Weather Indicator - Can't apply location setting

It looks like a bug and you should report it on launchpad, as stated here. I can confirm I can reproduce this. Instead, you can try my-weather-indicator. Type in terminal:

sudo add-apt-repository ppa:atareao/indicators
sudo apt-get update
sudo apt-get install my-weather-indicator