Why can't the Ubuntu installer simply preinstall the latest Nvidia driver?

The reason why Ubuntu does not include the proprietary NVIDIA drivers and CUDA programs by default is that these packages have a history of causing black screen problems on some computers, and the built-in open source nouveau driver does not have this problem. So a black screen problem caused by a proprietary graphics driver can almost always be solved by uninstalling the driver from a text-only console and rebooting the computer. When the computer reboots it will be using the default open source graphics driver, and you will have an opportunity to calmly consider what to do next about installing a better driver for your NVIDIA graphics processor.


What happens if I delete a profile in apparmor

It would run as if it had unconfigured access. Meaning, it would use whatever defaults are set for your system. If you plan on doing that, I would highly suggest making a backup though... Those are there for a reason.


Associate PlayOnLinux to Microsoft Office on Ubuntu 14.04

Right Click on the .docx or .xlsx, click on Properties.  Once the new window opens click on the Open With Tab, (in this example, its a .docx document) and choose, Microsoft Word.

Click on set as default, and thats it.

Since I'm experimenting with both Wine, and PlayOnLinux, here is another explanation for PlayOnLinux:

Open up PlayOnLinux, and click on Settings --> File associations.  Once the new window opens, make sure that .docx is associated with Word, otherwise; create a new association.


Need help installing a 32bit app on my 11.10 64bit. Multi-arch not working

Try installing it via the terminal.
You open up the terminal and should be in you home folder
user@computer:~$

type cd Downloads (or the folder your package is in) and you should be in the download folder
user@computer:~/Downloads$

Then type
sudo dpkg --force-architecture -i CrossPlatformUI-V2.1.1-Kasapa-i386-ubuntu.deb

and the package should be installed without checking for architecture.
You can also have a look here (scroll down to Espresso Modem), maybe that helps you out. But in general it's done like I wrote.


No wi-fi adapter when running Ubuntu 20.04 on LENOVO V145-15AST

Connect to internet and run in a terminal
sudo apt update
sudo apt install git dkms
git clone https://github.com/lwfinger/rtw88.git
sudo dkms add ./rtw88
sudo dkms install rtlwifi-new/0.6

Then reboot.


How to hide Google Desktop icon on Gnome?

There is no way to hide it without removing the notification area tray from the panel, or simply not using Google Desktop. If you upgrade to 11.04 or 11.10, it is possible to blacklist the icon from the panel.


In the git log example, just hit the q key. Q quits the current action. Q also works in the more command, and others.


1st identify the process it believes is still active. Do a

cat ~/.config/darktable/library.db.lock

it will show the process it seems to see as active. Then do a

ps -ef | grep {process}

or have a look in

/proc/{process}

and see if there is a process running with that id. If there is the lock is correct and you need to track down the process and see what is keeping it active.

The lock file is not removed when the database is not closed in a clean way (like a server crash, power failure. But it could also be a bug). You then need to remove the lock with ...

rm ~/.config/darktable/library.db.lock

but it will instantly get recreated it there is indeed a process active so you should not skip part 1 of the answer before removing the lock.

If the process does not exist and you can create a log where the database was cleanly shutdown but with the lock file not removed you should file a bug report.


Ubuntu Live USB is not working as expected

When installing Ubuntu either from CD/DVD or USB, and changing the system's BIOS to boot from the desired device, once the system boots this is the first screen that you will get:

The option labeled 1 will allow to boot Ubuntu fully, and the ability to use it, without any changes made to you system.  After you click on the button labeled Try Ubuntu, it will boot up, and give you the desktop, from there you can use it fully, and it will give you the option to install as shown in the image below:

Now if you click on the button labeled 2 Install Ubuntu, that will start the hard drive installation.

Ubuntu Server does not have a live CD.  The other option that's close to that is installing it inside a virtual machine.

This allows you to test, and play with the server as desired, but it doesn't change anything in your system.   And for that you can use VirtualBox.  VirtualBox is free
and you can install it either under Ubuntu desktop or Windows.


With HP try to hit the ESC during startup, then select boot from CDrom with pressing the appropriate function key.


I cannot install Ubuntu 14.04.1 LTS on my Lenovo G50/70 IntelCore I5 from a Bootable USB

i also have a Lenovo G50-70 and have some strugle but did it.
What i've done:

In BIOS:

FASTBOOT - DISABLED
Secure Boot - DISABLED
BOOT MODE - UEFI
OPTIMIZED OS - OTHER OS

And make sure you are using a x64 version of ubuntu.


Software Center - Items cannot be installed or removed until package catalog is repaired"

Sometimes a corrupt installation package can corrupt your package management system leaving your Linux unable to install or on remove any packages (Software). Here is the message error I got from apt-get after trying to install ndas-admin for Ubuntu.

$sudo apt-get install mplayer   (or any package)
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: The package ndas-admin needs to be reinstalled, but I can’t find an archive for it.   (this is the error)

I tried : $ sudo apt-get install -f  , to try to fix the problem but got the same error. The only option I had was to edit the dpkg status file manually.

$ sudo gedit /var/lib/dpkg/status    (if you prefer you can use vi instead of gedit)
Locate the corrupt package, and remove the whole block of information about it and save the file. Mine looked like this:

Package: ndas-admin
Status: deinstall reinstreq half-configured
Priority: extra
Section: alien
Installed-Size: 100
Maintainer: root <root@ubuntu510>
Architecture: i386
Version: 1.0.2-24
Depends: libc6 (>= 2.3.4-1)
Description: Administration toosl for XIMETA,Inc NDAS device driver for Linux operating system
 ndas-admin – This program allows the user to register/enable/disable/unregister the XIMETA NDAS hard disk.
 .
 (Converted from a rpm package by alien version 8.53.)

Fixed. Hope this helps someone else.


You can test installation or uninstallation of package through Ubuntu running on virtual Machine softwares like virtualbox,VMware.


Alt+Tab switching does work BUT closes the applications afterwards

I'm experiencing the same problem, with a slight difference that I have allocated Super + Tab to switching applications.
Here's one remedy : use another window switcher.

