You can upgrade inside of Ubuntu.

To do that, press Alt + F2 and run the following command:

update-manager -d

You should see a window similar to this:

Click on the 'Upgrade' button and start the upgrading process.


bash script dollar sign operator $ question - is it incompatible to ~ operand?

The tilde is not expanded when in quotes -- ref: https://www.gnu.org/software/bash/manual/bashref.html#Tilde-Expansion

So you want to remove the quotes:

str_getIdle_exe=~/Documents/Seb/Prjcts/Idle/getidle/src/getIdle

If the path under your homedir contains a space, just leave the tilde unquoted:

some_path=~/"dir with spaces/file with spaces"


Try using the Zentyal ISO instead of PPA. It worked for me. Can be downloaded here (3.4):
http://www.zentyal.org/server/


You can find the return code from the buttons in the special parameter $?, which holds the exit code from the last executed command. It can either be 0, 1, or 5, depending on whether the user pressed OK, Cancel, or timeout.
#!/bin/bash

calendarinput=$(zenity --calendar \
--title "Scheduler" \
--text "Pick a date" \
--ok-label "Done" --cancel-label "Agenda" \
--date-format "%A %d/%m/%y")

ret=$?

if ((ret==0)); then
    echo "Done"
else
    echo "Agenda"
fi

The expressions in an if-statement need to be separated with space:
if [ "$calendarinput" = "Done" ]; then

(It will also always evaluate as true, which makes it somewhat unnecessary).


While you can uninstall GRUB, that would mean you have to set up another bootloader and is probably not worth it. There is no reason to use another one since you just want the GRUB screen to be hidden. I believe that all of the other bootloaders work in similar ways, so you shouldn't worry about installing something else.

If what you want to do is hide GRUB. This is possible, and quite easy. Press Alt+F2 and paste this before hitting Enter: gksudo gedit /etc/default/grub.

A text-editor window will open, showing something like:

GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
#GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=”`lsb_release -i -s 2> /dev/null || echo Debian`”
GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”
GRUB_CMDLINE_LINUX=”"

Remove the two #s before GRUB_HIDDEN_TIMEOUT and GRUB_HIDDEN_TIMEOUT_QUIET. Save the file, open a terminal and run sudo update-grub. Reboot and you should have no GRUB window show up.

Also set GRUB_HIDDEN_TIMEOUT to 1 to avoid potential problems. GRUB will flash by, but it won't sit there for 10 seconds.

If you want, you can do this graphically.

Run these commands in a terminal window:

sudo add-apt-repository ppa:danielrichter2007/grub-customizer

sudo apt-get update

sudo apt-get install grub-customizer

Once that's done, search for and open GRUB Customizer.

Go to the General tab and deselect show menu and look for other operating systems. Click the refresh button (blue circular arrow near the top right) and then click save.

(NOTE: GRUB Customizer does not seem to support EFI/GPT based systems.)

Reboot and see no bootloader.

Source: http://ubuntuhandbook.org/index.php/2014/06/ubuntu-1404-hide-grub-menu/


/etc/network/if-up.d script with password prompt

Ok, so mainly you will want to do two things: add a prompt when you start your desktop session, asking for your password, and make a prompt each time the interface is brought up again.

So, you will need to use an Upstart session job to guarantee you that an X session is started and the DISPLAY variable is set. Session jobs go in ~/.config/upstart/, not /etc/init/, and they are run as a non-root user. You will need to make sure that your desktop sessions actually use Upstart as a session init. Unity definitely does this, some other Ubuntu flavors do as well. Just run initctl list-sessions to see if you have any Upstart sessions started to tell.

Anyway, here is the session job to use:

# change IFACE= to whatever interface it is, unless it is all interfaces.
# in that case just omit the IFACE=
start on desktop-start or :sys:net-device-up IFACE=eth99

task

# put your script in this location
exec /usr/local/bin/unilan-password

Also, you will most likely want to use Zenity to prompt the user, not an xterm. The following can be used instead of your bash command:

mypassword=$(zenity --entry --text="Enter University LAN password" --hide-text)

$(command) is just a nicer way to do command substitution than command, if you did not recognize it. Make sure you have the zenity package installed, of course.


Well, I found a solution.
Since the Social Security Administration chose to use this ancient format, others will likely encounter the same problem this year.
So I am posting this just in case others need the information.
The .action file format can be opened in LibreOffice Draw.
In my case, the document was cluttered with spurious text boxes, but I was able to select and delete them resulting in a fairly clean document which can be saved in PDF format.


You can use the package ssmtp to send emails. I am using this package to send me reports of my daily backups.

To install:

sudo apt-get install ssmtp

You will need to edit the files /etc/ssmtp/ssmtp.conf and /etc/ssmtp/revaliases to use your email account.

To test if it works, try to send yourself an email:

ssmtp <your email address>

Then type your message, press enter, and finally press ctrl+d.

For detailed instructions on setting up ssmtp, check out this article.


Is it possible to reverse the effect of bleach bit to fix my problem about an oversized folder?

Bleach bit creates temporary large files.

Are not deleted if interrupte.

Load the file manager with administrator permissions.(gksu - kdesu - sudo su)

Press Control + H

Find the files and delete them.


How to repair kernel error pcieport AER: P pcieport: device [8086:a110] error status/mask=00000001/00002000

AER

AER (Advanced Error Reporting) shows a correctable error on device 1c.0. According to sudo lspci -tv the misbehaving device might be your wireless 3165 card. Check to make sure you have the latest driver and firmware for this device.

Otherwise, if you see no outward signs of operational issues, and after scrutinizing /var/log/syslog*, you can do this to quiet the noise...

sudo -H gedit /etc/default/grub # edit this file

Locate the string "quiet splash" and change it to "quiet splash pci=noaer".

sudo update-grub # update GRUB

reboot # reboot the computer

Memory

Go to https://www.memtest86.com/ and download/run their free memtest to test your memory. Get at least one complete pass of all the 4/4 tests to confirm good memory. This may take many hours to complete.


gsettings not working from within Bash function

You're running your installation script with sudo but gsettings are a per user configuration system. that's why you're no seeing any change.

Try without sudo (as a normal user) and it should work.


Use specified quantifier in grep to retrieve satisfied vocabulary

Note that GNU grep supports \w for matching word characters (alphabets, digits and underscore), so you could easily match only word characters in the part between the asterisks:

grep -o '\*\*\w*\*\*'


Dual monitor extended desktop in Lubuntu

After researching it thoroughly, here are the steps to achieve this (terminal commands in grey):

xrandr -q (to display info about displays, including the names. Mine are VGA-1 and DVI-I-1, used below)
xrandr –-output VGA-1 –-left-of DVI-I-1
Right click on the taskbar (panel) and choose panel settings
Enter the horizontal resolution of the left monitor in pixels in the margin box (this will move the taskbar to the right screen), and make sure the bottom edges of the two monitors are lined up so the taskbar is visible on the right monitor.
cd ~/
cat > .xsessionrc (creates a text file named .xsessionrc that will persist your settings through restarts)
Hit ctrl-D to exit text entry
arandr (If not installed, sudo apt-get install arandr)
Adjust monitors position, apply and save layout
Open the layout file and copy the contents, then close
gedit .xsessionrc
xrandr –-output VGA-1 –-left-of DVI-I-1
Paste contents previously copied
Save and close
Restart machine!


Copy dialogue freezes at 0 seconds forever when copying to a USB flash drive

So for me it was a simple question of waiting, letting it hang on '0 seconds left' until it eventually finished and changed to 'copied'. Looks like the file manager indicator can get pretty inaccurate and the whole workings were also explained at Gnome, nautilus copy files to USB stops at 100% or near.


You can press Alt+F2, then type unity, then press Enter to restart Unity.

Or you could use:

sudo service gdm restart

On 14.04 and 14.10 use:

sudo service lightdm restart

On 15.04 and 15.10 use:

sudo systemctl restart lightdm.service


Are CLI commands available for Ubuntu Touch’s SMS, Phone and Camera service? If so, what are the commands and where are the man pages for them?

You can send SMS by commandline doing:

/usr/share/ofono/scripts/send-sms /ril_0 <target phone number> "your Text" 0

I think

/ril_0

represents SIM-Card 1, whereas

/ril_1

represents SIM-Card 2 (if you have two installed). Or in other words, the SIM-Card which will be used to send out the sms.
I don't know if there are man-pages, i didn't look for it yet.

Maybe interesting concerning scripting and sending SMS:

Thread "battery 83% to 0% in 1 hour of not using the BQ" on Ubuntu-phone mailing list.


How to install custom plymouth in cubic?

I found the answer here : https://answers.launchpad.net/cubic/+question/688169

The links (in cubic chroot) /boot were broken. Apply the following command to repair the links (This will create a new option (that you have to select) in cubic available kernels):

apt install --reinstall linux-headers-5.4.0-26 linux-headers-5.4.0-26-lowlatency linux-image-5.4.0-26-lowlatency

then :

update-alternatives --install /usr/share/plymouth/themes/default.plymouth default.plymouth /usr/share/plymouth/themes/mytheme/mytheme.plymouth 200
update-alternatives --auto default.plymouth
update-initramfs -u
update-grub


Rinzwind is right, vnstati generates images. But there is a script also which is written in Perl and uses vnstati. I have found that script after downloading source code of vnstat from here. It is called vnstat.cgi and is located under the folder called examples. You need just configure webserver to run cgi and it outputs the same images as in http://humdi.net/vnstat/cgidemo/ page.


How to run a script 4000 time for files names from 1 to 4000 in order?

It will be best to have an argv if possible. I don't know if pml scripts can be given an argument from the terminal. Else you can use this hack to change the pml script from bash/terminal or from .sh script where you are running this. Which will change the pml script accordingly before you run it.

for i in {1..40000}
do
    echo Evaluating for i = $i

    # change the script
    sed -i "s/.*load.*/load $i.pdb;/g" test.pml # Change the text inside the file
    sed -i "s/.*save.*/save $i.png;/g" test.pml # Change the text inside the file

    # <code to run the pml file>

done

Let me know if this helped :)

Edit after comment:

To differentiate between load commands put and extra space iniitally in the first line of pml script and use this.

sed -i "s/.*load  .*/load  $i.pdb;/g" test.pml # Change the text inside the file


Where can I see partitions I divided during installation?

Install the gparted package. One way to do this is in the Terminal:

sudo apt-get install gparted

Then run GParted, and you will see your partitions.


What is the maximum audio bitrate humans can distinguish?

Bit rate per se is not distinguishable because it's not a measurement of the audio information that we hear. It's the size of information after the encoder removes what it considers inaudible (and thus, "disposable" with no or minimum perceived quality loss).

Good encoders have good psychoacoustic algorithms, meaning they wisely choose how to remove high frequencies and frequencies whose amplitude is too small to be perceived, and then packs the "chopped" wave in the given bitrate. The higher the bitrate, the less an encoder needs to chop off from the original audio.