So anyhow on to how to change the alt-tab application switcher in ubuntu unity.
sudo apt-get install compizconfig-settings-manager
sudo apt-get install compiz-plugins
Open compizconfig-settings-manager with alt-F2, type ccsm.
Scroll down to "Ubuntu Unity Plugin". Choose the tab "Switcher". Disable the alt-tab and shift-alt-tab key bindings. ("Key to start the switcher" and "Key to switch to the previous window in the Switcher".
Click the "Back" button.
Scroll down to the "Window management" section. Here you can select another switcher.
I enable the "Static Application Switcher", resolve any potential conflicts by setting the setting for "Static Application Switcher".
Now you can tweak the switcher by clicking on it. I have changed alt-tab and shift-alt-tab to "Next window (All windows)" and "Prev window (All windows)".

(Quoted from https://ubuntuforums.org/showthread.php?t=2211863 ).
So far this is working for me.
I haven't experienced the problem since I switched to the other window switcher (that actually implies that the original Unity window manager is causing the problem, and not conflicting keybindings).


tabs changed to spaces when copy & pasting

I suspect that's putty behavior.
You can use the sed command to replace leading spaces with tab characters:

sed "s/    /\t/g" filename

The example above replaces 4 leading spaces with 1 tab. Change the number of spaces to suit your needs. If the output looks right, you can save the changes to the original file instead of printing it to standard out:

sed -i "s/    /\t/g" filename


It's hard to be sure of what is causing this issue because this can be caused by a lot of things, however I have had something similar to this. Here is how I fixed it.

You are going to need to download Ubuntu 13.04 from the website. Then put it on your favourite installation Medium, whether it is a USB or a DVD. Then go and install it. When the installer is first starting and you see the human icon, hit Enter

Then you will see this screen:

Chose your language (I assume English), and Hit Enter. Next, hit F6. In that menu, select nomodeset. Then hit Esc

Now select Install Ubuntu and hit Enter.

You will now go back to your regular installation. What you have done is set that the graphics to not run inside the kernel. I don't know the specifics, but in summary, usually fixes these issues.

Good Luck. Hope it works.


CUDA installation fails - unmet dependencies

I did not have any proprietary nvidia-driver installed. From the ubuntu menu I went to Software and Updates > Additional Drivers and installed nvidia-driver-430.

foo@42:~$ sudo lshw -C display
  *-display
       description: VGA compatible controller
       product: GM204 [GeForce GTX 970]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nvidia latency=0
       resources: irq:30 memory:f6000000-f6ffffff memory:e0000000-efffffff memory:f0000000-f1ffffff ioport:e000(size=128) memory:c0000-dffff

The driver changed from nouveau to nvidia. It also installed CUDA Version: 10.2

foo@42:~$ nvidia-smi
Tue Oct  8 22:27:48 2019
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 430.26       Driver Version: 430.26       CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 970     Off  | 00000000:01:00.0  On |                  N/A |
|  0%   43C    P8    16W / 200W |    191MiB /  4039MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      4953      G   /usr/lib/xorg/Xorg                            16MiB |
|    0      4998      G   /usr/bin/gnome-shell                          51MiB |
|    0      5151      G   /usr/lib/xorg/Xorg                            79MiB |
|    0      5392      G   ...ervice-request-channel-token=1831114496    39MiB |


Will Nvidia be supported in Natty Narwhal with Unity

Natty is in alpha state and recently an xserver update changed its abi so the current nvdia drivers don't work and there is an bug in the floss drivers.

But i am quite sure that the drivers will be updated and even the floss driver's bug will be fixed so you will be able to use 11.04 on 28 April.


How to remove individual Unity Webapps' items from message indicator?

Just go to com > canonical > unity > webapps in "dconf Editor" and remove the items from "allowed-domains" section and then replace unity


ubuntu 14.04 stuck in login loop. Nothing seems to help

Try booting from CD/DVD or network.
Instead of sudo, try /usr/bin/sudo or add PATH: export PATH=$PATH:/usr/bin
Try booting into recovery mode: https://wiki.ubuntu.com/RecoveryMode
There is an option in grub to boot into single user mode (as root), usualy it requires adding single to kernel options and updating grub, but I guess it can also be done in grub command line manually.


How to create a new partition in Ubuntu 14.04?

Follow the standard procedure: boot from a Live CD/DVD/USB/whatever, use your favourite partitioning tool, done.

For partitioning you can use GParted (GUI and my favourite), parted (CLI), fdisk, cdisk or cfdisk. I haven't used any tool other than GParted (which comes with the ISO) to resize and reformat partitions. If you desperately need to use CLI, I can't help.


I found an easy way:

Open /etc/modprobe.d/blacklist.conf as super user, or create it if it is not there.
Add the following line:
blacklist radeon.
Run sudo update-initramfs -u then reboot.

To confirm that the module has been disabled, after rebooting run lsmod, and if radeon is not listed in the output then it has been blacklisted.


What means --clearmodifiers in i3 config

It is not an argument to i3, but rather an argument to xdotool, which is the program launched with the exec directive. The xdotool manual explains the purpose of the clearmodifiers command:

Any command taking the --clearmodifiers flag will attempt to clear any active input
modifiers during the command and restore them afterwards.
For example, if you were to run this command:
xdotool key a
The result would be 'a' or 'A' depending on whether or not you were holding the shift key
on your keyboard. Often it is undesirable to have any modifiers active, so you can tell
xdotool to clear any active modifiers.
The order of operations if you hold shift while running xdotool key --clearmodifiers a
is this:

Query for all active modifiers (finds shift, in this case)
Try to clear shift by sending 'key up' for the shift key
Runs normal xdotool key a
Restore shift key by sending 'key down' for shift

The --clearmodifiers flag can currently clear of the following:

any key in your active keymap that has a modifier associated with it.  (See
xmodmap(1)'s xmodmap -pm output)

mouse buttons (1, 2, 3, 4, and 5)

'caps lock'


I built a system and it would always restart after shutdown. Around the same time I did 2 systems for others with the the same Ubuntu versions and they always shut down just fine.  After trying some things in the O/S every now and then, nothing worked. I finally went into the BIOS under Power Management and shut off everything except leaving base ACPI enabled. Otherwise cool'n'quiet wouldn't work. I did change an S1 setting to S3, disabled everything else(except the base ACPI settting) and changed the control from BIOS to O/S(I figured this way after linux shuts down it won't have any ability to start the system but BIOS still may be able to). After I did these things it finally would shut off -after dealing with this for over 2 and a half years! It's really quite ridiculous but in my case, the blame seems to lie with an MSI motherboard. The two other systems that shut down like they're supposed to are 2 different models of Biostar motherboards.


As you have downloaded the archive setup_CEWE_FOTOSVET.tgz you need to extract it, and run Perl installer script:

./install.pl

It will download 250 Mb and install all needed components to ~/CEWE/CEWE FOTOSVET.


Terminal does not appear in "open with" program list

This works in Unity & Gnome, similar things are there for other desktop environments (for KDE's dolphin file manager, I think you can set what you want it to do by right-clicking on the executable file and selecting 'Open With...' > 'Other')

Right click on the file, and go to Properties, and permissions. Make sure this is ticked :

 (You need this ticked anyway for the file to run in terminal, or be 'executed', it is the same as running chmod +x /PATH/TO/FILE)

And make sure this,  under the Behaviour tab, in Nautilus file manager's preferences, is set to this:

Now every time you click on it, you should get this, which will work much the same as the right-click menu:

Run in Terminal, you can guess. Display opens it in the default text editor defined in 'Open With...'. in the files preferences. Run runs it in the background, with no terminal. This is also what happens if you select 'Run executable text files when they are opened' above.

Also, here is a fix to stop gnome-terminal closing instantly once the script has completed - go to Profile Preferences,  and under Title and Command, set:

, Now when you run a script like this (works the same for shell scripts):

#!/usr/bin/python
import time
print "Hello"
time.sleep(5)
print "Goodbye"

(Remember the shebang #!/usr/bin/python line, otherwise it won't be interpreted correctly. You can also use #!/usr/bin/env python - for shell scripts #!/bin/bash or #!/bin/sh)

It stay open a while, then you should get something like:

To (attempt) to get Terminal to appear in the right-click menu:
I have tried the following adding this to ~/.local/share/applications/mimeapps.list under [Added Associations]:

text/x-shellscript=gnome-terminal.desktop
application/x-shellscript=gnome-terminal.desktop

Also I have tried adding this to gnome-terminal's launcher file (/usr/share/applications)

NoDisplay=false
MimeType=text/plain;text/x-chdr;text/x-csrc;text/x-c++hdr;text/x-c++src;text/x-java;text/x-dsrc;text/x-pascal;text/x-perl;text/x-python;application/x-php;application/x-httpd-php3;application/x-httpd-php4;application/x-httpd-php5;application/xml;text/html;text/css;text/x-sql;text/x-diff;

Neither of which seemed to work - but setting it so you can click on the File and select 'Open in Terminal' is an ideal substitute.


the kate editor is missing in ubuntu 20.04 start menu

The bug which I submitted in June 2020 is still present even with the latest update of 20.04 LTS released in November 2020 (kate 4:19.12.3-0ubuntu1) and still unassigned.
I have found how to reproduce the bug (points 1-5), so also a way to MANUALLY repair it (point 6) every time you save a new session.

file ~/.local/share/applications/org.kde.kate.desktop contains blocks in the following order and everything works as it should (Kate is searchable in the dash and can be pinned to the dash bar):
[Desktop Entry]
...
[Desktop Action Session ...]
...

open Kate, new session

click menubar Session > Save session (choose name, save)

the file ~/.local/share/applications/org.kde.kate.desktop rewrites itself (as it should) but contains blocks in a wrong order (as it should not):
[Desktop Action Session ...]
...
[Desktop Action Session ...]
...
[Desktop Entry]
...

suddenly, kate icon moves to the bottom on the dash bar, when clicked by the right mouse button, you can no longer pin it nor find it among the dash applications

you have to manually open ~/.local/share/applications/org.kde.kate.desktop and move the [Desktop Entry] block to the beginning of the file


how to get the most recent process id of specific application

For simple process id (pid) in Bash scripting, you're looking for $!:

$ kcalc & # starts calculator in background
[1] 15989
$ echo $! # shows pid of last run command
15989

In case you want to find out the pid of a running process (example with kwin), try:

$ pidof kwin # kwin is my window manager
3504


How can I find a program for selecting in "open with..."

After choosing "other application", at the resultant window you must click the bar near the bottom marked "show other applications". I understand your frustration. Ubuntu is ordinarily so sensible that one simply would not expect it to need you to ask to be shown the other applications you might want to select from. After the other options are shown to you, you should be able to find OpenOffice. Once it has been opened this way, it should appear in the menu when you right-click on such a file.


Launchpad Build Recipes: How do I correctly specify build dependencies for packages in the same PPA?

The error messages you get from apt in this kind of situation are slightly misleading: it's in fact telling you that the libwxgtk2.8-dev package is present but uninstallable.  You can get better diagnostics by setting up an environment where apt has your PPA in its sources.list (the chdist tool can be helpful here to avoid disturbing your normal environment or bothering with a full chroot or similar) and drilling down interactively:

$ chdist create codeblocks
Now edit /home/cjwatson/.chdist/codeblocks/etc/apt/sources.list
Run chdist apt-get codeblocks update
And enjoy.
$ cat >.chdist/codeblocks/etc/apt/sources.list <<EOF
deb [trusted=yes] http://ppa.launchpad.net/damien-moore/codeblocks-stable/ubuntu xenial main
deb http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
EOF
$ chdist apt-get codeblocks update
# ignore GPG errors in the output, which don't matter for the purposes of
# inspection
$ chdist apt-get codeblocks install libwxgtk2.8-dev
Reading package lists... Done
Building dependency tree... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies.
 libwxgtk2.8-dev : Depends: libwxgtk2.8-0 (= 2.8.12.1+dfsg2-0~48~ubuntu16.04.1) but it is not going to be installed
                   Depends: libwxbase2.8-dev (= 2.8.12.1+dfsg2-0~48~ubuntu16.04.1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Then you add package names to the command line until you get a more specific message than "is not going to be installed":

$ chdist apt-get codeblocks install libwxgtk2.8-dev libwxgtk2.8-0 libwxbase2.8-dev libwxbase2.8-0
Reading package lists... Done
Building dependency tree... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies.
 libwxbase2.8-0 : Depends: libwxbase2.8-0 (>= 2.8.12.1+dfsg2) but 2.8.12.1+dfsg2-0~48~ubuntu16.04.1 is to be installed
 libwxgtk2.8-0 : Depends: libwxbase2.8-0 (>= 2.8.12.1+dfsg2) but 2.8.12.1+dfsg2-0~48~ubuntu16.04.1 is to be installed
                 Depends: libwxgtk2.8-0 (>= 2.8.12.1+dfsg2) but 2.8.12.1+dfsg2-0~48~ubuntu16.04.1 is to be installed
E: Unable to correct problems, you have held broken packages.
$ dpkg --compare-versions 2.8.12.1+dfsg2-0~48~ubuntu16.04.1 gt 2.8.12.1+dfsg2 && echo yes || echo no
no

So, translating to English, the wx packages in your PPA have internal dependencies on at least 2.8.12.1+dfsg2, but the version you've used for your forward-port to xenial in your PPA is 2.8.12.1+dfsg2-0~48~ubuntu16.04.1 which is (subtly) in fact slightly less than the required version.  You would have to fix the version number, or (more intrusively) adjust the dependencies to be more liberal.

Why not simply copy the source and built binary packages from wily, though?  While they've been removed from xenial, they're apparently still installable if just directly copied forward, and that would be by far the least-effort option.  Grab lp:ubuntu-archive-tools with bzr and run:

$ ./copy-package --from ubuntu --from-suite wily --to ppa:damien-moore/ubuntu/codeblocks-stable --to-suite xenial -b wxwidgets2.8

Then wait a bit for that to copy and publish, and all should be well.  Failing that, I would recommend basing your wxwidgets2.8 source package on the one in wily (2.8.12.1+dfsg2-2ubuntu2) and making sure the version number you use compares greater than or equal to that.

As a side note, your build should actually have been recorded by Launchpad as a build failure rather than a dependency wait, because we can't produce an unambiguous dependency wait in the case of a build-dependency that is present but uninstallable.  I've filed this as bug 1575965.


LibreOffice Calc crashes when dialog window is open

I just did a clean re-install of 16.04, and the problem doesn't occur anymore. I battled with Libreoffice when it ran on 16.04, upgraded from 15.10 by do-release-upgrade -d.

It seems the upgrade wasn't that clean...

Whether it's Impaled Impala 8.10 or another release, IMHO one should rather do a backup of all important directories and then a clean re-install instead of upgrading Ubuntu.


Start a transmission-gtk using a cron job

You need to specify the display for running a gui application through cron. So your line would be:

00 20 17 07 * env DISPLAY=:0.0 transmission-gtk

Check this guide for more details.


Unable to write to ext4, No space left on device?

Looks like I was wrong about it being an issue from somewhere else, it actually wasn't a corruption issue! Fixed via this answer:

  After some fiddling about, I was able to reclaim a large amount of space with tune2fs:

wim@wim-ubuntu:~/Desktop$ df -h | grep sdc
/dev/sdc1             1.8T  1.7T  352M 100% /media/data
wim@wim-ubuntu:~/Desktop$ sudo tune2fs -l /dev/sdc1 | grep 'Reserved block count'
Reserved block count:     24418900
wim@wim-ubuntu:~/Desktop$ sudo tune2fs -m 0 /dev/sdc1
tune2fs 1.41.14 (22-Dec-2010)
Setting reserved blocks percentage to 0% (0 blocks)
wim@wim-ubuntu:~/Desktop$ sudo tune2fs -l /dev/sdc1 | grep 'Reserved block count'
Reserved block count:     0
wim@wim-ubuntu:~/Desktop$ df -h | grep sdc
/dev/sdc1             1.8T  1.7T   94G  95% /media/data

  Apparently linux reserve 5% of new partitions for the root user and system services, so that when you run out of disk space, root can still log in and clean stuff up with system services running ok. Seems kind of bananas to me when the system services only need a hundred meg or so, and 5% of a 2TB drive is a $h17load more than that.. shrugs

  This left me with 93.5 GB free, which still leaves about 30 gig unaccounted for, so if anyone has any more ideas feel free to chip in!


Infinite loading package in apt-get, infinite Get. Repeatedly trying

If you are using any (transparent) proxy severs, it may be a misconfiguration of a proxy. Try to use HTTPS mirrors to eliminate such issues.


I figured it out: I pressed Ctrl+Alt+F3 and typed sudo apt-get install unity and Unity came back!


replace entire column in a file with random String

Assuming that file.txt contains lines of text that are divided into three columns with commas and that there are no additional commas anywhere, so each line has exactly two of them:

replacement="my string"
sed "s/,.*,/,$replacement,/" file.txt

Output:

SveUJW24ibppfePgYeYHz7fC0,my string,yL6mCP0Do28k4EoTZUfKfqNYiIhGxxkA
xyRG8Da6kY35xeIT492Lul7xu,my string,ne6RIM2TeMQAax1GgzL7FeDrnQyHPH1i
sxTf13KlAnjtXodJouQ9V6m5b,my string,GUnApYwwDCZxWGZtzKzTU6sJRgHlUUfQ
7cjW5DZlXw1LYzVugbVyqfxRX,my string,XttE1In9eZQ8puJVUriuNvx2AJAxviGf
XiLE8r9AMqy5YZQ9BbIS6m559,my string,DssiszVBa05pbVDSOXNRaFXRxw0eZKHf
Sygrl5287BViOn0uQ9uCYipB1,my string,sD2O46sbh1yVIluoyn6Zm2OKXYe05vV9
Qi6DxJ96M0hxNe4cgux3iJ1aS,my string,wk2eF3f9xk5HowLzDIL3hCCNSmx8Uwi8
ZIX7qp5IIPekA0kzBdFR4IUQZ,my string,99ilfJWoJEBsKOfYI3buFfher07OCz6Y

This will process all lines at once and replace the middle column with the same value each time. The changed content will be printed to the terminal by default, if you want to modify file.txt in place instead, write sed -i instead of plain sed.

If you need to update the replacement variable for each line anyhow (here a new random string for each line), you can loop over the lines like this:

while read line ; do
    replacement="random number $RANDOM"
    sed "s/,.*,/,$replacement,/" <<< "$line"
done < file.txt

Example output:

SveUJW24ibppfePgYeYHz7fC0,random number 27584,yL6mCP0Do28k4EoTZUfKfqNYiIhGxxkA
xyRG8Da6kY35xeIT492Lul7xu,random number 2959,ne6RIM2TeMQAax1GgzL7FeDrnQyHPH1i
sxTf13KlAnjtXodJouQ9V6m5b,random number 5463,GUnApYwwDCZxWGZtzKzTU6sJRgHlUUfQ
7cjW5DZlXw1LYzVugbVyqfxRX,random number 12889,XttE1In9eZQ8puJVUriuNvx2AJAxviGf
XiLE8r9AMqy5YZQ9BbIS6m559,random number 3754,DssiszVBa05pbVDSOXNRaFXRxw0eZKHf
Sygrl5287BViOn0uQ9uCYipB1,random number 25375,sD2O46sbh1yVIluoyn6Zm2OKXYe05vV9
Qi6DxJ96M0hxNe4cgux3iJ1aS,random number 5284,wk2eF3f9xk5HowLzDIL3hCCNSmx8Uwi8

It's probably the easiest way to put this code snippet into a script file and then you ran redirect its output to a separate new file (not the original file from which you read!) like this:

bash my-replacement-script.sh > new-file.txt


Refresh rate of 60 not available for 4K resolution

I found the solution but it was unrelated to the suggestions proposed by others. I did some reading and found that the reason my refresh rate was limited to 30 Hz was due to my TV settings. In my TV settings there was a property "Input Settings", which allows you to set the HDMI protocol for each port. There were three options: 1.4, 2.0, and Auto. Mine was initially set to Auto, but I changed it to 2.0. After a reboot of my computer and checking my display settings with the xrandr I see the proper list of refresh rates for 4K, with 60 Hz being the recommended value.

Long story short...check your TV input settings too folks! Thanks for the suggestions.


What you need is not to start Windows without Vbox, but for your vbox to use the existing disk instead of a disk image. In other words, your Windows will still run within VirtualBox (there is no way around it!) but instead of installing it on a virtual disk image (VDI), you use an existing partition with an existing Windows installation.

You still have to create the virtual machine, but make it use a real disk.

As far as I can tell, this is possible. However, you might want to read the Virtualbox manual.


How do I access Zpanel (Control Panel) files?

Zpanel FTP users are virtual users that have no right to access the server out of their virtual-root domain directory, so they are not enabled to create such access.

But if you are adminisrator you can login to phpmyadmin as root and change manually the root path of any FTP user:
- in database zpanel_core, table x_ftpaccounts, column ft_directory_vc (path relative from zpanel dir, for display and remember)
AND
- in database zpanel_proftpd, table ftpuser, column homedir (absolute path for ftp access)

But REMEBER that opening an access to /etc/zpanel/panel will give access to all files of the panel, including files that contains login and password for mysql.
I ADVISE TO NOT DO IT, or if you require it imperatively to leave it only for a short time and with a real strong password (at last 12 chars mixed from alphanum and case)


Icon theme "Adwaita" not found - Ubuntu 14.04

I had the same problem on xfce. Okular searches for "adwaita", while /usr/share/icons/ has "Adwaita". Adding a soft link to Adwaita fixed it.

cd /usr/share/icons
sudo ln -s Adwaita/ adwaita


VI Editor messed up.. Even the old vi is not working now

Try uninstalling and reinstalling vim.

sudo apt-get remove vim && sudo apt-get install vim


Custom launcher not showing up in 'applications'

Usually this is Due to a Wrong or Missing Exec Command Path...
So Triple Check the Exec Command and Eventually Set the Absolute Path to the Binary.


Normally, sudo apt-get --purge remove [package] doesn't need your input to find a package that was installed either with a package manager (which use dpkg to unpack the application) or preinstalled with the OS.  The only time you really need to know where the package is, and where it keeps its configuration, is for manually installed packages (i.e. *.tar.zip or similar).


how to have 'find' not return the current directory

find returns the root path because it matches your criteria—i.e. it is a directory, and it doesn't start with _.

You're looking for -mindepth 1, I suspect:

$ cd /tmp
$ mkdir a
$ touch a/b
$ mkdir a/c
$ touch a/c/d
$ find a
a
a/b
a/c
a/c/d
$ find a -mindepth 1
a/b
a/c
a/c/d

Reference: find manpage


TL;DR The script can not work because that shortcut will be sent to the active window, and that's not chromium-browser with Streamus.

This is your reload xdotool command:

xdotool search --limit 1 --name "^Streamus$" | xargs -I {} xdotool windowactivate --sync {} key ctrl+r

The complete command in your case is:

/usr/bin/chromium-browser --disable-gpu --enable-offline-auto-reload --enable-offline-auto-reload-visible-only --app=chrome-extension://jbnkffmindojffecdhbbmekbmkkfpmjd/foreground.html & xdotool search --limit 1 --name "^Streamus$" | xargs -I {} xdotool windowactivate --sync {} key ctrl+r

The execution of the shortcut can be somewhat delayed with sleep 1:

/usr/bin/chromium-browser --disable-gpu --enable-offline-auto-reload --enable-offline-auto-reload-visible-only --app=chrome-extension://jbnkffmindojffecdhbbmekbmkkfpmjd/foreground.html & sleep 1; xdotool search --limit 1 --name "^Streamus$"| xargs -I {} xdotool windowactivate --sync {} key ctrl+r

This is your play/pause xdotool command:

xdotool search --limit 1 --name "^Streamus$" | xargs -I {} xdotool windowactivate --sync {} key alt+z

A sample script:

To start Streamus, reload and "press" play

#!/bin/bash

# Start Streamus
/usr/bin/chromium-browser --disable-gpu --enable-offline-auto-reload --enable-offline-auto-reload-visible-only --app=chrome-extension://jbnkffmindojffecdhbbmekbmkkfpmjd/foreground.html &

# Wait three seconds to finish the previous command
sleep 3

WID=$(xdotool search --limit 1 --name "^Streamus$")

# Refresh the page
xdotool windowactivate --sync "$WID" key ctrl+r

# Wait three seconds to update the page (Ctrl+R).
sleep 3

# "Press" Play
xdotool windowactivate --sync "$WID" key alt+z

Explanation:

xdotool search --limit 1 --name "^Streamus$"

search

Search for windows with titles, names, or classes with a regular expression pattern.
limit N

Stop searching after finding N matching windows. Specifying a limit will help speed up your search if you only want a few results.
--name

Match against the window name. This is the same string that is displayed in the window titlebar.

xargs -I {} xdotool windowactivate --sync {} key ctrl+r

xargs -I {}

Build and execute the command xdotool
xdotool windowactivate --sync {} key ctrl+r

windowactivate

Activate the window.
sync

After sending the window activation, wait until the window is actually activated.
{}

xargs replaces {} with the window id
key ctrl+r

sends the shortcut Ctrl+R


When using `byobu` in a PuTTY session cannot create new windows

Since you are using 10.04 I'll assume you are still using the screen backend to byobu. You should also learn the screen shortcuts - at least the most important ones.

Ctrl+ac == create new window
Ctrl+ap == previous window
Ctrl+an == next window
Ctrl+aa == toggle between two windows
Ctrl+a[number] == switch to window [number]
Ctrl+ad == detach from session

There are various reasons why this may not work. And you will encounter more the more different programs you use.

For example the default byobu shortcuts block out the ones in Midnight Commander (various F-keys), but you can use Alt+[number], e.g. Alt+1 replaces F1.


Shell command for outputting absolute path of binary

Try which ls to discover full path to ls command


bypass the yes prompt in apt-get install, but only authorized packages

If I understand your question correctly, you use one of the options -yor --yes, or --assume-yes

From the man page http://manpages.ubuntu.com/manpages/utopic/man8/apt-get.8.html

  -y, --yes, --assume-yes
             Automatic yes to prompts; assume "yes" as answer to all prompts and
             run non-interactively. If an undesirable situation, such as
             changing a held package, trying to install a unauthenticated
             package or removing an essential package occurs then apt-get will
             abort. Configuration Item: APT::Get::Assume-Yes.

I suppose it may depend on what you mean by "unauthorized packages"

I would use extreme caution with any of the force options with apt-get, forcing things is a good way to break apt, or your install, or both.


Autostart of the xserver at boot up when the monitor is unplugged

Replace xorg.conf in /etc/X11 by the file in : http://ubuntu-virginia.ubuntuforums.org/showpost.php?p=9565510&postcount=25

Edit /boot/grub/menu.lst to add " nomodeset" to the line beginning with "# kopt=", then run sudo update-grub.  The # should stay at the beginning of the line.  (see https://wiki.ubuntu.com/LucidLynx/ReleaseNotes#Working%20around%20bugs%20in%20the%20new%20kernel%20video%20architecture)

Thanks to JanC for it's help.  If I could, I would edit it's answer.


How do I manage multiple ubuntuone accounts?

I don't think this is possible. Ubuntu One is much more than just a file storage thing. It potentially contains your databases, bookmarks, contacts, application configurations, web identities, etc. It doens't make much sense to use more than one Ubuntu One account. Does it? If it does, then you should provide a use case scenario and maybe it'll become possible in the future.


I was having the same problem right now... It may not be your case, but I have a DisplayLink adapter. I couldn't make it work in previous Ubuntu versions, but it works now. The problem is that I get the symptoms that you described. I unplugged it, and everything got faster.


cudnn 7 confliction problem in compiling tvm with cuda 10.0, ubuntu 18.04

The problem does not create any error to stop installation. There are libraries from previously installed cudnn. to solve the warning, it is enough to go
     /usr/lib/x86_64-linux-gnu
and remove libcudnn.so.7.


I ran into similar problems. LinuxMint 17.3 (Ubuntu 14.04) does well on my dual monitor configuration. That is, using the proprietary fglrx driver. I can get 1440x900 on both displays, even though one connection is VGA straight and the other VGA through a HDMI-to-VGA converter.

Using an AMD Radeon HD 6450 PCI_e graphics card and 2 Asus VE198S LED monitors, with 1440x900 as max resolution and VGA/DVI-D/HDMI ports.

Whatever I tried - running LinuxMint 18 with either KDE or Cinnamon as live distro from a USB stick - I could not get anything better than a disappointing 1024x768 resolution on both screens. So, I'll stick to Ubuntu 14.04 and fglrx as long as necessary (and possible).

[EDIT:] Maybe this information is helpful? >
Ubuntu 16.04 and amdgpu issues


how to pass multiple files to zip for zipping

Sure. The man page of zip says you can specify [file ...] on the command line. This notation says you can specify multiple files separated by spaces, like this:

zip a.zip a.txt b.txt c.txt

You can also utilize pathname expansion. The shell will replace wildcards used in the filename with all matching filenames. Example:

zip a.zip *.txt


Ubuntu 12.04 does not recognize HDMI and displayport outputs in Dell Precision M4700

If I am not mistaken the HDMI port is being controlled by the NVidia graphics card.In order to make it work you have to activate the NVidia card only and disable the Intel card from the BIOS.There must be something that it will give you three option about the Display in the BIOS.One of them is Optimus,another is Integrated Graphics and the final one is Discrete graphics.

If you haven't changed it since the day you bought the laptop then it is probably running on Optimus mode.Optimus technology is not supported very well in Linux distributions in general.

Unless of course there is a way to do it using bumblebee or newer drivers from NVidia which might bring better support

BE CAREFUL THOUGH!

I tried to do the same thing on my laptop and I messed it up really bad.Because NVidia graphics card have their own XSERVER when you boot using only the NVidia graphics card it might change the XSERVER settings and when you you wish to run again on Optimus mode under Ubuntu it might be impossible.This is what happened to me and I had to reinstall Ubuntu,because It didn't know how to fix it.

I suggest you also to wait for other responses of other members as well.It is certain that there are people here who know better than me.


Can't acces to Xauthority for X11VNC (Ubuntu 20.04)

The problem was the display.
As lightdm only uses one display (:0), GDM raises a display for each user, so this should be correct and works for me:

x11vnc -xkb -noxrecord -noxfixes -noxdamage -forever -rfbport 11226
-auth /run/user/1000/gdm/Xauthority -display :1


Unable to install Ubuntu 12.04 - Acer Aspire 5750G

Create your own Virtual Machine, and try to install it using your downloaded image, CD again.

https://www.virtualbox.org/ might help. If you can't install using VM, you have a bad download (and/or CD). If you can, mind using it or forcing WUBI to install again.


tried ntfs format in terminal but says internal error

1st of all its a bug mkfs.ntfs link is broken and fails

Just copy paste the following command to FIX it.

sudo ln -s /sbin/mkntfs  /usr/sbin/mkntfs

OR

sudo rm -rf /sbin/mkfs.ntfs && sudo ln -s /sbin/mkntfs /sbin/mkfs.ntfs

Done

sudo mkfs.

If you do

locate mkfs.ntfs

The output will be

/sbin/mkfs.ntfs
/usr/share/man/man8/mkfs.ntfs.8.gz

When you do ls -l to mkfs.ntfs

      ls -l /sbin/mkfs.ntfs
      lrwxrwxrwx 1 root root 16 Apr 25 23:53 /sbin/mkfs.ntfs -> /usr/sbin/mkntfs
                                                 (Red)                (RED)

See the link has been broken and there is no mkntfs and if you do

  locate mkntfs

Its in /sbin not in /usr/sbin

 /sbin/mkntfs
 /usr/share/man/man8/mkntfs.8.gz

So now its up to you want to want to do, remove the link and make new one OR relink the old one with another link


why pipes are used instead of input redirection

I believe the < > operators are used for reading/writing files whereas the | symbol is used for piping the stdout of one command to another.

cal | less

lets you view the output of cal in a command called less.

cal > less

puts the output of cal into a file called less.


integrate apps to ubuntu without Ubuntu Software Center

Here's my /usr/local/share/applications/processing.desktop:

[Desktop Entry]
Name=Processing Development Environment
Exec=processing %F
Terminal=false
Type=Application
StartupNotify=true
Icon=pde
Categories=Development;IDE
MimeType=application/x-processing-sketch

Assuming processing is in your $PATH. Otherwise you need to specify the executable path after Exec=. There's no “standard“ MIME type for processing, so I made one up (application/x-processing-sketch). You also need to add it to mimeapps.list.

Alternatively you can look at the answers to How to make file association (not with CLI tool/command)? how to create a file association for your user account only.

A suitable icon pack can be found at http://www2.informatik.hu-berlin.de/~foerstda/libs/pde-icons.tar and installed with

sudo tar -xf pde-icons.tar -C /

or simply

wget -O - http://www2.informatik.hu-berlin.de/~foerstda/libs/pde-icons.tar | sudo tar -x -C /


If an internal HDD is not mounted, is it still in function?

If none of the partitions on your hard drive are in use (swap ?) , then yes the drive is not "in use". It can still be damaged if you hit or drop your box hard enough though ;)


Allow CUDA development in VirtualBox running Ubuntu 16.04

This solution was provided on stackoverflow: https://stackoverflow.com/questions/27306724/ubuntu-14-04-how-to-install-cuda-6-5-without-installing-nvidia-driver

Alternatively, Robert Crovella provided the following on stackoverflow:

  If you use a deb (package manager) install method provided by NVIDIA
  you can just install cuda-toolkit-8-0 instead of install cuda to get
  the toolkit install without the drivers. This information is covered
  in the CUDA linux install guide and in numerous topics on the web.

Using the cuda*.run method worked for me but the default install directory required setting an environment variable PKG_CONFIG_PATH appropriately to get the Qt build process to recognize the cuda toolkit. It is possible that using the .deb method with install cuda-toolkit-8-0 would have been easier, as it seems to take care of those details for you.


Upgrading from 12.04 to 14.04, will apps have to be reinstalled

update will not damage the files whatsoever, however apps lacking the 14.04 support might cause problems. It will ask you removal of ppa's in that case Everything personal should remain same after the process, however i would take a backup using "aptik" for apps and copy my personal files somewhere safe incase of things get dirty


this might do the trick:

read folder_1

until [ `find /etc/skel/ -maxdepth 1 -type d -name "${folder_1}" | wc -l` == '1' ]; do
    echo -n "Incorrect folder: "
    read folder_1
done

be careful: when using -d "/etc/skel/$folder" like suggested in muru's post, users could enter nasty things like .. or ../../../root/ etc. so this could be a security hole then.


How can I upgrade pip to the latest version?

I usually just run the following commands to upgrade both pip2 (=pip by default) and pip3:

sudo -H pip3 install --upgrade pip
sudo -H pip2 install --upgrade pip

You must make sure that you upgrade the version (for Python 2 or 3), which you want to react on the command pip without number, last.

Also please note that this keeps the old packaged versions installed through apt-get or any other package manager, but adds new versions which have nothing to do with the system packages. The pip-installed packages will be preferred, but you should not remove the apt-get-installed ones either, because the package manager can't know that any pip version is installed otherwise.


How to use sed to remove variables value from a string

Within single quotes the variable is not substituted (because $ has no special meaning withing single quotes). You can use double quotes instead:
echo 'This is a foo test' | sed "s/\<$temp\>//g"


I sorted it out myself using this fix: turned out i needed the 'generic' parameter instead


Switching to left-handed mouse leaves touchpad taps reversed

This will swap the behavior of the single tap with the behavior of the double tap  in the current session:

synclient TapButton1=3; synclient TapButton2=1

To make the changes permanent, add the commands to /etc/init/lightdm.conf after the line post-start script:

post-start script
    synclient TapButton1=3
    synclient TapButton2=1
    sleep 5
    clear > /dev/tty7
end script


Can't Install Ubuntu 12.10 on Asus X401U help needed

You should install grub to the MBR. So just let Ubuntu install grub automatically to /dev/sda. You do not want it installed to /dev/sda1 or /dev/sda2.
There is no need to add anything to the original /dev/sda, as you said you tried to do.


Is there a simple fix to get my launcher size slider bar back in Settings>Appearance?

CompizConfig Settings Manager (ccsm from Terminal)

and change icons size:


Reset root password for Ubuntu 16.04 - recovery mode asks for root password

Since you have physical access to the machine you can do this via an Live USB/CD.

Boot from your USB and chose 'Try Ubuntu' instead of 'Install Ubuntu'.

Open a terminal (Ctrl+Alt+T) and first look what device handle your machine disk has. You can do that with lsblk which should yield an output like this (I used a live CD for this since I am reproducing the steps in a VM):

$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 119,2G  0 disk
├─sda1   8:2    0    16G  0 part [SWAP]
└─sda2   8:3    0 103,2G  0 part /
sr0     11:0    1  1024M  0 rom  /cdrom

So in this case it would be /dev/sda2 but this could differ for your installation.
Now mount the partition in question with:

sudo mount /dev/sda2 /mnt

Now coming to the part where you can finally1 chroot into it.

sudo chroot /mnt

You will see that your prompt has changed to something like root@ubuntu:/# and now the next steps are pretty straightforward.
Change the password for your users with passwd:

passwd root
passwd <main-user>

This should have done it already, but if that for whatever case setting passwords with the passwd command fails, you can go deep down the rabbit hole and change the /etc/shadow file, but Beware: this is quite dangerous and you do this at your own risk.
Exit the chrootby pressing Ctrl+D or type exit. Unmount the machine with sudo umount /mnt and then reboot by sudo reboot. You want to take the USB/CD out and make sure you're actually booting the machine in question.

1 That chrooting method is sufficient to reset passwords, or even to add and remove users from groups, but it does not allow you to fully use the installed system through the chroot. Many other commands, such as apt, would fail if you ran them in a chroot set up that way.

If you ever need to perform more extensive repairs on an installed system that you are accessing from a live CD/DVD/USB--for example by installing, removing, or updating software--then you would want to set up some additional mounts before chrooting. You would do that by running these commands after running sudo mount /dev/sda2 /mnt but before running sudo chroot /mnt:

sudo mount -o bind /dev /mnt/dev
sudo mount -o bind /dev/pts /mnt/dev/pts
sudo mount -t sysfs /sys /mnt/sys
sudo mount -t proc /proc /mnt/proc

If you have multiple partitions for the different parts of the OS, like for example a separate /boot partition, then you would want to mount them to the right positions. For example, where sdX is the device name for that particular drive and n is the partition number:

sudo mount /dev/sdXn /mnt/boot

It is fine if you run those commands before chrooting in to reset passwords with the passwd command. It is not necessary, though.


Ubuntu on Acer E5 573G-71L9 - wireless LAN disconnects randomly

I finally found a solution for this problem. Or rather, the solution has been implemented for me: the required drivers are now part of the Ubuntu 16.10 distribution. It works out of the box :-).


First list your devices:

xinput --list-props 14

look for your device, shoul be called something with touch

xinput set-prop 'Your device name' 'Device Enabled' 0

Changing the 0 to 1, would enable the device


Is there any 'Search Software Center' lens?

The 'apps available for download' section in the dash when you press super-A is essentially a search USC lens. Is that what you're looking for or have I misunderstood?


You cannot sync a folder outside your home directory with Ubuntu One directly. However, if you're looking to save the contents of (say) /var/www into Ubuntu One in order to back it up, and you're using Ubuntu, then please have a look at Déjà Dup, which you can install from Software Centre; it allows you to back up any folders you want to Ubuntu One and then later restore them if you need to.


DNS is deleted from the resolv.conf file on Ubuntu

You don't manually edit /etc/resolv.conf.

What you do is go to the network icon in the top panel and select Edit Connections..., open the profile for your connection, and go to the IPv4 Settings tab and set it as follows:

Automatic (DHCP) addresses only
comma-separated list of DNS servers


I removed the unity shell and changed back to the gnome one, and discovered the you can create "bookmarks" on Unity files display which appears on the left side of the window


I am using Eclipse Indigo 3.7.0 on two PCs, a 5 year old laptop (32bit Ubuntu 11.10) and a new built PC (64bit Ubuntu 11.10). The menu colors of a selected menu item could have been more visible relative to the background, but else the menus are working.

You say you downloaded from the Eclipse  website. I downloaded Eclipse Indigo the following way in the Terminal:

sudo apt-get install eclipse eclipse-cdt eclipse-JDT

(another post in this forum recommends this: sudo apt-get install eclipse eclipse-jdt eclipse-pde eclipse-platform eclipse-rcp)

For a 64 bit Ubuntu, you may need this as well:

sudo apt-get install ia32-libs-multiarch


sudo dpkg -i libgcrypt11_1.5.0-5+deb7u1_amd64.deb

indicates the .deb archive libgcrypt11_1.5.0-5+deb7u1_amd64.deb is in the current directory i.e. the directory from where you are running the command which clearly is not there.

To solve this, You need to use the appropriate path to the directory where the file is stored e.g.:

sudo dpkg -i /foo/bar/libgcrypt11_1.5.0-5+deb7u1_amd64.deb

or cd into the directory containing the file and then run e.g.:

cd /foo/bar && sudo dpkg -i libgcrypt11_1.5.0-5+deb7u1_amd64.deb

Test:

I don't have any file libgcrypt11_1.5.0-5+deb7u1_amd64.deb in the current directory, so i get:

% sudo dpkg -i libgcrypt11_1.5.0-5+deb7u1_amd64.deb

dpkg: error processing archive libgcrypt11_1.5.0-5+deb7u1_amd64.deb (--install):
 cannot access archive: No such file or directory
Errors were encountered while processing:
 libgcrypt11_1.5.0-5+deb7u1_amd64.deb


From Python 2.7.13 :: Continuum Analytics, Inc. what I can see is that you are running a third party version of python as your default python.

You can change your PATH environment variable and give a higher priority to default python:

PATH=/usr/bin:$PATH

Or open this file: change_wallpaper_reddit.py, it starts with a line similar to: #!/usr/bin/env python, change it to #!/usr/bin/python2.7.

Save the file and run your script again.

If you get any other error related to modules just install those modules too.

Also install the modules using apt instead of pip because I believe your pip is installed using the third party python and packages installed using it are not available to your system's python.


As I understand ping command sends ICMP echo request to the host, then host reply ICMP echo reply. So if you block all ICMP, ping doesn't work at all.
You should add this:
iptables -A INPUT -i eth0 -p icmp --icmp-type echo-request -s 192.168.56.101 -j DROP

This will block only request, but not reply
Answering you question in comments
It does not blocking outgoing ping request. It is blocking all incoming ICMP packets.
When you execute ping:

ping send ICMP request packet to 192.168.56.101 (It is outcoming ICMP)

192.168.56.101 receive this packet and send reply ICMP packet back to your server

Now your server iptables block this incoming reply packet. That's what is happening.

You can check it using this command sudo tcpdump ip proto \\icmp on 192.168.56.101. It will show you all ICMP requests/replies online.
Do this:

Remove this rule from server:
iptables -A INPUT -i eth0 -p icmp --icmp-type echo-request -s 192.168.56.101 -j DROP

Add this rule to your server:
iptables -A INPUT -i eth0 -p ICMP -s 192.168.56.101 -j DROP

Now execute this command on 192.168.56.101:
sudo tcpdump ip proto \\icmp

Execute ping 192.168.56.101 on server.

Now you should see on 192.168.56.101 that it receive ping request, and send reply. But iptables on server block this reply.


How to increase the temperature when CPU scaling is triggered?

It appears that stopping the service thermald makes it possible for the system to reach much higher temperatures before throttling.


Local ubuntu desktop cannot login after logging in remotely via Xrdp session

By default xrdp will create a new session when you remotely connect and the local user must be logged out first for this to work or otherwise you will see a blank screen when you connect remotely.
To have xrdp log you in to the existing active logged-in local session instead, follow these steps:
First, enable screen sharing in Ubuntu settings and set a password.
Then, edit /etc/xrdp/xrdp.ini like so:
sudo nano /etc/xrdp/xrdp.ini

Then, copy and paste the following at the end of the file:
[xrdp1-loggedin]
name=Local Active Session
lib=libvnc.so
username=na
password=ask
ip=127.0.0.1
port=5900

Then, save the file and close the editor by pressing Ctrl + x then y then Enter
Finally, run in the terminal:
gsettings set org.gnome.Vino require-encryption false

Next, login locally then connect from a remote machine and choose Local Active Session from the Session drop-down menu when you see this screen:

Then, enter the password you set for screen sharing and click the OK button when you see the password field that looks like this:


Unattended/headless Ubuntu server with disk encryption - how to set it up?

Remote unlocking of encrypted partition
There is a easy and more or less standard way to unlock encrypted partitions on start-up, without modification to root-partition. It requires dropbear and busybox.
$ sudo apt install dropbear busybox

Add busybox to initramfs
To enable busybox in the initial RAM disk, set BUSYBOX=y in /etc/initramfs-tools/initramfs.conf. The dropbear SSH host keys are stored in the /etc/dropbear-initramfs folder.
Add public keys to authorized_keys of dropbear
There is no user management in the initial RAM disk, so only the root-user with a public key in the /etc/dropbear-initramfs/authorized_keys can login via ssh. You can add any public or simply copy the one of you user:
$ sudo cp ~/.ssh/authorized_keys /etc/dropbear-initramfs/authorized_keys

dropbear currently does not support ed25519 keys, so adding them to dropbear won't work.
Update initramfs with dropbear keys
After that, initial RAM disk needs to be updated:
$ sudo update-initramfs -u

That's it, now reboot the system and with for the cryptsetup dialog.
Unlocking the system remotely
After the reboot, the system will wait for the unlocking of the encrypted device. Login via ssh with the root user and the corresponding private key.
# From a remote system
$ ssh -i ~/.ssh/my_private.id_rsa root@my.system.waiting.for.a.password.com
Enter passphrase for key '~/.ssh/my_private.id_rsa':

BusyBox v1.30.1 (Ubuntu 1:1.30.1-4ubuntu6.1) built-in shell (ash)
Enter 'help' for a list of built-in commands.

#
# cryptroot-unlock
Please unlock disk ubuntu-root:
cryptsetup: ubuntu-root set up successfully
# Connection to my.system.waiting.for.a.password.com closed by remote host.
Connection to my.system.waiting.for.a.password.com closed.

And the system will start with unlocked root device.


How can I restore USB 2.0 functionality after an upgrade to Ubuntu 18.10?

In the BIOS, set IOMMU to "Enabled"

That gets the USB 2.0 ports working, but now the USB 3.0 ports don't work.
In the BIOS, check the USB setting. It should probably be set to "legacy", but if it's already set that way, try another setting, and see if the USB 3.0 ports work again.
In the terminal...

sudo -H gedit /etc/default/grub
Input your password
Then find the line that says:

GRUB_CMDLINE_LINUX=""
Then make it this:

GRUB_CMDLINE_LINUX="iommu=soft"
Save the file
Then run this in the terminal...

sudo update-grub
Reboot

Source: Gigabyte GA-990FXA-UD3 USB ports not working


Why chinese character can't be displayed after installing noto cjk?

You have to add the config file for Chinese, here is the /etc/fonts/local.conf:

<fontconfig>
  <match target="pattern">
    <test qual="any" name="family">
      <string>serif</string>
    </test>
    <edit name="family" mode="prepend" binding="strong">
      <string>Noto Sans CJK TC Regular</string>
      <string>Noto Sans CJK SC Regular</string>
      <string>Noto Sans CJK JP Regular</string>
      <string>Noto Sans CJK KR Regular</string>
    </edit>
  </match>
  <match target="pattern">
    <test qual="any" name="family">
      <string>sans-serif</string>
    </test>
    <edit name="family" mode="prepend" binding="strong">
      <string>Noto Sans CJK TC Regular</string>
      <string>Noto Sans CJK SC Regular</string>
      <string>Noto Sans CJK JP Regular</string>
      <string>Noto Sans CJK KR Regular</string>
    </edit>
  </match>
  <match target="pattern">
    <test qual="any" name="family">
      <string>monospace</string>
    </test>
    <edit name="family" mode="prepend" binding="strong">
      <string>Noto Sans CJK TC Regular</string>
      <string>Noto Sans CJK SC Regular</string>
      <string>Noto Sans CJK JP Regular</string>
      <string>Noto Sans CJK KR Regular</string>
    </edit>
  </match>
  <match>
        <test name="family" compare="contains">
                <string>Noto Sans CJK</string>
        </test>
        <edit name="autohint" mode="assign">
                <bool>false</bool>
        </edit>
        <edit name="hintstyle" mode="assign">
                <const>hintfull</const>
        </edit>
  </match>
</fontconfig>

change the permission of these fonts.

sudo chmod 644 /usr/share/fonts/opentype/noto/*
create a local.conf in /etc/fonts/ and paste the content which is listed above.

sudo vi /etc/fonts/local.conf

Then it will call the Noto Sans CJK for Chinese.

By the way, Ubuntu 16.04LTS will set the Noto Sans CJK as default fonts for Traditional Chinese, Simplified Chinese, Japanese and Korean.


Command line prompt looks strange in virtual console

It turns out that things go wrong when a command to set the window title is executed in a virtual console (where there is no window). Changing

PROMPT_COMMAND='printf "\e]0;%s\a" "$TERM"'

to

if [[ $TERM = xterm* ]]; then
    PROMPT_COMMAND='printf "\e]0;%s\a" "$TERM"'
fi

solves the problem.


To everyone, I solved it using PhotoRec. Great tool for retrieving lost files from external hard drive.


Opening frequently used software using terminal with user assigned short names in Ubuntu 20.04

vim ~/.bashrc

Edit by typing i, add alias cube='<your command>' at the bottom, then leave by typing :wq
source ~/.bashrc

Your changes will take effect when starting a new session, or you may activate them by sourcing .bashrc


flvtool2 and yamdi are tools to manipulate flv metadata, they are both command line based tools though, and you do not seem to want that, also the metadata they can inject may not be what you want, see what yamdi can do here http://yamdi.sourceforge.net/,  something about flvtool2 here http://www.inlet-media.de/flvtool2/ the kind of metadata they handle may not be suitable so  test them.

While it is not so  good to convert one lossy compressed video format to another, I have no choice but to convert some of my videos to the vastly superior .mp4 format, in doing this videos can be tagged with itunes compatible metadata quite easily with mp4tags from  mpeg4ip-utils, the metadata so embedded in this format is widely supported, all major media players on Ubuntu are able to read them and these tags will be available in the right click properties Audiio/Video tab in nautilus too, mp4tags is command line based but  Easytag-aac can tag .mp4 video files quite easily too, even the VLC media player has this feature. it is up to you to convert or not to convert.

If conversion is out of the question then one can use the Banshee media player as a manager for most video files, just import your files into the program then you can enter the necessary information about your videos in the banshee interface, much the same way you do your music, the only thing is that this information will be stored in the Banshee sqlite database, and not the file itself, not a big broblem in some cases.


Is it still possible to develop C# software for Ubuntu?

Monodevelop is still actively developed

It's no longer packaged for recent versions of Ubuntu

You will have to setup their own repo

Though less popular than it used to be IMHO for desktops, Mono itself is still actively developed and recently mono on mobile platforms.


May be the data has been removed from the given image.
In general facebook and other social medias removes such data


Cannot mount guest additions with virtualbox

I don't think you can necessarily do this as easily as you would a GUI. I recommend adding Ubuntu Desktop (or some GUI) first, and then trying to insert the Guest Additions ISO. If that still doesn't work, try navigating to the ISO file and burning it on to an actual medium. From there, you should mount your host CD/DVD drive and install additions that way. It's possible to install Additions from CLI, but it will depend on what the CD name is in order to navigate to it. If it's more than one word, you need to put it in quotes. Click this link to see how to do so. Also make sure you have the necessary tools and dependencies installed! (I still recommend doing this with a GUI, though. Here's how to install some GUIs onto Ubuntu Server.)


netplan vs NetworkManager on Ubuntu 18.04 and above

The difference the renderer makes, is the decision to run either systemd-networkd or NetworkManager. This distinction is identified by a file in /etc/netplan/*.yaml.
networkd is normally used in server installations, where the network environment is fairly static.
NetworkManager is normally used in desktop installations, and was used in all prior versions of Ubuntu. NetworkManager is easier to use in environments where network requirements change a lot... like in wireless networking. nmcli/nmtui/etc are NetworkManager commands.
To use NetworkManager, your /etc/netplan/*.yaml file should look like:
network:
  version: 2
  renderer: NetworkManager

sudo netplan generate
sudo netplan apply
reboot


Edit /etc/default/grub and change this:

GRUB_CMDLINE_LINUX_DEFAULT="acpi=noirq quiet splash"

to this:

GRUB_CMDLINE_LINUX_DEFAULT="acpi=noirq quiet text"

This assumes you actually need the acpi=noirq that was in the linked answer. I can't tell you that, it depends on your hardware. Anyway, once you've done this, refresh grub:

sudo update-grub

And you should now load directly to text.


Screen: Keep programs running after shutdown

GNU screen looks like magic, but it cannot keep programs running when you shut down the machine. If you want a program like irssi (an IRC client) running even when the machine is shut down, you'll need a different machine that is powered on and to which you can connect using ssh. This machine can be a remote server or your local router. (assuming it can run Linux of course)


Poppler PDF library can do this - Okular and Xournal++ use it internally.
The poppler-utils package comes with a pdftocairo utility. So the following is just another way to do it in the terminal instead of using a GUI application. Run the following command
pdftocairo -pdf "input.pdf" "output-with-flatten-annotations.pdf"

and your annotations will be flatten/"baked" into the PDF.
But as this more or less a PDF to PDF conversation, some differences may apply, e.g. Poppler considers your fontconfig resulting in font replacements and the internal structure of the PDF may be altered. Please be aware that using poppler-cairo in this context may result in larger PDF output files.

You might also want to try qpdf (another utility and package that is not poppler-related) as that utility does not do an entire PDF conversation.
$ qpdf --flatten-annotations=all input.pdf output.pdf

Please mind that there is also print and screen as argument value for --flatten-annotations= instead of all that includes both print and screen. Check qpdf --help for more information. As the output for help is pretty long, you might want to use a pager like less, e.g.
qpdf --help | less


I can't remove tuxcut, can anyone help me here?

Try:

sudo touch /usr/bin/run-tuxcut
sudo apt-get purge tuxcut


144hz refresh rate ubuntu 18.04 with nvidia

You are correct. Currently if you set your monitor's refresh rate to 144Hz then the mouse cursor will display at 144Hz but everything else will be stuck at 60Hz. I have not found any way around this, hopefully it gets fixed soon. It looks like this bug has already been reported:
https://bugs.launchpad.net/ubuntu/+source/meta-gnome3/+bug/1767693


VT not responding to keyboard when switching from X (with an unused GeForce card)

A workaround described here:

in /etc/defaults/grub, add vga=normal to the linux kernel parameters addendum, i.e. replace

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

which is the value the distribution sets, with

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash vga=normal"

I'll have to admit that I tried this only while also disabling the splash screen (i.e. removing splash), and that worked.


How can I rsync to all remote connected host?

Wildcards and the simple regex (e.g. ls /usr/bin/x[bc]*) only work on the local filesystem.

Wildcards cannot know, which remote host you want copy the folders to. You need a loop for that:

for i in $(seq 8 18); do; \
   rsync -az -e ssh /path/to/source 192.168.8.$i:/path/to/destination; \
done

This will copy the source to all host from 192.168.8.8 to 192.168.8.18.


old link to Epson page no more exists
new link here: http://support.epson.net/linux/en/iscan_c.html


java installation pending task Ubuntu 15.04

First, fix the apt-get error you're getting. Open a terminal (press Ctrl+Alt+T) and run:

sudo dpkg --remove --force-remove-reinstreq jre1.8.0-45

Once that's fixed, you should instead install it using WebUpd8's Oracle Java packages, which also automatically give you future updates when you do apt-get update.

To do so, open a terminal and run:

sudo -i
add-apt-repository ppa:webupd8team/java
apt-get update
apt-get install -y oracle-java8-installer


How to take modified code over to installed system?

Performing those three commands will in most cases replace the original version, but sometimes a distros version of an application is installed somewhere else in the path, which may or may not be before your modified version.

The easiest and best way is to just test to see if it's your modified version that is run.


If you go to Settings > Devices > Screen Display you can modify the way your monitors are setup.
It sounds like you want to have them set to 'Join Displays' you can then re-arrange them so you can drag windows in the correct direction.


I keep a growing collection of my own programs (nearly all self-contained shell and Python scripts) in ~/bin.  (Some are actually symlinks to scripts located elsewhere.)

I similarly use ~/site for programs installed in my $HOME (usually through "./configure --prefix=$HOME/site; make; make install"); that is, they're only available for a single user.  These applications use the traditional bin, lib, etc. directories (~/site/bin, ~/site/lib, etc.).

System-wide programs need to be installed in /usr/local/.  So if you have a single executable file, you can drop it in /usr/local/bin.  If an archive has its own bin, lib, etc., those go in /usr/local/bin, /usr/local/lib, etc.

The traditional way is to "mix" applications together, with all commands in bin, all libraries in lib, and so forth.  This is painful to uninstall, but requires no further settings for $PATH, manpages, shared resources, etc.  If you want a completely separate application, you can put it in /opt as /opt/appname.  You'll need to configure /opt/appname/bin to be in the $PATH (or specify the full path to execute it).

With all of these options that don't use a configure command, the program needs to already know how to find its libraries (often through a linker RPATH setting, but there are other ways).  I would usually not attempt to modify a program if it can't do this already; and certainly wouldn't recommend it for most users.


Ubuntu 13.04 running within Hyper-V Networking very flaky

I googled some more and found the answer here https://superuser.com/questions/489746/ubuntu-not-connecting-to-network-in-hyper-v. Note even without this the connectivity was working sporadically. I'll post back in a few days if it crops up. If you don't hear back from me it a sign that its working :)


Is there a way to transmit the computers location via WGET?

Taken from this stackexchange post, you may use information from:

qdbus --literal org.freedesktop.Geoclue.Providers.UbuntuGeoIP /org/freedesktop/Geoclue/Providers/UbuntuGeoIP org.freedesktop.Geoclue.Position.GetPosition

To get other providers, look at:

apt search ^geoclue-

There is not much documentation on those other providers, but you may look at the service file in /usr/share/dbus-1/services/


Problem installing MATLAB R2017a on Ubuntu 17.04 as superuser

The way I will recommend is to:
create the upper folder in command line:

mkdir -p /usr/local/MATLAB

then run the install program:

sudo ./install

In case of failure you can try to create the entire path where MatLab will be installed:

mkdir -p /usr/local/MATLAB/R2017a


Is it useful to run Ubuntu Friendly off a LiveUSB?

In general I think it should work. However, if something forces you to reboot, then your previous testing results will be lost.


It is possible to hibernate an LXC container?

You want lxc-checkpoint, which is not yet implemented, at the time of writing (Jun 2014).

checkpoint the specified container NAME and dumps its state into the file FILE. If the option --pause is specified, the application will be stopped after the checkpoint just before resuming execution. The command lxc-unfreeze will resume its execution.
Actually, this command does not operate. Its description helps to define a CLI api for future Checkpoint / Restart solution


Unable to use UFW after reinstalling python

You are not supposed to remove python from Ubuntu because a lot of packages are built on it. Since you have already installed python, please execute the commands listed below to reinstall ufw

sudo apt-get purge --auto-remove ufw
sudo apt-get install ufw


How to configure Upstart for Node js to respawn the process that is killed due to some error

You can read the official documentation under respawn chapter:

  http://upstart.ubuntu.com/cookbook/#respawn

If you already have a config file for your node service, how may have only to add the following line :

respawn limit COUNT INTERVAL | unlimited

Where COUNT is the number of respawn until the service is kept death (or replace by unlimited) and interval is the number of second between a retries (useful to prevent too many restart and killing your server resources if the service doesn't stay up).


Try this method:

From this source: http://www.howtogeek.com/howto/linux/reset-your-ubuntu-password-easily-from-the-live-cd/

You’ll want to boot from your Ubuntu Live CD, choosing “Try Ubuntu without any change to your computer” from the boot menu.
Once the system boots, open up a new Terminal window from Applications \ Accessories and then type in the following command:

sudo fdisk -l

This command is used to tell what device name the hard drive is using, which in most cases should be /dev/sda1, but could be different on your system.

Now you’ll need to create a directory to mount the hard drive on. Since we’re actually booting off the live cd, the directory doesn’t really get created anywhere.

sudo mkdir /media/sda

The next command will mount the hard drive in the /media/sda1 folder.

sudo mount /dev/sda1 /media/sda1

Now it’s time for the command that actually does the magic: chroot. This command is used to open up a shell with a different root directory than the current shell is using, and we’ll pass in the folder where we mounted the hard drive.

sudo chroot /media/sda1

Now you should be able to use the passwd command to change your user account’s password, and it will be applied to the hard drive since we are using chroot.

passwd geek

Note that you’ll have to type your username after the passwd command in order to change the right password.

Now you should be able to reboot your system and log yourself in with your new password.

It's worked for me.


Can no longer boot from HD after installation of latest 12.04 update

An inability to access efisys or procfs should not have damaged whatever was there before, so unless this failure caused some sort of suicidal self-destruct to occur, the system should still boot. OTOH, putting on my cynical hat, it wouldn't surprise me too much if such a failure would result in the package uninstalling critical files....

Anyhow, if your system really is unbootable, my recommendation is to manually install a boot loader using an emergency boot disc. You should be able to get Ubuntu's grub-efi-amd64 package to install via either of at least two methods (using the --root option to dpkg in an emergency boot or by chrooting into your regular system and using dpkg or apt-get in a normal way). Alternatively, you can install any EFI boot loader that you care to try via non-package-manager methods. Typically, you just need to copy a handful of files to the EFI System Partition (ESP) and set up a configuration file or two. There are four major options (in order of reliability, they are the kernel's EFI stub loader in 3.3.0 and later kernels, ELILO, GRUB Legacy, and GRUB 2). See my Web page on the topic for more information about all of these; there's far too much to say about them to fit into a reply here.


Can I provide Ubuntu virtual image as a appendix of book?

You can find such these information in these links:
Legal
Licensing
but I don't think there would be a problem
Virtualbox licensing:
VBox
yes you can distribute any opensource os built in virtual enviornment freely.


dpkg a linux-image package fails with character `~' not allowed

You're using the wrong command. dpkg --listfiles is for installed packages, not random .deb files. From man dpkg:

-L, --listfiles package-name...
  List files installed to your system from package-name.

So when you do dpkg --listfiles linux-image-3.19.0-25-generic_3.19.0-25.26~14.04.1_amd64.deb, linux-image-3.19.0-25-generic_3.19.0-25.26~14.04.1_amd64.deb is treated as the package name, instead of linux-image-3.19.0-25-generic.

Use dpkg-deb --contents instead:

$ dpkg-deb --contents linux-image-3.19.0-25-generic_3.19.0-25.26\~14.04.1_amd64.deb
drwxr-xr-x root/root         0 2015-07-25 05:01 ./
drwxr-xr-x root/root         0 2015-07-25 04:52 ./lib/
drwxr-xr-x root/root         0 2015-07-25 04:52 ./lib/firmware/
drwxr-xr-x root/root         0 2015-07-25 04:52 ./lib/firmware/3.19.0-25-generic/
drwxr-xr-x root/root         0 2015-07-25 04:52 ./lib/firmware/3.19.0-25-generic/korg/
-rw-r--r-- root/root     15764 2015-07-25 04:52 ./lib/firmware/3.19.0-25-generic/korg/k1212.dsp
drwxr-xr-x root/root         0 2015-07-25 04:52 ./lib/firmware/3.19.0-25-generic/tigon/
-rw-r--r-- root/root      2668 2015-07-25 04:52 ./lib/firmware/3.19.0-25-generic/tigon/tg3.bin
-rw-r--r-- root/root      3884 2015-07-25 04:52 ./lib/firmware/3.19.0-25-generic/tigon/tg3_tso5.bin
-rw-r--r-- root/root      7004 2015-07-25 04:52 ./lib/firmware/3.19.0-25-generic/tigon/tg3_tso.bin
...

And you don't need sudo to use apt-get download.


Ubuntu login loop after NVIDIA driver installation

The issue is resolved now, although I tried a few things and can't isolate or rule out any of them from contributing to the resolution. Here's what I tried:

In my xorg.conf file under the GPU Device configuration, I added the field BusID PCI:1:0:0, as my GPU was attached this PCI slot. It seems that nvidia-config might have failed to add this information. I'm not sure if it's always necessary.
I looked for the object files of the drivers with locate, and ensured that there were in locatable directories. I don't recall making any changes or symlinking anything.
I removed some .conf files for NVIDIA, it seemed these might have been taking precedence over the primary xorg.conf file.
I plugged my monitor into the output of the GPU card, instead of into the motherboard.


How do I use variables and non-variables in a single sed command?

You can go two different ways:

Using single quotes: break out of the single quotes and reference the variable (using double quotes to prevent word splitting and filename expansion):

sudo sed -i 's/$sUrl . $this_sOutDir/https:\/\/'"$bucketname"'.s3.amazonaws.com . $this->_sOutDir/g' /var/www/html/$name/core/oxconfig.php

Using double quotes: escape the $ characters to be treated literally:

sudo sed -i "s/\$sUrl . \$this_sOutDir/https:\/\/$bucketname.s3.amazonaws.com . \$this->_sOutDir/g' /var/www/html/$name/core/oxconfig.php

However, the caveat is: if $bucketname contains sed special characters / sequences, the sed command will break (in this case since the variable is to be expanded in the replacement section, the concern is about it possibly containing the separator, accidental backreferences or &.

One way to go around this is sanitazing the variable beforehand by escaping possible separators, accidental backreferences and & characters to prevent them from being interpreted as such.

Another way is using Perl instead of sed, passing the variable directly to Perl which will handle special characters at replacement time ($ characters to be treated literally must be escaped even if using single quotes with this method):

sudo perl -i -spe 's/\$sUrl . \$this_sOutDir/https:\/\/$bucketname.s3.amazonaws.com . \$this->_sOutDir/g' -- -bucketname="$bucketname"

$ echo '$sUrl . $this_sOutDir' | perl -spe 's/\$sUrl . \$this_sOutDir/https:\/\/$bucketname.s3.amazonaws.com . \$this->_sOutDir/g' -- -bucketname="string/with/separators/&/and/accidental\$1backreferences"
https://string/with/separators/&/and/accidental$1backreferences.s3.amazonaws.com . $this->_sOutDir


Question: How do I enabled encryption and choose a cipher etc..?

ZFS encryption can only be enabled at the time of pool or filesystem creation. The cipher is set as an option. Easiest way is performing the following steps when installing Ubuntu.

Boot from install ISO.
Click the Try Ubuntu option.
Open the terminal application.
Sudo to root. No password required.
Edit /usr/share/ubiquity/zsys-setup.
Search for zpool create command applicable to the rpool.
Preprend echo MYPASSWORD | to the zpool command.
Add the following lines before the last zpool create option line.

-O encryption=aes-256-gcm \
-O keylocation=prompt \
-O keyformat=passphrase \

Please ensure to use double quotes around the password escaping bash characters "\$ if used in the password.

The result should look like the following

echo <password> | zpool create -f \
        ...
        -O encryption=aes-256-gcm \
        -O keylocation=prompt \
        -O keyformat=passphrase \
        -O mountpoint=/ -R "${target}" rpool "${partrpool}"

Run ubiquity to start the installer

  Question2: Why all of these pools? www, snap, mail, games... Can I get rid of them?

Those www, snap, mail entries are ZFS file systems mounted at the mentioned mount points, not ZFS pools. These filesystems are where files are stored and there is no issue in having lots of ZFS file systems. In fact that is one of the advantages of ZFS in offering great flexibility with file system layouts, snapshots, naming and performance tuning.

You can delete them, but that means it will delete all files located within that file system.


How should I format a bootable Ubuntu USB drive on macOS Sierra?

Follow CelicWarrior link in your comments

lastly because it will fail to boot and the guide is missing that information, you must copy paste the following files in the usb you created. Download, unzip and copy paste them in your usb. Overwrite them.

Fix ubuntu live


Mouse scroll sometimes doesn't work in MS Word in wine

OK, so I found a working solution when stumbled upon this post. First you have to do what has been said there:

  Disabling desktop effects did not help. Unchecking "Allow windows
  manager to control the windows" had side effects (window always on
  foreground). What works for me with Word, Excel and Powerpoint is:

Start System Settings

Select Window Behaviour

Select Window Rules

Click "New..." to create a new Window Rules

Enter the description

Window Class: Regular Expression. I use .*\b(winword.exe|excel.exe|powerpnt.exe)\b.*

Check "Match whole window class"

Check on tab "Size & Position"

Check "Full screen": value Forced, No

Check "Ignore Requested Geometry": value Forced, Yes

This will allow you to resize MS apps. Then go to the tab "Appearance and workaround" and do the following:

  "Prevent focus stealing" -> check -> Forced -> High priority

  "Focus protection" -> check -> Forced -> High priority

(don't know how exactly it is in English, my system is in another language).


Cannot copy/cut and paste from file manager to Desktop on Ubuntu 20.04 LTS

The file manager window you have open has a "Desktop" entry in the left navigation bar. Drop your file there and it will appear on the desktop.


Bulk Insert a CSV file into MongoDB through Ubuntu terminal?

Solved it:

There were someproblems with the syntax, but also, I was trying to run from within the mongodb.exe, and the import needed to be run from the bin$ level, like this:-

jon@ubuntu:~/Desktop/mongodb-linux-x86_64-2.6.3/bin$ mongoimport --db jontestcsv --collection Aircraft --ignoreBlanks --type csv --headerline --file /home/jon/Desktop/Aircraft.csv


Plymouth splash not showing, purple and black on boot

Try Super Burg Manager:
‘Super Boot Manager’ eases BURG, GRUB, Plymouth tweaking pains


Is there a simple way to diagnose Unity performance issues?

For me, the HUD was extremely slow when fading in and out. I solved it by installing Compiz Config and doing the following:

Disabling Animations and Fading Windows
Under Ubuntu Unity Plugin, setting the "Dash Blur" to "No Blur"
Under Open GL, changing the texture filter to "Fast" and unchecked Framebuffer object.


Zenity: get selected filename without its path

If you don't absolutely need zenity to provide this functionality for you, then you can easily do it in the shell, either using parameter expansion

file_to_copy=${file_to_copy##*/}

where ##*/ refers to the longest leading string matching */, or using the basename utility

file_to_copy=$(basename "$file_to_copy")


Installation with MinimalCD: "Couldn't download package"

For some reason, my problem was resolved as soon as I changed my network adapter to bridged mode instead of NAT in the virtual machine settings in VirtualBox.

I never experienced any other connection issues with NAT mode however. It also might be specific to the Mac version of VirtualBox (happened on different Macs on different internet connections to me).


I see that message if running gedit as root, and I have seen it for several different versions of Ubuntu as well as in other Linux distros.  As best I can tell, it's related to the fact that although you are running the application as root, it is running inside a graphical session owned by your user account, and it's attempting to find settings for the root user's graphical desktop.

As long as your files are being saved properly, I wouldn't sweat it, :-)


How to create a disk partition that would be visible and usable in windows

if you want to make it easy type partition in search box, it will give you partition software. click it, you will find GUI is very easy like windows partitioning.

create partition there and make it FAT32

done.


Not yet, but you could request the feature here:

https://bugs.launchpad.net/ubuntuone

Make sure you mention that it's a feature request and that dropbox already provides this functionality.


Note: I'm assuming that /dev/sda2 is your Ubuntu system partition...

To check the file system on your Ubuntu partition...

boot to the GRUB menu
choose Advanced Options
choose Recovery mode
choose Root access
at the # prompt, type sudo fsck -f /dev/sda2
repeat the fsck command if there were errors
type reboot

If for some reason you can't do the above...

boot to a Ubuntu Live DVD/USB
open a terminal window
type sudo fdisk -l
identify the /dev/XXXX device name for your "Linux Filesystem"
type sudo fsck -f /dev/sda2 # replacing XXXX with the number you found earlier
repeat the fsck command if there were errors
type reboot


Why does this custom Ubuntu theme only affect some applications?

You need manually change Metacity theme with GSettings:
gsettings set org.gnome.metacity theme THEME_NAME


Vsftpd not working with my IPTABLE rules

Add the following rule ABOVE the line -A INPUT -i enp2s0 -p tcp -m tcp --tcp-flags FIN,SYN,ACK SYN -j REJECT --reject-with icmp-port-unreachable:

-A INPUT -i enp2s0 -p tcp -m multiport --dports 20,21 -j ACCEPT

What's happening is your ACCEPT rules for the specific TCP ports do not include the default FTP ports of 20 and 21, and the packet is traversing the INPUT chain until it matches against the line noted above with the icmp-port-unreachable, hence your issue.

Additionally, you can combine all of the TCP ACCEPT rules to be the following one-liner:

-A INPUT -i enp2s0 -p tcp -m multiport --dports 20,21,22,80,47050,48050 -j ACCEPT

Hope this helps


When you copy with root privileges (running the command with sudo), and use the option to preserve the permissions and ownership, you should get what you want.

From man cp:

   -p     same as --preserve=mode,ownership,timestamps

   --preserve[=ATTR_LIST]
          preserve the specified attributes (default: mode,ownership,time‐
          stamps), if  possible  additional  attributes:  context,  links,
          xattr, all

The following command line will copy files in the folder but no subdirectories

sudo cp -p source-folder/* target-folder

The following command line will copy files in the folder as well as subdirectories and files in them (recursively)

sudo cp -pr source-folder/* target-folder

You can also use rsync for this task (preserving the permissions including subdirectories)

sudo rsync -Ha source-folder/ target-folder

where the -H means that it will also manage hard links (optional).

If this is not what you want, but you want to change the ownership or permissions, please explain with details what you want.


Trying to set up monitor rotation (nvidia) in 18.04

It looks like ~/.config/monitors.xml overrides the position and orientation settings Nvidia puts in its MetaMode in xorg.conf, so edit ~/.config/monitors.xml and add:

<transform>
  <rotation>left</rotation>
  <flipped>no</flipped>
</transform>

between the <scale> and <monitor> tags under the <logicalmonitor> block for the monitor you want to rotate, and adjusting the rotation and flippedness for your monitor as well.


I created an RSA key, but can't see the files in my home folder

You got a message like this:

  Your identification has been saved in /home/b/.ssh/id_rsa.
  Your public key has been saved in /home/b/.ssh/id_rsa.pub.

Open your home folder and press Ctrl + H and you'll see folder .ssh


How to disable screen dimming after inactivity when this is already disabled at system settings?

Caffeine

You could try using caffeine. When you activate caffeine the screen wont fall a sleep or get dimmed, you can set it up in different ways.

You can find more info here, or on launchpad.
And install the program by typing sudo apt-get install caffeine


Looking for a Sound Forge Audio Studio similar program on Ubuntu

Try Openshot sudo apt-get install openshot.

Alternatively, there is a multimedia official operating system called Ubuntu Studio

About

Ubuntu Studio is a free and open source operative system, and an official flavor of Ubuntu. Ubuntu Studio is the most widely used multimedia orientated GNU/Linux distribution in the world. It comes preinstalled with a selection of the most common free multimedia applications available, and is configured for best performance for the Ubuntu Studio defined workflows: Audio, Graphics, Video, Photography and Publishing.

Feature Tour

Ubuntu Studio is a Linux-based operating system designed as a free, open, and powerful platform for creative people to create their art.

Ubuntu Studio is Free and Open Source Software (FOSS), which means it is free to download and use. You can get the source code, study it and modify it. You can redistribute Ubuntu Studio and can even redistribute your modified version. Read more about these freedoms at GNU.org’s Free Software page.

As an officially recognized derivative of Ubuntu, Ubuntu Studio is supported by Canonical Ltd. and an amazing and continually increasing community.

Ubuntu Studio is released every six months, but a long term release (LTS) version is released only every 2 years.


gconf-tool2 command to set "Place Windows" compiz option?


Why must I do `. .bash_profile` every time I create a new alias?

First of all, you should put the aliases in ~/.bashrc and not in ~/.bash_profile.

Next the explanation: the aliases are read and make available only when the file that contain them is read. So the requirement to source that file.


Try to show the Grub menu

Hold down the
   Shift key as the computer attempts to boot to display the GRUB 2
   menu. In certain circumstances, if holding the Shift key method does
   not display the menu pressing the Esc key repeatedly may display the
   menu.

If that doesn't work, then using Boot Repair to reinstall and fix Grub.

Boot Repair

Repair the bootloader

To restore the Grub bootloader, follow these steps.

Open a terminal, and run the following commands:

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair
boot-repair

After a few seconds, Boot Repair's main window will open.

Click on Recommended repair.

You're done!

Reboot to test everything out.

If everything went well, you should be up and running by now.


Dual-Boot Ubuntu with Windows 10 when using 3 drives

There's a bug in the installer, so grub gets written to the first EFI (on  sda) regardless of what you specify as a location.  See bugs 1173457,1396379,1702335.
This may not matter to you since your disks are not removable(?).  If you want the hdd to be separately bootable, make sure you manually add an EFI partition, then after the install, just copy the contents of the sdd's EFI to the hdd's.

Grub installed on a device is able to boot other devices, so you will be able to boot Windows.


It means to run the last command in your history list that begins with ls as it was pointed out to me.  If you last ran a command of lsb_release then that would be ran.  If you ran just the command ls it would give you the directory listing.  It runs the last or most recent command that starts with whatever you specify.

If you run history on your system you will see all the commands that you have ran.  And if you wanted a specific command from your history it would be !# like !1990 would run my previous command of cd.

Example history output:

 1990  cd
 1991  sync
 1992  ssh pi@10.0.0.201
 1993  sync
 1994  sync
 1995  sudo apt autoremove
 1996  reboot
 1997  sudo apt remove nvidia-driver-430
 1998  sudo apt install nvidia-driver-435
 1999  sudo apt autoremove
 2000  reboot
 2001  ./intrepid_check.bsh
 2002  ssh intrepid
 2003  ls -al
 2004  ls
 2005  ls -al
 2006  history
terrance@terrance-ubuntu:~$

And if I wanted to run the last ssh command on that list I type it in as

!ssh

Example:

terrance@terrance-ubuntu:~$ !ssh
ssh intrepid
Welcome to Ubuntu 18.04.3 LTS (GNU/Linux 5.0.0-29-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

 * Congrats to the Kubernetes community on 1.16 beta 1! Now available
   in MicroK8s for evaluation and testing, with upgrades to RC and GA

     snap info microk8s

 * Canonical Livepatch is enabled.
   - All available patches applied.

0 packages can be updated.
0 updates are security updates.

Your Hardware Enablement Stack (HWE) is supported until April 2023.
You have mail.
Last login: Wed Sep 25 21:38:55 2019 from 10.0.0.100
-------------------------------------------------------------- 09/25/19 21:43:36
terrance@Intrepid:~$

Hope this helps!


The standard systemwide and per-session message bus setups are configured in the files /usr/share/dbus-1/system.conf and /usr/share/dbus-1/session.conf. These files normally  a system-local.conf or session-local.conf in /etc/dbus-1; you can put local overrides in those files to avoid modifying the primary configuration files.

The configuration file is an XML document. It must have the following doctype declaration:

I believe you need to modify /usr/share/dbus-1/session.conf which is what /etc/dbus-1 in ubuntu is linked to.

Note: Limits are normally only of interest on the systemwide bus, not the user session buses but I think you can use them on the session bus.

The  element defines a security policy to be applied to a particular set of connections to the bus. A policy is made up of  and  elements. Policies are normally used with the systemwide bus; they are analogous to a firewall in that they allow expected traffic and prevent unexpected traffic.

Policies applied later will override those applied earlier, when the policies overlap. Multiple policies with the same user/group/context are applied in the order they appear in the config file.

You can likely just tack something like this on the end of /usr/share/dbus-1/session.conf prior to the </busconfig> line which would allow access for those in the lp group and deny it for everyone else. Of course you'll need to modify this to match your environment and your needs.

<policy group="lp">
    <allow send_destination="org.bluez"/>
    <allow send_destination="org.bluez.obex"/>
  </policy>

  <policy context="default">
    <deny send_destination="org.bluez"/>
    <deny send_destination="org.bluez.obex"/>
  </policy>

Sources:

https://github.com/netblue30/firejail/issues/796
http://www.linuxfromscratch.org/blfs/view/svn/general/dbus.html
https://dbus.freedesktop.org/doc/dbus-daemon.1.html
https://github.com/ghent360/bluez/blob/master/src/bluetooth.conf


Drawer or other organisation for hundreds of scripts in Unity Launcher

You could use the ssh launcher to have a quicklist with all your machines. See What Custom Launchers and Unity Quicklists are available? .


Boot hangs before login screen only with monitors connected to laptop

I solved this by rolling back my kernel Version using this answer. Afterwards I deleted the newest kernel version just to be safe. So the problem must be related to the kernel version 4.15.0-44-generic. I'm now running on 4.15.0-43-generic.


How to access my website without entering the FQDN, just the domain

You can add an entry to the /etc/hosts file
First get the ip adress with this:
dig +short hostname.domainname.com
Let's say the ip is 11.22.33.44
Add a line to /etc/hosts

sudo nano /etc/hosts
#
# Add a line like this <ip-adress><tabulation><hostname>:
11.22.33.44               domain.com
#
# Save file with <ctrl>+<o>, quit nano with <ctrl>+<x>


how to get console in scilab 6.1.0 from ubuntu LTS 20.04 terminal?

Probably you missed a hyphen. The command is scilab-cli.


Can't boot into Windows after dualbooting Ubuntu

The summary says
"No boot loader is installed in the MBR of /dev/sda."
If I was you, I would boot the Macrium Reflect recovery media, or Windows recovery media, or any other bootable disk that fixes Windows boot. After ascertaining that I can successfully boot into Windows, I would run the grub boot-repair a second time, from CD or flash drive. That should fix the Linux side of things, because the Windows repair tool will have deleted Grub. After that, you should be sorted.

EDIT: It was suggested to me by @karel that you use the free Linux tool Rescatux, instead of Macrium Reflect recovery media. Try that instead, because it will fix Windows bootloader without deleting grub.