But how distinguishable are the removed parts have more to do with the decisions made by the algorithm (its psychoacoustic model) than with the actual bitrate. Poor encoders (like ancient Xing) will need a higher bitrate than a good one (like a modern LAME) to achieve the same level of perceived quality. Because given the same bits, it chose poorly what to encode and what to discard.

So do not think of MP3 bitrates the same way you think of a CD bitrate. In a CD, the analog sound wave is just digitally encoded, nothing is removed. So the more bits you have the more accurate your sound wave will be. You have a 1-1 mapping from bitrate to perceived accuracy. That is not possible with MP3 (or OGG) encoding, or any lossy encoding that relies on psychoacoustic models.

Also, "distinguishable" is subjective: human hearing and high-frequency sensitivity deteriorates with age... so you may enjoy 96kpbs now, but 10 (or 20) years ago you would certainly "need" more. Different people distinguish high-frequencies (or small amplitudes) differently.. so for them a given encoder might be better than another one, even with a lower bitrate. Also, the equipment and environment plays a key role: listening to music in a car in the road is not the same as in a quiet room with  high-quality headphones.

There are other factors too... specially VBR... which means the bitrate constantly changes... going up to 320 for parts of the song that require more complex encoding, and going down to 96 where nothing needs to be removed. So a VBR file of 128kpbs average will usually have much higher quality than a 160 (or even 192) constant bitrate (CBR) one.

That said, a 128kpbs VBR is perfectly fine for me, even using good-quality headphones. For CBR, 192 is enough for transparency (meaning I cant distinguish from original, lossless CD audio). I'm 33, and not an audiophile, so your mileage may vary.

An analogy:

A good analogy came to me now.. it may help understand why it's impossible determine that "X kbps is more than the human ear can distinguish":

Think of audio as a house and its furniture. You're moving to another house. Your moving truck is your bitrate: the larger it is, the more furniture you will be able to pack to your new home. But since it's a one way trip and the truck isn't big enough to hold everything, something will always be left behind, and therefore lost.

Will you be able to distinguish that something was lost?  Do you agree that it depends a lot more on what was chosen to be left behind than how big the truck was, even tough a bigger truck will indeed help?

Do you agree that it's impossible to measure how big the truck must be so its "indistinguishable", unless the truck is big enough to hold all your furniture? (that would be lossless encoding, like FLAC. And that's about 5 times bigger than the largest MP3).

Final words:

Some may say that objective measurement on human hearing thresholds is possible. True, you can measure human ear for how high a frequency must be to become inaudible, or how many dB a given sound can be below the "dominant" one for it to be indistinguishable. But you can not directly translate that into bitrates, because how many bits are required to encode (or discard) that depends on how much of it is present on a given song.


I managed to get it to work following the first part of this link: https://devtalk.nvidia.com/default/topic/936429/-solved-tensorflow-with-gpu-in-anaconda-env-ubuntu-16-04-cuda-7-5-cudnn-/

$ sudo add-apt-repository ppa:graphics-drivers/ppa
$ sudo apt-get update
$ sudo ubuntu-drivers autoinstall
$ sudo reboot

Later:
> Software & Updates > Additional Drivers
Change from nvidia-364 (open source) to "Using NVIDIA - version 361.42 from nvidia-361 (proprietary)

A second issue I had with 16.04 was that suspending/resuming was not working (i.e. Close lid or FnF1 in Asus UX303UB). The only way I found to fix it and at the same time get the nvidia drivers to work was to use Kernel 4.5.4:

$ wget kernel.ubuntu.com/~kernel-ppa/mainline/v4.5.4-yakkety/linux-headers-4.5.4-040504_4.5.4-040504.201605120823_all.deb
$ wget kernel.ubuntu.com/~kernel-ppa/mainline/v4.5.4-yakkety/linux-headers-4.5.4-040504-generic_4.5.4-040504.201605120823_amd64.deb
$ wget kernel.ubuntu.com/~kernel-ppa/mainline/v4.5.4-yakkety/linux-image-4.5.4-040504-generic_4.5.4-040504.201605120823_amd64.deb
$ sudo dpkg -i linux-headers-4.5.4*.deb linux-image-4.5.4*.deb

Be careful with using newer kernels (4.6..) because it seems that NVIDIA drivers dont compile yet:
https://www.reddit.com/r/linuxmint/comments/4jqvip/psa_nvidia_drivers_will_not_compile_against/

At least when I tried 4.6, it didnt work in my notebook. Maybe it is a good idea to check again and this will surely change soon.


If you want to write the output of xgettext to a specified file, use or -o, or --output, no both of them in the same time (in your case, xgettext will "think" to save the output in --output='/home/public/sample' which obviously can't be a file).

So, this will be correct:

xgettext -n *.php -o '/path/to/output_file'

which is equivalent with:

xgettext -n *.php --output='/path/to/output_file'

If you want that the output files to be placed in a specific directory, use:

xgettext -n *.php -p '/path/to/output_dir'

or, equivalent:

xgettext -n *.php --output-dir='/path/to/output_dir'

Also, be sure that /path/to/output_file file or /path/to/output_dir directory exists.

See also man xgettext.


How to install Ralink RT5390 wireless adaptor driver in ubuntu 16.04

See section " PCI (internal) wireless adapter "
in
https://help.ubuntu.com/stable/ubuntu-help/net-wireless-troubleshooting-hardware-check.html#pci

#

https://help.ubuntu.com/stable/ubuntu-help/net-wireless.html


Fresh install of Ubuntu 13.04 with only one partition: can I add a /home partition now?

This link will help you create your /home folder after installing Ubuntu...

http://www.howtogeek.com/116742/how-to-create-a-separate-home-partition-after-installing-ubuntu/


What fast image viewers are available for Ubuntu?

GPicView
I'll recommend to you this Simple and Fast image viewer.
As you say that you computer is not a super fast calculator you should look for software with a few functions (the fewest possible), and this software meets this requirement, see the next screen-shoot and you will notice it.

You can install it through the Software-Center.


cat vs grep vs awk command get the file content which one is more efficient and less time consuming?

The answer is "yes". Initially, this is more of an assertion, since cat is merely reading the file, whereas the other two are scanning it for an expression. Your time scripts are the right idea, but at these extremely low durations, any small variance will give erroneous results. Much better to use a larger file, or to repeat it multiple times.
$ time for i in {1..1000}; do cat temp.txt; done
...
real    0m0.762s
user    0m0.060s
sys     0m0.147s

$ time for i in {1..1000}; do grep "$" temp.txt; done
...
real    0m3.128s
user    0m0.667s
sys     0m0.263s

$ time for i in {1..1000}; do awk "/$/" temp.txt; done
...
real    0m3.332s
user    0m0.720s
sys     0m0.337s

Also (not shown), I ran the above commands multiple times to confirm that each command ran at about the same time, and hence was replicable.
More benchmarks
As per the comments, here are some more commands I tested. On my system, grep "^" and awk "1" had no appreciable increase in efficiency, although sed "" approached cat.
$ time for i in {1..1000}; do grep "^" temp.txt; done
...
real    0m2.992s
user    0m0.527s
sys     0m0.303s

$ time for i in {1..1000}; do awk "1" temp.txt; done
...
real    0m3.185s
user    0m0.570s
sys     0m0.317s

$ time for i in {1..1000}; do sed "" temp.txt; done
...
real    0m0.983s
user    0m0.077s
sys     0m0.193s


Why isn't it possible to run Mac software?

The best we got was an attempt in 2007-ish called mac on linux as a virtualization tool to run Mac OS.

If there was ever a need to built a wine version for Mac (would that be called mine?) it probably would have been created by someone already. I doubt someone could not make it but I guess that

there is not enough software that is Mac-only to make it worth while.
too few Linux users care for Mac software.

Basically there seems no need for it.

1 more issue: you are not allowed to run Mac OS software legally on non Apple hardware.
Someone who creates it will get sued in an instant and no one will be able to ship it with their OS.

Edit: http://opensource.apple.com/ provides the iOS and Mac OS kernels, which are licensed under free software licenses (it is legal to run on your non-Apple, since otherwise it would be non-free). Basically it is illegal to run the Mac OS itself on non-Apple hardware, but legal to run software based on Mac OS on non-Apple hardware.


Doesn't user GUI friend but true UNIX-way:

http://en.wikipedia.org/wiki/Radiance_%28software%29
http://www.linuxjournal.com/article/6479


How to resize a partition (to make my Ubuntu partition bigger) without losing any data?

Under Windows, you could use the Disk management utility (search for that term and Windows will propose the Create and format disk partitions). From there you can resize NTFS partitions (provided there is sufficient empty space on the disk as pointed out by @oldfred in the above comment).

Another solution which I prefer is to use a GParted live image where you can resize any type of partitions. In my opinion, it is probably safer to use this solution as you have mixed partition types.


Can't boot/install 20.10 on Apple Mac Pro 2019 7,1 (PopOS neither)

I’m not sure if this is true for all Apple T2 machines, or even all 2019 Mac Pro’s, but the boot parameter I need to pass was intel_iommu=on.
Now it’s on to getting grub to play nice...


How do you install nvidia divers if it is not shown in additional drivers and and when installed how to get it to work?

Here's an another way you can follow to install the drivers when it is not shown in additional drivers menu
Note: You need to reinstall the driver if there is an kernel update.
Source of this info: here
Install NVIDIA Graphics Driver via runfile
Initially remove all the previous Nvidia drivers (Important)
sudo apt-get purge nvidia*

# Note this might remove your cuda installation as well
sudo apt-get autoremove

Download the required driver from Nvidia website
Install dependenices
For Ubuntu, installing the following dependencies is enough.

build-essential -- For building the driver

(Optional) gcc-multilib -- For providing 32-bit support

dkms -- For providing dkms support

As a summary, All the above packages can be installed using this command sudo apt-get install build-essential gcc-multilib dkms
Create Backlist for Nouveau driver
Create a file at /etc/modprobe.d/blacklist-nouveau.conf with the following contents:
blacklist nouveau
options nouveau modeset=0

Then,
for Ubuntu 14.04 LTS, reboot the computer;
for Ubuntu 16.04 LTS, excute sudo update-initramfs -u and reboot the computer;
Stop lightdm/gdm/kdm
After the computer is rebooted. We need to stop the desktop manager before excuting the runfile to install the driver. lightdm is the default desktop manager in Ubuntu. If GNOME or KDE desktop environment is used, installed desktop manager will then be gdm or kdm.
For Ubuntu 14.04 / 16.04, excuting sudo service lightdm stop (or use gdm or kdm instead of lightdm)
For Ubuntu 16.04, excuting sudo systemctl stop lightdm (or use gdm or kdm instead of lightdm)
Excuting the Runfile
Enter the tty and enter these commands to execute the file
cd ~
chmod +x NVIDIA-Linux-x86_64-384.69.run
sudo ./NVIDIA-Linux-x86_64-384.69.run --dkms -s

These errors can be safe to ignore
WARNING: nvidia-installer was forced to guess the X library path '/usr/lib' and X module path '/usr/lib/xorg/modules'; these paths were not queryable from the system.  If X fails to find the NVIDIA X driver module, please install the `pkg-config` utility and the X.Org SDK/development package for your distribution and reinstall the driver.

Check the Installation
After a successful installation, nvidia-smi command will report all your CUDA-capable devices in the system.
Hope this helps and please upvote if you find useful


Ubuntu 14.10 dual boot with preinstalled Windows 8

Chances are you've got two problems....

Mixed-mode install

You wrote:

  I turned off Secure Boot in my BIOS and changed the mode from UEFI to LEGACY mode

A lot of pages recommend disabling EFI/UEFI mode and enabling BIOS/CSM/legacy support, but it's BAD ADVICE. The problem is that your computer with Windows 8 pre-installed boots Windows in EFI/UEFI mode. Doing as you described means that you probably installed Ubuntu in BIOS/CSM/legacy mode. Those two boot modes don't get along very well; switching boot modes requires either changing them in your firmware (as you've done, or maybe via the built-in boot manager, if its user interface supports this) or using a third-party boot manager (AFAIK, my own rEFInd is the only one that supports this) to switch boot modes on the fly. At best, this is awkward. At worst, it's impossible -- some EFIs don't support making such switches manually.

At best, you can fix the damage done by using Boot Repair -- but this can work only if you boot it in EFI mode, and even if you boot it in this way, it's not guaranteed to work. It may be just as easy to disable BIOS/CSM/legacy support and re-install Ubuntu.

Note that Ubuntu should install fine with Secure Boot enabled. Disabling it is required on a small minority of computers or if you're dual- or triple-booting with an OS that doesn't support Secure Boot. It's probably best to at least try installing with Secure Boot enabled and disable it only if you run into problems. Note that if you get as far as a GRUB menu, Secure Boot is not a problem.

Sony VAIO flakiness

Some EFIs, including those used by Sony, are broken. They forget their boot order or EFI boot manager entries, and instead boot straight to Windows. There are various workarounds to these problems, which have been covered in other questions here and elsewhere, such as the ones noted by oldfred:

How to fix dual-booting Windows 8 and Ubuntu 14.04 on a Sony Vaio?
Sony VAIO with Insyde H2O EFI bios will not boot into GRUB EFI

I haven't thoroughly re-read those questions today, but on skimming them, they appear to both assume that Ubuntu was installed in EFI mode, so you'll need to re-install or fix your BIOS/CSM/legacy-mode installation before proceeding.

Note, however, the word I used above: broken. Yes, you can work around problems like this. Do you really want to, though? Would you accept a brand-new car that will start only when the temperature is above 70 degrees Fahrenheit? Would you accept a hammer that will be damaged by hammering nails made of metal? It's the same thing with an EFI that can't remember its boot settings. Manufacturers won't pay attention to such problems unless their figurative noses are shoved into the figurative messes, and that can only be done by returning defective devices and letting the manufacturers know of the problem. Thus, if your computer is new enough and if this is part of your problem, I strongly recommend that you return it and buy something that actually works.


Use git or download several versions of dtrace here. I found these Installation instructions:

git clone "https://github.com/dtrace4linux/linux.git" dtrace
cd dtrace
tools/get-deps.pl
make all
make install
sudo make load

Sidenote:
A comment on brainstorm claims you could do the same with these 3:

pTrace
uTrace
systemtap


Error in Netbeans: "Cannot find an HtmlParser implementation for HTML5"

I had a very similar problem with my php application; it said please wait... at the top of the page and wouldn't let me edit the file properly.

I realised that NetBeans thought the project was in HTML5 which isn't supported by NetBeans 7.0.1 so I clicked on "please wait..." and selected to use an older version of HTML as the project's default. Hey presto, worked straight away!


What and where to search logs for discover the reason of a spontaneous logout?

In that case you can check in \etc\var\messages where you can find all logs related to log-on and log-off events with the time stamp and reason for the same.

You can also use any of the below commands to view the messages file.

tail -f /var/log/messages
more /var/log/messages
cat /var/log/messages
less /var/log/messages
grep -i fail /var/log/messages

If it is hard to interpret that log file past it here and will tell you what you need to check, to get this problem resolved.


FGLRX disturbs TTYs and Plymouth graphics

Turns out is is some strange incompatibility with fglrx in HP's UEFI BIOS:

If I only use Legacy BIOS, the bootsplash is shown correctly
If I use UEFI BIOS with Legacy support, the bootsplash is always 1024x768, no matter which resolution
If I only use UEFI BIOS, the screen is distorted, as seen above, except when I choose 1024x768.

Unfortunately, there is no fix for this (except using Xorg's driver) (And I can't even do a BIOS upgrade, because the exact same computer model is needed, but with Windows, to create the upgrade EFI file... VM's don't work)

Update: After a BIOS update, the problem does not occur anymore once the fglrx/radeon driver is actually loaded, so by embedding it in the initramfs, the problem can be circumvented easily.


You can use CTRL+ALT+X on at least xfce to force close a program. If that doesn't work, try adding a shortcut to xkill in your shortcuts menu. If the keyboard just completely doesn't work, you might have to restart the computer.

What are you using to run unity? There may be a problem with that because I've never had my keyboard break through the playonlinux script.


It depends on how you have configured replica set
i) One server with 3 members
OR
ii) 3 server one for each member

If yor are running one server with 3 member follow the following steps
when you first fire rs.initiate() check hostname and port in the output of the following command.
and type that hostname with different port No.
rs.add("hostname:port")

OR

If you are running 3 server one for each member steps are
1) Disable firewall
2) in config of mongod under net --> bindIP: 0.0.0.0
and then try to add member in the current replicaset.


Why failing to install ubuntu on Asus g551 laptop

The Ubuntu installer will detect existing OS on your computer and offer an option to install Ubuntu alongside your existing OS.

When you select that option, it will automatically setup the boot manager for you so it will display a selection screen for what OS you want to boot when you turn on the computer.

To have a dual-boot Ubuntu/Windows configuration, the easy way is to install Windows first, and then install Ubuntu.

In any case, make sure you read the installation instructions for Ubuntu, your question and the necessary steps are covered in detail there.


"Show applications" shows previous version of software

First install Main Menu (aka alacarte) application either from Ubuntu Software or by running

sudo apt install alacarte

Then follow the steps below.

Launch Main Menu from Show Applications and look for Pycharm. You'll probably find it under the Programming category.
Once found, right click on it and select Properties. A dialogue box should pop up.
Enter the /path/to/the/.sh (full path like like /home/YOUR_USERNAME/Desktop/... etc.) in the Command box and click on OK.

Logout and login again. Now you should be able launch the new version from Show Applications.


Before you proceed it should be noted that xpra package is already included in official Ubuntu repositories (in the universe pocket). So you can simply get version 2.1.3 on your Ubuntu 18.04 LTS with simple commands like:

sudo add-apt-repository universe
sudo apt-get install xpra

If you really need to add their repository - proceed with the following commands:

# add GPG key
wget -q https://xpra.org/gpg.asc -O- | sudo apt-key add -
# add XPRA repository
sudo add-apt-repository "deb https://xpra.org/ bionic main"
# install XPRA package
sudo apt-get install xpra

and you will get the latest version from xpra.org.


I recently dual booted kali linux alongside Ubuntu 18.04.....However I'm not getting any option to select the os......How can i fix it?

Just boot up Ubuntu and run the following command to update your Grub menu:

sudo update-grub

Then, reboot.


How to delete tomcat8 and related files like docs examples admin?

Follow this on the command line

sudo apt remove --purge tomcat8 tomcat8-docs
sudo apt autoremove
sudo apt autoclean

Use the above to purge any app from your system including config files.

Once this is complete you can use something like find or locate to remove any remaining stragglers.

sudo apt install locate && sudo updatedb
locate tomcat

And you can manually delete anything that might remain.


Is an internal HDD with Ubuntu automatically bootable from an external USB case?

Because of the internal USB to SATA bridge adapter used inside of external disk drive cases, transplanted disk drives may require reformatting before they can be used... so the answer is "maybe".

Some of the older/cheaper cases have limitations on how large a drive it will support. Usually if you're under 1TB you should be fine.

"Standard" Windows won't boot from an external USB drive. On the Ubuntu side, if you've edited /etc/fstab, and used device names (ie:/dev/sda2) in your mount statements, instead of UUID's, then there may be a booting problem as device names can change depending on your current hardware configuration, UUID's don't change.

If you cloned from HDD to SDD, you'll probably have to disconnect the HDD or you'll have booting problems because the UUID's are duplicated on both drives. You can change the UUID's on one of the drives using sudo blkid and (sudo tune2fs or gparted) such that there are no duplicated UUID's.

On a hardware note, I've had really bad luck with Orico external cases. I just sent back two to Newegg because they didn't work. Another case, using the same disk drive, worked fine.


Why won't ssh-agent save my unencrypted key for later use?

Even if agent is up, if certain environment variables are not set, you have no reference to agent. Furthermore, even if it is all ok, agent and variables, the identity are not automatically sent to agent: that is a task for ssh-askpass, working only in X sessions.

If you are using bash, create the file ~/.bash_profile with this content:

# File: ~/.bash_profile

# source ~/.profile, if available
if [[ -r ~/.profile ]]; then
  . ~/.profile
fi

# start agent and set environment variables, if needed
agent_started=0
if ! env | grep -q SSH_AGENT_PID >/dev/null; then
  echo "Starting ssh agent"
  eval $(ssh-agent -s)
  agent_started=1
fi

# ssh become a function, adding identity to agent when needed
ssh() {
  if ! ssh-add -l >/dev/null 2>&-; then
    ssh-add ~/.ssh/id_dsa
  fi
  /usr/bin/ssh "$@"
}
export -f ssh

# another example: git
git() {
  if ! ssh-add -l >/dev/null 2>&-; then
    ssh-add ~/.ssh/id_dsa
  fi
  /usr/bin/git "$@"
}
export -f git

modify the file name ~/.ssh/id_dsa following your needs, and add this line to ~/.bash_logout

# stuff to add at end of ~/.bash_logout
if ((agent_started)); then
  echo "Killing ssh agent"
  ssh-agent -k
fi

A last note: this do not interfere with a gnome session, because in that case only ~/.profile is sourced, and you can benefit from the ssh-askpass graphical interface that ask for a passphrase and send it to the ssh-agent.


No, this is not possible.

There are 2 sorts of scripts:

scripts that are started as part of the system and affect all users.
scripts that are started when you log in as part of your own session.

Both do not have a keyboard switch to turn them off or on on the fly.


What archive type are ubuntu click packages?

Neither deb or rpm packages are zip files. Instead deb packages are ar archives and rpm packages are compressed cpio archives.

Click packages are deb packages with some additional content. You can read the official specification here.


I cannot format my flash usb stick - newby user

You will need to unmount the disk before formatting it. You can do this by clicking on the eject icon next to drive in Nautilus:

You can then right-click on the drive to format it. If you still face problems, try using a more advanced partitioning tool like GParted that will tell you why things aren't working as you expect.


If you're experiencing issues with your Kindle mounted as read-only it is probably due to some errors in the file system.

Find the folder of your device typing mount

In my case the output is:

/dev/sdc1 on /media/Kindle type vfat (rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks)

meaning that I have to correct the filesystem on /dev/sdc1

You can do that using fsck: sudo fsck.vfat -r /dev/sdc1

If you get ask which partition you want to correct select the first by pressing 1
and continue.

Unmount your Kindle and remove and plug again the USB cable, you should now be able to send and copy files from calibre to your device.


I have a similiar experience on a HP 2760p Elitebook after reboot.

The manual workaround for me is to switch to the text console with ctrl+alt+f1 and go back to X11 with ctrl+alt+f7.

This magically reinitialize the mouse :-)


Is there any Software to add watermark to photos in bulk?

Are you comfortable on a terminal? If so, that is by far your easiest option.

Take a look at the various methods associated with the ImageMagick toolchain. Something like this will be your best bet (reproduced below). The example provided would add a watermark.jpg on top of the image at 30% opacity.

EDIT: As liori pointed out in the comments, beware using this on anything with spaces or special characters in your filenames. It can have unexpected effects. Generally, it's safest if you only use numbers, letters, dashes, and underscores in filenames.

for pic in *.jpg; do
    composite -dissolve 30% -gravity south watermark.jpg $pic ${pic//.jpg}-marked.jpg
done


Materials for improving coding skills and adapting programs

Source code of all programs which Ubuntu is composed from is not stored in one central location because it is developed and maintained by thousands of independent developers. So it would be easier to choose a project you're interested in and then trying to find its source.

Example: from the top of my head, I decided to find the source repository of Transmission, the BitTorrent client shipped with Ubuntu. A short Google search lead me to http://www.transmissionbt.com/ where, in the Download section, I found a source tarball. You can download it, read compilation instructions, try to compile, then read the code and possibly try to tweak it. Hours of fun guaranteed.

I couldn't find SVN/Git repository for transmission, but many projects are hosted on sites like github, launchpad or Google Code so their repositories are publicly available. For such projects, it's reasonably easy to push your changes back to the official repository in case you add a useful feature or fix a bug.

If you want to start your own project, Ubuntu Developer portal has extensive documentation on using Quickly, a tool for creating applications using Python and pyGTK


Chronological list of installed packages

This command will show you the list of installed software in chronological order.

ls -l --time=ctime --time-style=long-iso /usr/share/applications|sort -r -k6|grep "\.desktop"|sed s/'\.desktop.*'//g|awk '{print $6" "$7" "$8}'

The output will be like

2015-03-09 17:36 eclipse_java
2015-03-09 17:34 eclipse_cpp
2015-02-27 17:34 system-config-printer
2015-02-27 17:34 nautilus-home
2015-02-27 17:34 nautilus-folder-handler
2015-02-27 17:34 nautilus
2015-02-27 17:34 nautilus-connect-server
2015-02-27 17:34 nautilus-classic
2015-02-27 17:34 nautilus-autorun-software
2015-02-27 17:34 mount-archive
2015-02-27 17:31 unity-activity-log-manager-panel
2015-02-27 17:31 firefox
2015-02-27 17:31 compiz
2015-02-27 17:31 ccsm
...
...
...
...
2014-08-14 18:15 eog
2014-08-14 18:15 empathy
2014-08-14 18:15 deja-dup-preferences
2014-08-14 18:15 deja-dup
2014-08-14 18:15 debian-xterm
2014-08-14 18:15 debian-uxterm
2014-08-14 18:15 credentials-preferences
2014-08-14 18:15 cheese
2014-08-14 18:15 checkbox-gui
2014-08-14 18:15 brasero-nautilus
2014-08-14 18:15 brasero
2014-08-14 18:15 baobab
2014-08-14 18:15 apturl

As far as size of software is concerned, it is difficult to say what the size of software will be, as the files are spread in many places and are many times shared between softwares.


TPM

TPM stands Trusted Platform Module and you can read more about it on Wikipedia (TPM on Wiki). The chip when present on the motherboard is used for securely producing cryptographic keys and securing the hardware components. Several laptop motherboards (and many desktop boards) have such TPM chips.
The message you receive means: Either the chip is available but not recognized or it is absent. The message itself is harmless.

For your system, from the specs I see that there is a TPM chip (ver 1.2) onboard.

You can check in your BIOS under security or trusted computing section for TPM and deactivate it. Most probably this will stop the errors.

ASPM

ASPM stands for Active State Power Management whose purpose is to save power in order to extend battery life on portable devices like laptops. It instructs PCIe components to go to low power mode to save power. The parameters controlling ASPM are controllable (which by default should be on ON state).

To set the parameter for ASPM you can

First understand how to try entering kernel boot parameter here on Ubuntu Wiki.
Next you can try temporarily adding the boot parameter to resolve your issue. You will need try out several parameters and get the one which works for you.

These are the kernel parameters which you can try :

Disable ASPM:

pcie_aspm=off

Use default firmware configuration:

pcie_aspm=default

Disables ASPM and clock power management (bad for battery life):

pcie_aspm=performance

Highest power saving mode, enable ASPM and clock power management:

pcie_aspm=powersave

Force ASPM on:

pcie_aspm=force

Force ASPM on while trying to maximize saving power:

pcie_aspm=force pcie_aspm.policy=powersave

Once you got it working make the change permanent according to the link attached (for kernel boot parameter).


Fan working non-stop on a Dell Inspiron 5110

ironhide and bumblebee by MrMee  are not maintained any more and cause many problems.
The only reliable solution is to use Bumblebee from http://bumblebee-project.org. Though the name is same it work in very different way and its more reliable I am using it in my Dell XPS 15 with Nvidia 540m.
Since your question doesn't clearly say whether you have upgrade from 11.10 to 12.04, I will assume the following

You have done a fresh install in 12.04 and no other software is installed. Follow instruction here https://wiki.ubuntu.com/Bumblebee#Installation
If you have installed anything from this page https://github.com/MrMEEE,  do a fresh install of 12.04, and follow step 1

You have ironhide installed and upgraded from 11.10. Read here for cleaning up and upgrade instruction -> https://github.com/Bumblebee-Project/Bumblebee/wiki/Upgrading-on-Ubuntu


The tool you're looking for is called 'xrandr' and you can use it to dynamically resize the screen/resolution depending on how you want to run it. I would wrap my Unity script in some xrandr commands that will resize, launch unity and then restore the resolution upon exit.


Ubuntu installer is not recognizing any partition on SSD

Open gparted on your USB Ubuntu (try software option). I dentify the partition. It has to be formated to Ext4. You then have to set it as root directory "/". When istalling you may have to choose this partition as "something else", that is, not overwrite everything whith Ubuntu.


How can I create a 30 second GIF from a long random video?

Steps:

Get duration with ffprobe.
Use duration as a value in the select filter.
Create gif.
Script everything.

Example script:

#!/bin/bash
mkdir 30gif
for f in *.mp4; do
  duration=$(ffprobe -loglevel error -show_entries format=duration -of default=nk=1:nw=1 "$f")
  ffmpeg -i "$f" -filter_complex "[0:v]select='lt(mod(t,${duration}/10),3)',setpts=N/(FRAME_RATE*TB),scale=560:340:force_original_aspect_ratio=decrease,pad=560:340:(ow-iw)/2:(oh-ih)/2,setsar=1,split[v0][v1];[v0]palettegen[p];[v1][p]paletteuse[v]" -map "[v]" "30gif/${f%.mp4}.gif"
done

This fulfills your many requirements:

Output 30 second GIF comprising of 3 second segments equally spanning input duration
560x340 output size
One (ffmpeg) command
Using a bash for loop so you can automatically convert hundreds of videos
Output name is same as input name but with .mp4 replaced with .gif


It's a "snap" issue - if you use the "snap" version of Ubuntu, you will not be able to "see" any fonts you have installed in Ubuntu.

Close LibreOffice, if it is open.

Open Terminal - hold "Ctrl", "Alt" and press "T" - then enter:

sudo fc-cache -fv

Change your "working" directory - that is, where you are in Terminal - to that of LibreOffice:

cd ~/snap/libreoffice/current

Create a symbolic link ("shortcut") to your font folder:

ln -s /home/your-ubuntu-username/.local/share/fonts

Then run this command:

ln -s ~/.fonts .fonts

This should work (it did for me just then!) and I've tried to make it as easy to follow as possible - but you don't feel comfortable using Terminal commands, you can always switch to the "regular" version of LibreOffice...

Open Ubuntu Software and search for "libreoffice" - remove the one that has references to "snap" or "snapcraft.io" when you click on it (i.e. on the page that has the picture, description, etc...) - it should have these references under the "Details" section towards the bottom.

Hit the "back" arrow and install the "regular" version of the LibreOffice programs you need to use - these should not contain any references to "snap" or "snapcraft.io" under the "Details" section at the bottom.


Sum of text source delimited by whitespace

This should do the trick:

cat foo | awk '{ SUM += $1; SUM1 += $2; SUM3 += $3} END { print SUM, SUM1, SUM3 }'


I confirm that L5 works fine with PHP7 on Ubuntu 16. Actually, i'm using it right now. Installation from composer.


This answer is copied with minor editing from an answer for the question How can I add my username to the top panel in Xenial Xerus? that @Redbob referred to in comments.

The username of the currently logged in user can easily be placed in the top panel by using either:

A purely command line method
A gui method

1. Command line method:

Open a Terminal window with the key combination Ctrl+Alt+T and run the following command:

gsettings set com.canonical.indicator.session show-real-name-on-panel true

Below is a screenshot to show the successful result:

And this can be easily be subsequently reversed by running the following command in a Terminal window:

gsettings set com.canonical.indicator.session show-real-name-on-panel false

Easy enough to do but some will always prefer a gui solution:

2. Gui method:

If you prefer to accomplish this from a gui install the unity-tweak-tool as follows:

sudo apt-get install unity-tweak-tool

The required setting can be found by opening the Tweak Tool and then following this path:

Unity >> Panel >> Indicators

The exact setting is illustrated in the screenshot below:

And of course the Unity Tweak Tool will allow many,many other small refinements...


Piping find -name to xargs results in filenames with spaces not being passed to the command

You can tell find and xargs to both use null terminators

find . -name "*.txt" -print0 | xargs -0 rm

or (simpler) use the built-in -delete action of find

find . -name "*.txt" -delete

or (thanks @kos)

find . -name "*.txt" -exec rm {} +

either of which should respect the system's ARG_MAX limit without the need for xargs.


How do I fix very slow scrolling USB wheel mouse (after waking from suspend) which started after upgrade to 19.04?

ResetMsMice
A special program has been released to reset Microsoft Mice when dual booting Windows and Linux experiences insanely fast scrolling. It has just been confirmed to work for Ubuntu 19.04 suspend/resume problem of insanely slow scrolling.
Go to this site: https://sourceforge.net/projects/resetmsmice/
Click the link for: resetmsmice_1.1.3_amd64.deb
It is instantly downloaded to your ~/Downloads folder.
To install it use:
sudo dpkg -i ~/Downloads/resetmsmice_1.1.3_amd64.deb
rm -f ~/Downloads/resetmsmice_1.1.3_amd64.deb

The program automatically runs during boot but you can also call it from the terminal at any time with:
resetmsmice

To automatically call it after resuming you need to create a script with gedit.

Use sudo -H gedit /lib/systemd/system-sleep/resetmsmice
Copy these lines into the editor:
#!/bin/bash
case $1/$2 in
  pre/*)
    echo "$0: Going to $2..."
        ;;
  post/*)
    echo "$0: Waking up from $2..."
    resetmsmice
        ;;
esac

The echo statements help you locate your program in system logs, eg grep resetmsmice Save the file and exit the editor. Then use:
sudo chmod a+x /lib/systemd/system-sleep/resetmsmice

Original Answer
You can power off the USB mouse during suspend and power it on during resume. This will simulate a reboot.

Use sudo -H gedit /lib/systemd/system-sleep/custom-xhci_hcd
Copy these lines into the editor:
#!/bin/bash

# Original script was using /bin/sh but shellcheck reporting warnings.

# NAME: custom-xhci_hcd
# PATH: /lib/systemd/system-sleep
# CALL: Called from SystemD automatically
# DESC: Suspend broken for USB3.0 as of Oct 25/2018 various kernels all at once

# DATE: Oct 28 2018.

# NOTE: From comment #61 at: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/522998

TMPLIST=/tmp/xhci-dev-list

# Original script was: case "${1}" in hibernate|suspend)

case $1/$2 in
  pre/*)
    echo "$0: Going to $2..."
    echo -n '' > $TMPLIST
          for i in `ls /sys/bus/pci/drivers/xhci_hcd/ | egrep '[0-9a-z]+\:[0-9a-z]+\:.*$'`; do
              # Unbind xhci_hcd for first device XXXX:XX:XX.X:
               echo -n "$i" | tee /sys/bus/pci/drivers/xhci_hcd/unbind
           echo "$i" >> $TMPLIST
          done
        ;;
  post/*)
    echo "$0: Waking up from $2..."
    for i in `cat $TMPLIST`; do
              # Bind xhci_hcd for first device XXXX:XX:XX.X:
              echo -n "$i" | tee /sys/bus/pci/drivers/xhci_hcd/bind
    done
    rm $TMPLIST
        ;;
esac

Save the file and exit the editor. Then use:
sudo chmod a+x /lib/systemd/system-sleep/custom-xhci_hcd

Ubuntu 19.04 upgrade delivers the new Linux 5.0 kernel with new drivers. After future upgrades are done, deactivate the script to see if the problem has been fixed in new kernels.


Re-signing kernel modules after update - VMMON

Modules are compiled to match a specific kernel. So if the kernel was updated, then the module was recompiled, or needs to be recompiled, and the new module needs signing.

Your keys are still valid and can be reused.

The only steps that you need to do is compile the module and sign it.
Your keys are still in the MOK

the signing command depends on how you  sign it (there are few methods)

But yours is

sudo /usr/src/linux-headers-`uname -r`/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vmmon)


Package in repositories labelled "local or obsolete" after upgrade from 14.04 to 14.10

In order to fix the situation I simply removed the two packages using dpkg and re-installed using apt-get install -f. The commands I used were:

sudo dpkg --force-all -r libcairo2 libcairo-gobject2
sudo apt-get install -f


How do I connect to Cisco Valet Plus Wireless Internet Router?

You don't need the usb Easy Key at all. Although it contains some documentation.

Connect to the router via LAN cable. Open a browser and enter the router's IP 192.168.1.1  . You are prompted for a user name and password. The factory defaults are user: [blank] (i.e. don't enter any characters) and password: admin. From there you can configure the router.

My setup:
Router= Cisco Valet M10
system= Ubuntu 11.04 (natty)


I have found a solution to my question number two, i.e. how to switch from one configuration for pulseaudio to another without rebooting the pc.

1) Comment out the following line in /etc/pulse/default.pa

  load-module module-udev-detect

2) The following two commands will restart pulseaudio with or without (respectively) the tsched=0 option:

  pulseaudio --kill &&  pulseaudio --start --load="module-udev-detect tsched=0"
  pulseaudio --kill &&  pulseaudio --start --load="module-udev-detect"

The reason for commenting out the line above is that, when restarting pulseaudio, the command pulseaudio --start reads both the command line option and the configuration file, where it will find a conflicting prescription for module-udev-detect in the case of the first command, which will then fail with error message

  E: [pulseaudio] main.c: Daemon startup failed.

Commenting out the line above prevents this error. All of this can be easily scripted, and one of the two commands above (in my case, the second one) can be inserted into /etc/rc.local, so that after boot, a fully working configuration for pulseaudio is in place.


How can I stop Ubuntu making my TTYs a nice resolution?

Edit /etc/default/grub with your favorite text editor, ie

sudo nano /etc/default/grub

Look for these lines

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

Un-comment the last line and set the resolution you would like your TTYs to be.

After run editing the line with the desired resolution run

sudo update-grub

It will apply on next reboot.


Transmission stopped working, says it's not installed even though it is

The gtk transmission client changed name recently from transmission to transmission-gtk. The launcher should be updated accordingly with the new name. However, you might have a custom launcher in your homedir, and this one will not be changed by any package removal/installation.

So, look in ~/.local/share/applications and move away (or delete) any .desktop file with transmission in its name.


lpadmin -E -d printername

man lpadmin

for more information.


This can happen because of a bug like SERVER-13611 (so make sure you are on the latest version), or because you are trying to sort on a sparse index in 2.6, but more usually it is because you are simply attempting to sort too many records in memory without an index.

The specific limit you are hitting is intentional and is documented here - it cannot be changed, so you need to reduce the set of results, or use an index etc. to perform the sort.

Update (November 2014): The upcoming 2.8 release (2.8.0-rc0 as of writing this) does now allow this setting to be tweaked, as follows:

db.adminCommand({setParameter: 1, internalQueryExecMaxBlockingSortBytes: <limit in bytes>})

The default value is 32MiB (33554432 bytes) and should be adjusted with care - large in-memory sorts can cause your database to grind to a halt (which is why there was a limit in the first place).


Run:

sudo dpkg --force-all --install /var/cache/apt/archives/udev_208-8ubuntu8.2_amd64.deb


Cannot boot end up always with a blinking cursor

Success!
I was able to boot normally, with fully working system. What I did was installing mainline tool (method #3 from here → https://linuxhint.com/update_ubuntu_kernel_20_04/):
sudo apt-add-repository -y ppa:cappelikan/ppa
sudo apt update
sudo apt install mainline

(I had to edit sources list and change from groovy to focal)
Then I installed 5.9.12 kernel using Mainline installer and after rebooting everything worked fine (I saw that even earlier because my external monitor started to work while booting).
Additionally I've removed wireguard package because there was warnings while building GRUB images and since I don't use WG anymore I just uninstalled it. But I believe actual fix was delivered in 5.9 kernel.


How to change the User Agent in Gnome Web (epiphany)

It is possible using dconf, the key is org.gnome.Epiphany user-agent

The default is empty, so this is probably why you see no UA string set there.

You can also try gsettings set org.gnome.Epiphany user-agent "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2049.0 Safari/537.36" by command line, should do the trick.


My Laptop wont shut down or restart, Help anyone?

It's not a definitve solution, but it works whenever this happens:

On command line sudo init 6 to restart and sudo init 0 to shutdown

Regards


Can't connect to Apache webserver running on Ubuntu 20.04 headless server

In file /etc/apache2/ports.conf change
Listen 80

to
Listen 0.0.0.0:80

You may get more information about this on unix.stackechange.com.
Note: ISPs typically give dynamic IP address. These IPs change with time and live within multiple layers of switches and hubs. Thus not accessible from other computers. You may need to ask for static IP from your ISP.
Without static IP, you can access this computer from your home/office network only. To access within such network, you can get the IP using ip -4 addr
Moreover, as given by Pavel Šimerda in the unix.stackexchange.com link,

Linux machines typically hide a dualstack IPv4+IPv6 socket behind listening on IPv6 address ::


Inverse of --install-suggests option in apt-get remove

This solution is not perfect as it will also remove all packages that were selected for auto-remove.

But it will add to this list all the suggested packages that were installed with package foo:

sudo apt-get remove --purge -o APT::AutoRemove::SuggestsImportant=0 --auto-remove foo

From @charlesgreen

I ran sudo apt-get install tuxguitar -simulate, and would have loaded 39  packages

Following that, I ran sudo apt-get install tuxguitar --install-suggests - this is installing 1300 packages, including packages such as TeX, LaTeX, Fortran, Curl, Qemu, Apache and variants open JDK.

When this has finished, I will attempt the 'autoremove' command above, and see what is de-installed!

The remove command suggested is trying to take out 1200 packages, leaving a balance of 100 installed packages on the system.

The system is capable of rebooting, but may not be stable - I am now receiving errors complaining about a single processor system with a SMP kernel configuration.  I do have logs of what packages were removed and added, however they are far too large to post here.

I will create a separate question to ask about the behaviour of apt-get install --install-suggests


How to un-fullscreen an application on your secondary monitor in 11.10

You might want to set up a keyboard shortcut to toggle maximization and/or fullscreen state.

Go to Keyboard settings, click on the Shortcuts tab and chose a new shortcut for that in the Windows section.


Installing Apache MPM Worker with PHP support on Ubuntu Server 14.04.1

Nevermind. Found that installing nginx with php-fpm is far a better and easier option. I'm writing this answer as may be helpful for others


Unfortunately, reinstalling is the way to go. There's no easy way to back out every single change that's been made to the system. Reinstalling takes not too much time, is fairly easy, and gets the job done.

One possible alternative is backing up your hard drive right after installing and then restoring from that backup, but it's rare for a person to do that because installing from scratch allows you to do things like install a newer version of Ubuntu to save time on update downloads and it avoids problems like the backup getting corrupted.

I'd recommend asking a new question here dealing with the issues you're experiencing with the install.


As a general comment, it is advised to stay away from installing drivers unless there is a problem with the default configuration.
xserver-xorg-video-intel is a set of older drivers for Intel. For newer hardware, chances are good that you can uninstall that package. Then, the kernel build-in modesetting drivers are used instead.
mesa-utils is just a set of GL utilities, i.e., to display information or test hardware acceleration.


Where is the location of the Nautilus file manager icon in Ubuntu 16.10?

Nautilus is a GNOME file manager and using sudo allows for root access to otherwise locked folders due to permission error in Ubuntu.

In Ubuntu 16.04.2 LTS, the Nautilus icon is located here: /usr/share/icons/Humanity/apps/128/system-file-manager.svg

The smaller version of Nautilus icon is located in other folders, such as /apps/32/system-file-manager.svg

Another version of Nautilus icon (i.e. gastropod seashell) can be saved from here:  https://upload.wikimedia.org/wikipedia/commons/thumb/3/32/Nautilus_icon.svg/120px-Nautilus_icon.svg.png

The Nautilus.desktop file looks like this:

[Desktop Entry]
Type=Application
Version=3.14.3
Name=GNOME Nautilus
GenericName=File Manager
Comment=Access Folders as Root
Icon=/usr/share/icons/Humanity/apps/128/system-file-manager.svg
Exec=gksudo nautilus /home
Terminal=false
Name[en_US]=Nautilus

Make sure to change Permissions tab, Owner: and Group: set to Read and Write, and check box for Execute: Allow executing file as program


restore from entry disk image with dd, to unallocated space or specific partition

dd is a very powerful but also very dangerous tool. Please backup whatever is new on the target drive (for example in partition /dev/sda5) before you start tampering with dd.

I think the least dangerous method would be to

clone 'everything' from the backup image to an extra drive
clone the first partition from the extra drive to the first partition of the target drive.
But you have damaged the head of the drive (the first mibibyte), so you need to clone that part from the backup image to the target drive too. You can use count=N to copy only N blocks and the default block size is 512 bytes.

Another faster, but more risky method would be to clone the first part of the backup, from the head end until the end of the first partition.


How to install Sopcast Player in Ubuntu 14.04?

Credit to : Maurizio Siagri

There isn't sopcast for 14.04 at any PPA's at this moment but I found a working and easy to understand advice at http://mauriziosiagri.wordpress.com/tag/sopcast/ .

Although it's written for 13.10, it works for 14.04 too.

From my experience, you should first install pythong-glade2, otherwise there will be an minor error which won't effect running the program -- but annoying .

sudo apt-get install python-glade2

It's a good idea to note down step by step what you do incase you should have problem installing it ( I hope you won't).


The shortcut might have been unlinked or broken. If you know where that command links to, i.e the directory or application, try creating another shortcut or relinking the shortcut to the correct app/directory.


Prevent Ubuntu 10.04 from locking display after few minutes of inactivity

You are not being logged out, it is locking the screen.  Disable the lock screen by going

System -> preferences -> screensaver

You might also want to also change the screensaver value to a more reasonable time, or disable it.

Please be aware that support for 10.04 LTS runs out in April.  You might want to look at upgrading to 12.04 LTS which is supported until 2017


Install F-Call as per the bug link provided. This will be able to filter out all unwanted numbers for you. I did read somewhere that this functionality is going to be available in the phones software, but cannot aee it as yet. Hopefully soon though.


pip doesn't list older versions of tensorflow

welcome to AskUbuntu.

At the repositories of Ubuntu 20.04 you can find other versions of Python, for example, Python 3.6.

apt search python3.6

When working with Python, it is a good practice to use a Virtual Environment that will isolate the libraries used by your project by the libraries of the system. If you do not install Python libraries on your system, you will avoid the chance to have a library mess on your system. All in all, use Virtual Environments.

For example, the following instructions will create a virtual environment for your project using Python 3.6. If I'm not mistaken, Tensorflow supports Python 3.6:

# Install Python 3.6
sudo apt install -y python3.6 python3.6-venv

# If you do not have a folder for your project, just create one
mkdir folder-for-my-project && cd folder-for-my-project

# Create the virtual environment
python3.6 -m venv venv

# Activate the virtual environment
source ./venv/bin/activate

# At this point, every python program and command that your run will use the
# python interpreter of your virtual environment
python -V

# Update pip
pip install --update pip

# Install tensorflow and other libraries required by your project
pip install tensorflow pytest flake8

Remember to activate your virtual environment from the command line if you want to use the Python3.6 interpreter of your project. Tools like PyCharm will detect and make use of the interpreter of your project.

For more details on virtual environments, check the official documentation


You can use GParted.

take a look at this : How do I repartition with GParted?


Diagnose Ubuntu 12.10 (in Dual 12.04-12.10 boot)

Firstly:

Try CtrlAlt1, and watch the text messages stream passes (as the machine starts). What error message do you see? What does it stop after?

Possible Fix:

Try CtrlAlt1, login (at the command line), and then run an OS update, to see if this is fixed by recent updates.

Type: sudo apt-get update && sudo apt-get upgrade

Lastly:

You will need to do some further diagnostics ..

With an Intel ATOM CPU, I will assume you are running 32-bit Ubuntu.

(correction) This Acer model has the Intel Cedarview / Cedar Trail* CPU / graphics chipset, which is likely the root cause (anyway).*

Can you provide details, from output of sudo lshw. (Note: This can be run from within 12.04 LTS, and still give much the same results.)

UPDATE:

The Acer Aspire One D270 does not support DX10.1, as the Cedar Trail GPU (graphics chip) only officially supports DirectX 9 (due to driver / design issues).

source:

NetbookCheck.net > Review: Acer Aspire One D270

The netbook is also sold with Windows-7 32-bit, and may not fully support 64-bit. It was left to the (PC/netbook OEM) manufacturer to choose to enable 64-bit, prior to the later S12nn series (Dec2012) Intel Atom.

source: (non-authorative)

wikipedia > Intel Atom


Now I'm not 100% certain, but I THINK FAT is not a reliable format to boot Ubuntu installation on. I used http://www.pendrivelinux.com/ which I used the second time I attempted to boot my installation because if I remember correct, I tried using a different program and it put my usb format into FAT and it simply did not work. Again, not 100% certain, but worth a try to use a different format.


How to make a shell script to move files to individual folders based on the filename?

Here is the solution I came up with thanks to the other answers given

#!/bin/bash

for f in *.mkv *.mp4 *.wmv; do
        if [ -f "$f" ] # does file exist?
        then
                dir=$(echo "$f" | grep -o "E[0-9][0-9]" | head -1) # extract first E## from filename
                if [ "$dir" ] # check if string found
                then
                        mkdir -p "$dir"  # create dir
                        mv "$f" "$dir"     # move file into new dir
                else
                        echo "INCORRECT FILE FORMAT: \""$f"\"" # print error if file format is unexpected
                fi
        fi
done

I had to add some error checking to catch any files that are incorrectly formatted and for double episode files where the filename has two matching E## strings (for example tvshow.S01E20E21.mkv). For double episode files it will create a directory for the first episode number only and move the file to there. Note that this script will make the E## directories as well since it makes it easier to have one script do it all.


I have found this question on Ask Ubuntu https://askubuntu.com/a/792107/17397 and this is the answer from the Deluge developer: "for security SSLv3 was disabled so now only uses TLS in later versions of Deluge (also TLS forced in openssl) and likely the reason for not connecting." [Cas]

It seems newer version of daemon is backward compatible with older clients but not the opposite way.

"A client running 1.3.6 will connect to a server running 1.3.12, but not vice-versa" [alex_d]

I asked my seedbox provider to upgrade the daemon on their server and that solved this issue. Now I can connect from my Deluge (v1.3.13) thin client on Ubuntu 16.04 LTS to the Deluge daemon (v1.3.13).


Problem booting into Windows 8.1 after using Ubuntu live cd 12.04

The same website offers a solution on how to recover Windows product key (and other Microsoft software) using a Linux live CD/USB. You need to have a separate storage to copy the

  C:\Windows\system32\config

directory to run the recovery software.

Once you have the product key, write it down and keep it somewhere safe.


How do I access the old bottom indicator apps in 17.10?

You can try TopIcons available on https://extensions.gnome.org .

The Tweak tool also already has the Ubuntu appindicators extension installed by default.


Enable Universe and Multiverse repos in your sources.list

sudo gedit /etc/apt/sources.list

Edit this:

deb http://us.archive.ubuntu.com/ubuntu/ precise main restricted
deb http://us.security.ubuntu.com/ubuntu/ precise main restricted

To look like this:

deb http://us.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
deb http://us.security.ubuntu.com/ubuntu/ precise main restricted universe multiverse

Then just run:

sudo apt-get update


By default, selecting the “Encrypt my home directory” option at install time will encrypt your swap space¹ as well - at least in Ubuntu 10.04 and newer (I don't know when this was implemented, so it could well be earlier).

Technically, it uses the ecryptfs-setup-swap program to do the swap encryption.  You can use this tool if you want to encrypt your swap space post-install.

¹: This applies to both swap partitions and any swap files you may have set up.


netfilter-persistent and iptables malfunction

So the issue is from the script which gets called by the systemctl command.
Service:

/lib/systemd/system/netfilter-persistent.service

The service file is calling the /usr/sbin/netfilter-persistent script with "stop" argument.

snip:

stop)
    if [ ${FLUSH_ON_STOP} -gt 0 ]; then
        run_plugins flush
    else
        echo "Automatic flush disabled; use '${0} flush'"
        exit 1
    fi
    ;;

So, it eneters in the else condition and exits with status of 1 echoing "Automatic flush disabled; use /usr/sbin/netfilter-persistent flush".
What I don't know, if this will cause some issue at the firewall level.


adb didn't work for me in the respect that NO device was listed when typing in terminal 'adb devices'

small workaround was to -

Open the folder where your TWRP Recovery .img file is saved.
Then open a CMD window inside that folder. To do that, Shift + Right click on any empty white space inside the folder and then select Open command window here or simply right click and select 'open terminal here'.
Connect your Android device to the PC. Type the following into the command window to boot your device into bootloader/fastboot mode:

adb reboot bootloader

└ If your asks for permission to “Allow USB debugging”, tap OK.
Once your device boots into bootloader mode, type this into the command line.

fastboot flash recovery twrp-2.8.x.x-xxx.img

└ Here modify twrp.img with the name of your TWRP recovery .img file.

Then you can flash any file in TWRP using its bootloader recovery.

The other option is to go to the stock bootloader then follow this simple basic guide https://devices.ubports.com/#/hammerhead just for nexus.

All my problems went away, wifi didnt work then I just reset the phone and works well.


Why did my computer's ubuntu installation screw up after fixing not being able to login because of no disk space left(100% used up)?

As I do not have enough information to write a comment, I am forced to write an answer.

First of all, I see what you mean and often ran in the situation of having no space left, especially if experiment with small installs.
I noticed different issues, but none of the issues 2. or 3.
In case of KDE Plasma for example suddenly all my desktop widgets were gone when I removed files in order to free space (and no, I did not remove the config files).

For explaining a few factors it would be important to know:

what filesystem you were using
if you were using prelink (which can corrupt binaries in case of low space left)

To your first question: You could setup a root and a home partition, which does not solve the issue, but at least makes sure that nothing unexpected happens to the root partition if home is full.

In case you cannot login anymore: You do not need another live cd: Just log-in in a virtual terminal: (By pressing Ctrl + Alt + F1) and make space free.

I think the warnings of too less space available are there for some reason. You cannot simply restrict disk space so that still for example 3 MB would be free but not writable. What difference would the latter make? You cannot write it anymore anyway, which is required by X to log in as user.


Install Xdebug extension only for PHP7.1

You have 2 options here (in my opinion):

Remove this extra-files of unnecessary version without any fear that this will effect on processes of workable version.
Compile php7.1 from source with xdebug extension (it's not so hard as it seems)


I had the exact same problem, I solved it by putting the graphics card into persistent mode:

$ sudo nvidia-smi -pm 1

I don't know what this really does but it seems that it's working for me.

I found the solution in the next forum: https://bbs.archlinux.org/viewtopic.php?id=145527


After many removals and reinstallations of gnome and document viewer something good happened and thumbnails are working.


Perhaps the Ubuntu "Minimal CD", aka the "minimal ISO image", is close enough to what you are looking for.

"Installation/MinimalCD": http://help.ubuntu.com/community/Installation/MinimalCD

After doing a minimal install, I think there's only one more thing you need to do to allow ssh connection:

The Ubuntu Server Guide says (in the OpenSSH Server section) that

sudo apt-get install openssh-server

allows people to ssh to your server.
You'll probably also want to to the other things suggested at How do I configure a new Ubuntu installation to accept ssh connections? .

EDIT:

If on one machine one installs the "Minimal CD", and then runs

sudo tasksel install server

and on another machine one installs the "Ubuntu Server CD",
my understanding is that the two machines are practically the same.

If you know what the difference is between them, please post that difference to
Is using Ubuntu Minimal any different from Server?
.

See What does the "Basic Ubuntu Server" package contain in software selection during installation?
for more details.


How to stop getting error message and two tabs when I ctrl + click on a link in gnome terminal

I fixed it! Just uninstalled and reinstalled google-chrome-stable.

rm ~/.config/google-chrome
sudo apt purge google-chrome-stable

Then I removed everything else chrome-related (cache, chromedriver, etc).

Then I followed this answer to reinstall the latest version of google-chrome-stable. Works great now! When I click a link from the terminal, it opens right up in chrome without the weird tabs.


How to increase the size of linux-swap partition

Your swap partition is a logical partition, which lives inside the extended partition ( /dev/sda2 in your case ).  To expand it, you need unallocated space after it, but inside the extended partition.  You have unallocated space after the extended partition, so you have to expand the extended partition to move the unallocated space into the extended partition, then you can expand the swap partition.

In order to resize a partition, it must not be mounted ( the key icon shows it is mounted ).  You will need to right click on the swap partition and choose to unmount/swapoff so you can expand it.  Since your root partition is also a logical partition though, you will not be able to unmount it, and thus, leave the extended partition unlocked so you can resize it, so you will need to do this from the livecd instead.


If you switch to Google Chrome, there is a hack at https://github.com/ali1234/fullscreenhack that works for PepperFlash. It works by hooking into the system calls that flash uses to get the monitor/geometry info and property changes.

It's pretty simple to use:

First Download the github and extract it (does not matter where). Open a terminal and navigate to the directory.

Install dependencies: sudo apt-get install build-essential libx11-dev libxinerama-dev libxrandr-dev
Build it: make
Run chrome with LD_PRELOAD: env LD_PRELOAD="/path/to/libfshack-ppapi.so" google-chrome %u
Profit!

That being said, I've used the Maximize Flash extension for chromium and making the browser full screen via F11 with great results, however the Maximize Flash extension has ceased working for me.

Finally the code for step 3 should look something like this:
env LD_PRELOAD="/home/jan/Downloads/fullscreenhack-master/libfshack-ppapi.so" google-chrome %u

Answer from here


Some suggestions:

I don't believe Gwibber notifications are shown while the Gwibber window is open/visible. This isn't certain, but try closing the main window via the close button (not the quit option) and see if you start receiving notifications.
With the Gwibber window closed, check to see that the gwibber-service process is still running, either in System Monitor, top, or ps x | grep gwibber. If it's not, something is wrong.
If all else fails, please file a bug by running ubuntu-bug gwibber.


16.04: Desired key remapping won't load at startup

The thing to do, per this answer, is to edit /usr/share/X11/xkb/keycodes/evdev and reboot. I made <COMP> = 180 (<MENU> is an alias for <COMP>) and commented out the line where <I180> = 180. Downside is that if I plug in a different keyboard, the real Menu key won't work, but the compact keyboard I'm using doesn't have one at all and it's not an absolutely necessary key anyway (if you have a mouse) so I'm good with this.


Using a 3rd monitor on a hardware switch with dual display Graphics card

I managed to fix it a bit by trial and error. I just went into display configuration under system settings and picked the correct screen resolution and refresh rate for the third monitor and this time it worked.

I had deleted monitors.xml from /home/user/.config/monitors.xml

This was a very obvious solution and one I'm sure I tried before so I'd be  interested if someone could offer a more suitable explanation or solution.


problem running Skype on Trusty Tahr (64 bits)

Apparently Skype is looking for libGL.so in somewhere it is not. My solution was to create a link to the right path in /usr/lib32/:
sudo ln -s /usr/lib/i386-gnu-linux/mesa/libGL.so.1 /usr/lib32/
sudo ldconfig

It completely fixed it (source).


Setting Screen Timeout on Ubuntu Using the Command Line

If you are wanted to logout idle users automatically to protect the local console, try "autologon".

$ apt-cache show autolog
Package: autolog
Priority: extra
Section: universe/admin
Installed-Size: 148
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Luis Uribe <acme@eviled.org>
Architecture: amd64
Version: 0.40-13.1
Depends: libc6 (>= 2.7), cron (>= 3.0pl1-42)
Recommends: exim4 | mail-transport-agent
Filename: pool/universe/a/autolog/autolog_0.40-13.1_amd64.deb
Size: 28022
MD5sum: 043c4d4087b377e1934a5496a36fd03a
SHA1: 6b1255ea2fcb9d9115309134073308964c124e7f
SHA256: 42f5609fd698f1bb4d5c472494c5a1a34cddc5566fb2708ccfc9b3c5ef4f11f4
Description-en: Terminates connections for idle users
 Autolog terminates connections considered to be idle based on a large
 variety of parameters.
Description-md5: 709929c5c8e5f8913099fd425517dfb3
Homepage: http://gitorious.org/debian-packages/autolog
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu


This problem happens when you install Nvidia drivers using .run files downloaded from Nvidia site. This is a wrong way to install drivers.

After each kernel upgrade you will have black screen or bad resolution.

The correct way is to install drivers from Ubuntu repositories or ppa.

You could install drivers by running

 sudo apt-get install nvidia-331

But first you need to uninstall the driver you have already.

sudo sh ./NVIDIA-Linux-x86_64-334.21.run --uninstall

As an option you can install latest driver from xorg-edgers ppa.

sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install nvidia-346
sudo add-apt-repository -r ppa:xorg-edgers/ppa

I recommend to remove one driver before install another, because sometimes some packages do not install when they are still running.

Full removal of Nvidia proprietary drivers can be done by

sudo apt-get purge nvidia*


Network interface name changes after update to 15.10 - udev changes

In Ubuntu 15.10 (Wily Werewolf), starting with systemd/udev will automatically assign predictable, stable network interface names for all local Ethernet, Wlan and Wwan interfaces (source).

The following different naming schemes for network interfaces are now supported by udev natively:

Names incorporating Firmware/BIOS provided index numbers for on-board devices (example: eno1)
Names incorporating Firmware/BIOS provided PCI Express hotplug slot index numbers (example: ens1)
Names incorporating physical/geographical location of the connector of the hardware (example: enp2s0)
Names incorporating the interfaces's MAC address (example: enx78e7d1ea46da)
Classic, unpredictable kernel-native ethX naming (example: eth0) - deprecated

By default, systemd will now name interfaces following policy:

if that information from the firmware is applicable and available, falling back to
if that information from the firmware is applicable and available, falling back to
if applicable, falling back to
is not used by default, but is available if the user chooses so.
in all other cases.

How do you disable this?

You basically have the following options:

Create your own manual naming scheme, for example by naming your interfaces internet0, or lan0. For that create your own udev rules file and set the name property for the devices. Make sure to order it before the default policy file, for example by naming it /etc/udev/rules.d/70-my-net-names.rules
Alter the default policy file, for picking a different naming scheme, for example for naming all interface names after their MAC address by default: cp /lib/udev/rules.d/80-net-setup-link.rules /etc/udev/rules.d/80-net-setup-link.rules, then edit the file there and change the lines as necessary.
Pass the net.ifnames=0 on the kernel command line.


Mount partitions by UUID to solve the problems of disk drives changing
their device name.

You can find out the UUID of a disk device with the blkid command:

$ sudo blkid -p /dev/sda1
/dev/sda1: UUID="af340d98-0e91-4990-8cc9-17566264db2b" VERSION="1.0" TYPE="ext4" USAGE="filesystem"

Then you can replace the /dev/sda1 line in /etc/fstab with the
UUID=... version.  For instance:

UUID=af340d98-0e91-4990-8cc9-17566264db2b  /  ext4 rw,errors=remount-ro


How do I exit BASH while loop using modulus operator?

Move the break from the else part to the if part:

#!/bin/bash

while true
do
    echo "Please input anything here: "
    read INPUT

    if [ `expr $INPUT % 5` -eq 0 ]; then
        echo "you entered wrong"
        break
    else
        echo "you entered right"
    fi
done


PuTTY X11 proxy: wrong authorisation protocol attempted

I fixed the problem which was very simple:

There wasn't enough disk-space on the server. Thus, when Xming attempts to create the .Xauthority file it fails (i.e.: since this file is being created every time a particular application is lunched, e.g.: qt-creator, it fails to override the old version of itself which can still be seen when listing the files using ls) ..

So, after simply removing all unnecessary big files and creating space for the Xming on the disk, I am able to see qt-creator again on my local machine  ..


Partition table messed up. Cant see any partition using Gparted, though everything works?

Run the same Mageia OS installation disk and again start installing Mageia, but this time uncheck all ntfs/ext4 partitions from changing labels/auto mount in Mageia. If you have changed primary partitions into logical partitions then, delete/create new partitions from the previous ones and choose "force as primary" and then continue the installation.

Make it a minimal installation as you are going to remove it. Wait for the installation to complete successfully. After completion, boot into Ubuntu or run Ubuntu live DVD. Using Gparted from there reformat the Mageia partitions. Don't change anything except formatting. After formatting completes delete those partitions. Now from the free space you can again be able to create primary partitions.

This will fix this error. But there will be consequences


Mysql-Server installation stuck on root password

You have to set the password before installing MySQL:

# MySQL
ENV MYSQL_PWD Pwd123
RUN echo "mysql-server mysql-server/root_password password $MYSQL_PWD" | debconf-set-selections
RUN echo "mysql-server mysql-server/root_password_again password $MYSQL_PWD" | debconf-set-selections
RUN apt-get -y install mysql-server


I just solved the problem and don't want to delete the question because I think this could be interesting for other people as well.

I simply changed

  GRUB_CMDLINE_LINUX=""

to

  GRUB_CMDLINE_LINUX="quiet splash acpi_osi=Linux acpi_backlight=vendor"

in /etc/default/grub, ran sudo update-grub rebooted and the problem was resolved. :)


Can't launch Ubuntu (or any Linux) on hi-end hardware?

Could I suggest checking your BIOS for bootloading settings. By default configurations are set for DOS, change to it Other/Linux/etc.
I hope it works.


"booting in insecure mode" message after disabling secure boot

You need to use the following command to re-enable Secure Boot validation, which will eventually not show the text "booting in insecure mode".
$ sudo mokutil --enable-validation

Sources -
https://wiki.debian.org/SecureBoot
https://wiki.ubuntu.com/UEFI/SecureBoot
You can check the status of Secure Boot by -
$ mokutil --sb-state

For you, the output might be -
SecureBoot enabled
SecureBoot validation is disabled in shim


Escape key, arrow keys, etc not working in remote shell to server, but work on server's local shell

From your previous question  we know that you're dealing with an older Ubuntu system and bash 3.2 version.

Some of the shells don't come with readline library support (see my related question about this), which is what causes the control characters to show up on screen. Good example of that is Korn shell and Dash. I couldn't find whether or not bash 3.2 comes with readline library support. I'll ask around to make sure.

However, based on the output of locate readline.so you provided in the comments, it seems like your bash indeed is missing that library. Here's output of the same command from my system with bash 4.3.

$ locate readline.so
/lib/x86_64-linux-gnu/libreadline.so.5
/lib/x86_64-linux-gnu/libreadline.so.5.2
/lib/x86_64-linux-gnu/libreadline.so.6
/lib/x86_64-linux-gnu/libreadline.so.6.3

You could attempt to run set enable-keypad on but I doubt this will have any effect without readline library present.

The obvious solution would be to upgrade bash, but since you need this system for infosec studies, i assume you might want to keep it as is.

I've asked a related question on unix.stackexchange.com. You can check if bash uses readline with nm command , as shown in Thomas's answer


Create a script to clean the folder you want or to do whatever you need and put it in /usr/bin/ and then create a systemd service as:

[Unit]
Description=OLPC Configuration
DefaultDependencies=no
After=sysinit.target local-fs.target
Before=base.target

[Service]
Type=oneshot
ExecStart=/usr/bin/yourscript.sh

[Install]
WantedBy=base.target


I found one nice tip from which you can start. You must to play with bash:

  To set it up:

$ bash    # try this in a subshell since ^C seems to cause it to exit
$ f () { sed "1s/^/$(tput cup 0 0)/;s/^/$(tput il1)/"; }
$ PROMPT_COMMAND='tput cup 0 0;tput il1; echo'
$ exec > >(f)

  Press enter one extra time and it's ready to try. Sometimes the output
  and the prompt are out of order and there may be other weirdness, but
  it's kind of an interesting thing to try.

Source: Reversed Terminal / Command line window.

See also:

Reverse bash console text flow
Pushdown Terminal Output


No boot screen(dual screen and dual boot)

Hello it sounds to me like Nvidia-config has caused troubles.
For certain systems after installing the Nvidia drivers and running Nvidia-config it is possible (and more likely for dual screens) for your xorg.conf file to be generated incorrectly.

For certain (OLD) systems:

/etc/X11/xorg.conf specifies how the desktop should be displayed on your screen(s) if this is invalid you will not be able to boot into Ubuntu.

For this scenario I suggest you drop to main terminal (Ctrl+Alt+F1) (you can do this even if your desktop is not showing) and navigate to /etc/X11/ where you should have xorg.conf and xorg.conf.backup or xorg.backup.conf or some such (a backup file) you should be able to restore one of the backups (which is generated by nvidia-config). This will revert back to the old 1 screen configuration and allow you to access your desktop and fix the real problem by:

For most systems, I would recommend a reinstall of the drivers and after the re-installation attempt to auto-config again.
For installing the proprietary drivers there are 2 "good" approaches:

You can attempt to install via the ubuntu-x-swat repository. This is the simplest approach. Instructions can be found here.
You can attempt to install the latest drivers by downloading them from the nvidia website. Then dropping to main terminal (Ctrl+Alt+F1), stopping the display service "sudo servive gdm stop" and then installing the drivers "sudo ./NVIDIA-versionxxx.sh". Towards the end of the installation you will be asked if it should auto configure say yes and hopefully this should work and you will have both screens ready to go.

Side Notes:
Option (1) is easier to do and will automatically update the drivers as you update the system (essentially less maintenance).
Option (2) will require you to reinstall the drivers every time the kernel is updated more maintenance but you will always have the latest proprietary drivers.

Hope that helps.

EDIT:
If you decide to attempt Option(2) after Option(1) remember to remove the old drivers by "sudo apt-get remove nvidia-current"


How can I shutdown the computer when a certain process ends?

This should do the trick:

http://www.makeuseof.com/tag/cuttlefish-set-actions-reactions-automate-ubuntu/


The location you are looking for is: /run/user/1000/gvfs. Or more precisely /run/user/$UID/gvfs.
The approach that I've used to get this is shown on the following animation.

You can use also the option Open in Local Terminal from the context menu (right mouse button):

The initial answer:

This is not exact answer of your question, but it may be useful. You can mount FTP instance into your file system via the tool curlftpfs:

sudo apt install curlftpfs
sudo mkdir /mnt/ftp
sudo chown $USER:$USER /mnt/ftp

curlftpfs user:password@host:port/folder/ /mnt/ftp/

You can make script or fstab entry to automate the mounting process, as it is described here.

According to your original question, as it is described here, you can mount and SSH instance.


OpenStack Autopilot Install - Change OVS settings?

This isn't possible with the Autopilot directly. What you can do is change these settings after Autopilot deployed your cloud, but you will have to use juju.

First, access the inner cloud environment as explained here: Landscape openstack juju management

Then do a series of juju get commands against the services you want to change. In your case, it's going to be a set of neutron-api, neutron-openvswitch and neutron-gateway. Finally, use juju set <service> key=value to change the setting you want.

Be careful, of course :)


it seem i have to solve my problem on my own,but i put notes to guide others.
the error caused on:

d-i partman-auto/method string crypto

to prevent such error first try
    d-i partman-auto/method string lvm
and solve errors, a sample is:

d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string lvm
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/device_remove_lvm_span boolean true
d-i partman-auto/purge_lvm_from_device  boolean true
d-i partman-auto-lvm/new_vg_name string system
#d-i partman-auto/init_automatically_partition \
#  select Guided - use entire disk and set up LVM
d-i partman-auto/expert_recipe string                         \
      boot-root ::                                            \
              40 300 300 ext3                                 \
                      $primary{ }                             \
                      $bootable{ }                            \
                      method{ format } format{ }              \
                      use_filesystem{ } filesystem{ ext3 }    \
                      mountpoint{ /boot }                     \
              .                                               \
              2000 10000 1000000000 ext3                      \
                      $lvmok{ }                               \
                      method{ format } format{ }              \
                      use_filesystem{ } filesystem{ ext3 }    \
                      mountpoint{ / }                         \
              .                                               \
              8000 8000 200% linux-swap                       \
                      $lvmok{ }                               \
                      method{ swap } format{ }                \
              .

d-i partman-lvm/confirm boolean true
d-i partman/confirm_write_new_label boolean true
d-i partman/choose_partition select Finish partitioning and write changes to disk
d-i partman/confirm boolean true

after you got answar of lvm method you can change method to crypto


How to install LDOCE5 Viewer on Ubuntu 20.04 64 bit?

I have used qt4-based version of LDOCE5 viewer for a long time. I originally asked this question How to install LDOCE5 Viewer on Ubuntu) and N0rbert helped me to install it on Ubuntu 18.04. I just installed Ubuntu 20.04 and since the qt4-based libraries are obsolete I tried to install the qt5-based version. I followed the instructions for installing the qt5-based version (answered by n0rbert in the original question), but I came across some new issues with Ubuntu 20.04. I spent some time to resolve those issues and could install the software successfully. Unfortunately I could not find a way to fix the issue reported in the original question regarding the sound not playing. This requires further knowlege of Python/Qt and I hope someone else will help to resolve the issue.
Instructions for installing LDOCE5 viewer on Ubuntu 20.04:

Install some dependencies:
sudo apt-get install git make python pyqt5-dev-tools python3-pyqt5 \
python3-pyqt5.qtwebkit python3-lxml python3-whoosh  qtgstreamer-plugins-qt5

Install further dependencies for python3.8 on Ubuntu 20.04:
sudo apt-get install python3-pip python3-setuptools python3-distutils

Download ldoce5viewer-pyqt5 into ~/Downloads:
cd ~/Downloads && git clone https://github.com/purboo/ldoce5viewer-pyqt5.git

Open the Makefile in the download folder and change python to python3 on line 2:
gedit ~/Downloads/ldoce5viewer-pyqt5/Makefile

There is an obsolete library in the ldoce5viewer-pyqt5 called cgi.escape()
which has been removed from python3.8. this library is used in three files.
in order to fix the issue, we need to change cgi to html where we see
from cgi import escape in the following three files:
gedit ~/Downloads/ldoce5viewer-pyqt5/ldoce5viewer/ldoce5/transform.py
gedit ~/Downloads/ldoce5viewer-pyqt5/ldoce5viewer/qtgui/indexer.py
gedit ~/Downloads/ldoce5viewer-pyqt5/ldoce5viewer/ldoce5/extract.py

This step is based on an answer in the original question which suggested a
fix for the sound issue. it did not work for me, but it may work for you.
Open the following file and change
'appsrc.emit('push-buffer', Gst.Buffer.new_wrapped(self._data[:size]))'

to
'appsrc.emit('push-buffer', Gst.Buffer.new_wrapped(self._data[:size].data()))'

on line 114:
gedit ~/Downloads/ldoce5viewer-pyqt5/ldoce5viewer/qtgui/utils/soundplayer.py

Final step:
make && sudo make install

Now you can find the software in the installed applications (press Super key and search for ldoce5).


You can try recoll, it is available in the repositories, it gives you a lot of control over the folders you want to index and search and where you want to store the index database, you can use multiple databases too, you can use the advanced search to return results from a specific folder.

See some of its features here, You can run it from the command line passing the query and other control  terms to it, see the short manual here. Here the full manual.


How to make LTSP log into the Windows 7 VM

you have to know the ip of the windows desktop.

follow this guide to enable remote desktop on windows : http://www.howtogeek.com/howto/windows-vista/turn-on-remote-desktop-in-windows-vista/

Then you have to use the remote desktop protocol of windows with ltsp :

Official LTSP Guide : http://wiki.ltsp.org/wiki/Integration#Rdesktop

you have normaly rdesktop installed on your thin client image. However if this doesn't work think to change your client chroot to have rdesktop.

In the guide they takl about SCREEN07, if you want to have the usual LTSP and Windows you have to define your SCREEN numbers (1 to 12). For changing screen just do a CTRL+ALT+FXX with XX being the number of your defined screen.

Best regards


How to mount a windows partition in ubuntu 16.04 LTS?

Open terminal and type

 sudo ntfsfix /dev/sdXY

XY: label...eg sda7

For permanent solution: turn off hibernation(in windows)

Open command prompt as administrator and type

 powercfg -h off

If problem occurs again after next bootup

Open run prompt from start menu

 1. Type and Start msconfig.exe
 2. On the general tab select "Selective startup" and uncheck "Load startup items".
 3. On the services tab unselect all first
 4. Runt the command "powercfg -h off" to turn off hibernation.
 5. Reboot
 6. If hibernation is still deactivated start msconfig.exe again and activate half of the services.
 7. Repeat 5 and 6 until you find the service causing hibernation to be turned back on       (don't forget to do step 4 if it is activated again).