Configure internet connection across ubuntu server

How do you get your IP-address from ADSL? With DHCP? or do you have a static IP? eth0 should be configured regarding to what you use to configure IP.

As your eth0 config looks now you have a default gateway at the IP 192.168.1.4 and this would be your ADSL connection with this configuration.

eth2 you say is your local network. The problem here is that you have the same (!) IP-network (192.168.1.0) om both interfaces. That means that there is nothing to route for your server. I don't think 127.0.0.1 is a valid gateway either (eth2). You probably don't need any gateway address on your local network. Another mistake is that eth2 has 192.168.26.255 as broadcast address. That is not a valid address on your network 192.168.1.0 you have defined for eth2.

What you have to do is to configure eth0 as it should be. And if your default gateway to the internet is 192.168.1.4 you must not use 192.168.1.0 network on eth2 (local net).


You must boot into recovery mode:

a- Switch on your computer.

b- Quickly press and hold the Shift key, which will bring up the GNU GRUB menu.

c- Select the line which starts with ---- Advanced options.

d- Select the line ending with ----- recovery mode,something like:

Ubuntu GNU/Linux, with Linux 3.16.0-28-generic (recovery mode)

e-  Your PC should display a menu with a number of options.

f-  Select the line with ---- Drop to root shell prompt.

g-  You start in a terminal as root with the root partition mounted read-only.

Run it:

mount -o remount,rw /
mount --all
chmod 755 /home
chmod -Rf 700 /home/raj
chown -R raj /home/raj
reboot


Seahorse: Export and Import Keyrings as backup

I found this post where @dobey pointed out that the keyring seahorse-daemon/service must not run throughout the keyring data will be overwritten.

In order to that I did this steps:

Turn on the target computer but not log in or log out.
Use an other computer to log in to my NAS using ssh. Then changing to the backup folder:

user@nas:~$ cd <path to backup>

Copy the keyring data to the target computer using scp:

user@nas:<path to backup>$ scp -r home/user/.local/share/keyrings/ <user>@<target ip>:.local/share/

Login at the target computer. Open Seahorse/keyrings. The copied keyrings shall be listed now (or updated).
Sitenote Something I recognised first within my tests: Seahorse keyrings are password protected and they keep the password from the origin computer. In my case it was the same as the user login. It may a good idea from now to use a different one ;).

The unfavourable part at this way is, that it needs a second computer or a computer with at least two accounts. But in case that only one computer is available, it may work with temporally turn of the keyring deamon:

Search how the service is spelled correctly and get the PID:

user:~$ ps -u user | grep seahorse
user:~$ ps -u user | grep keyring
 1234 ?        00:00:00 gnome-keyring-d

Stop the service by killing the process using the PID from above (1234):

kill 1234

Copy the keyring data as described above (or on a way you prefer more).
Start the service:

user:~$ /usr/bin/gnome-keyring-daemon --daemonize
SSH_AUTH_SOCK=/run/user/1000/keyring/ssh

The approach with service gnome-keyring-daemon stop|start results in this error: Failed to stop gnome-keyring-daemon.service: Unit gnome-keyring-daemon.service not loaded. That's why I choose the way above. You may provide a correct way to handle this.


Have you looked at man updatedb.conf? It seems possible that editing /etc/updatedb.conf may help control what is scanned. This is what my /etc/updatedb.conf looks like:

PRUNE_BIND_MOUNTS="yes"
# PRUNENAMES=".git .bzr .hg .svn"
PRUNEPATHS="/tmp /var/spool /media /home/.ecryptfs /var/lib/schroot"
PRUNEFS="NFS nfs nfs4 rpc_pipefs afs binfmt_misc proc smbfs autofs iso9660 ncpfs coda devpts ftpfs devfs mfs shfs sysfs cifs lustre tmpfs usbfs udf fuse.glusterfs fuse.sshfs curlftpfs ecryptfs fusesmb devtmpfs"

From man updatedb.conf:

  PRUNENAMES A whitespace-separated list of directory names (without
  paths) which should not be scanned by updatedb


Why don't we have magic numbers for shell scripts?

All scripts like bash, perl or sed are using the format ASCII text while mp4 are read as binary. Having different file header at binary level and dependant of the language while the content remain a text doesn't make sense as that means having specific software for opening each file type. Having a simple declaration in the file is enough and ensures that the script can be opened in any text editor.


Install lm-sensors and try again.  You can install lm-sensors with software center or in a bash terminal:

sudo apt-get install lm-sensors

Next try installing and using the i8kutils "Utilities for Dell Inspiron and Latitude laptops"


Do not let your linux host take control to the device, make sure have it attached directly to the vbox Windows.

To do so, in the vbox system's Setting->Usb, Click 'Add Filter from Device', choose your HD, click OK. Then unplug the USB, wait 10s for the whole hardware reset, then replug in, then the device should be automatically attached and handled by the virtual windows, if ideally, it can be recognized as a drive, and then try CHKDSK X: /f in the windows command line.

This applies to a partition with some status error, while ntfs-3g can not fix.


Installing Ubuntu on a second hard drive with data on it

You can create partitions on your HDD without erasing any data if there is enough space.

You can boot from Ubuntu LiveUSB, start gparted and do it there.

You will not need to change boot order in bios.

You can install grub on SSD or HDD, that will provide boot menu, where you will be able to choose which OS to start.

If you install grub on HDD, then when HDD is the first boot option, you will have that menu. If you switch boot order to SSD, you will boot right into Windows.


How to use Microsoft Remote Desktop to connect with Ubuntu 18.04 LTS

To have xrdp working on ubuntu 18.04,  you can multiple choices

Note : To have this procedure working, you have to run an up to date version of Ubuntu 18.04.4

You can perform a manual installation by issuing the following commands

sudo apt-get install xrdp -y
sudo apt-get intall xorgxrdp-hwe-18.04

Check this post for more information about this (https://c-nergy.be/blog/?p=13972)

You can also try to use the easy to use xrdp-installer-1.1.sh script that can help automate the installation.  To use the script, you will first have to download it, extract content, make it executable and issue the command with or without needed parameters

Using the script is quite straight forward (Please read the howto use it first in the post http://c-nergy.be/blog/?p=14093!!!)

Step 1 - Download the script

wget https://www.c-nergy.be/downloads/xrdp-installer-1.1.zip

Step 2 - Unzip it

unzip xrdp-installer-1.1.zip

Step 3 - Mark it as executable

chmod +x xrdp-installer-1.1.sh

Step 4 - Execute the script with parameters to enable your selected options

./xrdp-installer-1.1.sh -h  (for the help)
./xrdp-installer-1.1.sh     (install xrdp using xrdp ubuntu packages )
./xrdp-installer-1.1.sh -c  (install xrdp from sources )
....

As Ubuntu 20.04 is about to be released, expect a new version of the script to be released to fix some minor bugs and include support for Ubuntu 20.04

Please note also that if user A is logged on locally on the PC, the user A will not be able to connect remotely (it will be disconnected after login into the remote session). The user A if connected remotely will not be able to login locally on the machine (login loop).  This is a limitation to be aware of

Hope this help
Till next time


ext4 is the default filesystem format in Ubuntu 18.04, but Windows is expecting a hard drive that is formatted as NTFS. Otherwise the Windows installer will stop and not continue, because it does not recognize your laptop's ext4 formatted hard drive. To solve this problem boot the laptop from the live DVD/USB that you used to install Ubuntu 18.04. You may need to set the USB flash drive as first in the boot sequence in the BIOS, so your laptop will be able to boot from it. Open the built-in GParted partition editor application, and format the entire hard drive as NTFS.

If this doesn't work then buy a portable hard drive enclosure. They are very cheap, being just a box the same size as a laptop's 2.5" hard drive with a USB port and a USB cable to attach it to another computer. Remove the laptop's hard drive and plug it into the portable hard drive enclosure. Then take the portable hard drive enclosure to another computer and format the hard drive as NTFS. After the hard drive is formatted as NTFS, put it back in its original place in the laptop.

portable hard drive enclosure

Now your laptop is ready to install Windows. When you boot the Windows 10 installer after formatting the laptop's hard drive as NTFS, the Windows installer will recognize it and the Windows 10 installation will proceed normally.

The error message screen of Windows installer shows that the Windows installer USB boots successfully and starts the Windows installer, but it does not find the hard drive (which possibly is still ext4 formatted).


Is there a simple way to create stacked notifications in GNOME Shell?

notify-send will only create a new notification. However, there are various bindings for libnotify, e.g., to Python (package python-notify). Check out the example provided with the package for replacing the text in a notification:

python /usr/share/doc/python-notify/examples/test-replace.py

Extending this to appending text should be straightforward.


System don't recognize ubuntu partition ""All boot options are tried. Press F4 key to recover."

I did it! It appears that the windows 7 boot don't recognize Ubuntu without help. I followed the steps from this page and everything went fine:
http://www.linuxbsdos.com/2012/05/17/how-to-dual-boot-ubuntu-12-04-and-windows-7/2/


touchpad drag stops working after sleep (18.04/18.10)

I updated to 19.04 and the problem is fixed! must be the new kernel which has sorted out the trackpad.


Okay you most probably have a graphics card driver issue. There just may be a quick fix here. Try if you can rightclick on that desktop backround. If you get a menu then choose:

Change Desktop backround.

Thats just a backdoor to get into the system settings without having to revert to a terminal. If that works, You will be in the appearance tab of the systems settings. Click the all settings tab and go to

Software Sources

Here, go to the last tab (Additional drivers)and you may see a list of drivers for your graphics card. Choose the X.Org xserver, if its displayed.

This might bring your system back to being able to display Unity, and get you started

If that doesnt work then hit CNTRL-ALT-t to get a terminal and enter

sudo lshw -C display

Post the output back here.

gd luck

Issue was finally identified as:

https://forums.virtualbox.org/viewtopic.php?f=3&t=51727

uninstalling unity 3d and installing KDE desktop resolved this.
(see comments below)


Why aren't new programs showing up in the KDE menu?

Edit: On further reflection, I'm quoting partly from the first line of code you provided:

The desktop entry file  "/home/andrew/.local/share/applications/Opera.desktop"  has Type= "Application"  but no Exec line

It looks like you maybe having two opera.desktop files: one in ~/.local/share/applications and the other in /usr/share/applications. My understanding is that the first takes precedence but it's possible some weird confusion may be occurring?

Please look at Opera.desktop again. See if you find a line, or lines, like this:

OnlyShowIn=Unity

A list of other OnlyShowIn= options is here.

If there is such a line, open Opera.desktop with a text editor (and sudo) and comment out that line by adding #. Save the file. You may now see Opera in your menu.

You can read more on the subject here. The "opposite" of OnlyShowIn= is NotShowIn= and if there's a line like NotShowIn=KDE that could be to blame.

And you may need to refresh things by running

sudo update-desktop-database

according to this answer.

Of course, it's entirely possible that there's some other solution altogether!


How to install SQL Developer on Ubuntu 14.04?

I installed SQL Developer with these steps:

(See the comments—this might not be necessary)
Download and re-install newest Ubuntu 14.04 LTS from Ubuntu website.
Install Java:

Java Version JDK 7:

sudo apt-get install openjdk-7-jdk openjdk-7-jre icedtea-7-plugin
sudo update-alternatives --config java

Java Version JDK 8 (in some installations this is a requirement instead of 1.7):

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

Download SQL Developer from Oracle website (I chose Other Platforms download).
Extract file to /opt:

sudo unzip sqldeveloper-*-no-jre.zip -d /opt/
sudo chmod +x /opt/sqldeveloper/sqldeveloper.sh

Linking over an in-path launcher for Oracle SQL Developer:

sudo ln -s /opt/sqldeveloper/sqldeveloper.sh /usr/local/bin/sqldeveloper

Edit /opt/sqldeveloper/sqldeveloper.sh and replace it's content to:

#!/bin/bash
unset -v GNOME_DESKTOP_SESSION_ID
cd /opt/sqldeveloper/sqldeveloper/bin
./sqldeveloper "$@"

or (to prevent error: ./sqldeveloper: Permission denied)

#!/bin/bash
unset -v GNOME_DESKTOP_SESSION_ID
cd /opt/sqldeveloper/sqldeveloper/bin && bash sqldeveloper $*

Run SQL Developer:

sqldeveloper

  Note: When you run Sql Developer at the first time, you need to
  specify the path of JDK's folder. In my computer, JDK stored at
  /usr/lib/jvm/java-1.7.0-openjdk-amd64
  For Java 8 and Ubuntu 16+ /usr/lib/jvm/java-8-oracle

Finally, create desktop application for easy to use:

cd /usr/share/applications/
sudo vim sqldeveloper.desktop

add this lines:

[Desktop Entry]
Exec=sqldeveloper
Terminal=false
StartupNotify=true
Categories=GNOME;Oracle;
Type=Application
Icon=/opt/sqldeveloper/icon.png
Name=Oracle SQL Developer

then type:

sudo update-desktop-database


32 bit works but 64 bit drivers reported not to work.

It has been reported that there is a native driver from the manufacturer. (download mirrored at Unbolt)

You need two modification to make the driver work:

Modify the Makefile line 3: export TOPDIR := $(shell pwd)
Add the Sitecom USB ID for the WL-352 device to the file

os_intf/linux/usb_intf.c: {USB_DEVICE(0x0DF6, 0x004C)},


Ubuntu how to boost specific core and let the others idle

Use turbostat (linux-tools-common package, I think) to determine what your maximum frequency will be for 4 active cores. In the non-quiet mode it spews a bunch of stuff during startup. Example (4 core processor):
doug@s15:~$ sudo turbostat
turbostat version 20.03.20 - Len Brown <lenb@kernel.org>
...
cpu1: MSR_TURBO_RATIO_LIMIT: 0x23242526
35 * 100.0 = 3500.0 MHz max turbo 4 active cores
36 * 100.0 = 3600.0 MHz max turbo 3 active cores
37 * 100.0 = 3700.0 MHz max turbo 2 active cores
38 * 100.0 = 3800.0 MHz max turbo 1 active cores
...

Example (6 core processor - where I have them all set the same):
$ sudo turbostat
turbostat version 20.03.20 - Len Brown <lenb@kernel.org>
...
cpu2: MSR_TURBO_RATIO_LIMIT: 0x2b2b2e2e2e2e2e2e
43 * 100.0 = 4300.0 MHz max turbo 8 active cores  <<< I don't actually have 8 cores
43 * 100.0 = 4300.0 MHz max turbo 7 active cores  <<< I don't actually have 7 cores
46 * 100.0 = 4600.0 MHz max turbo 6 active cores
46 * 100.0 = 4600.0 MHz max turbo 5 active cores
46 * 100.0 = 4600.0 MHz max turbo 4 active cores
46 * 100.0 = 4600.0 MHz max turbo 3 active cores
46 * 100.0 = 4600.0 MHz max turbo 2 active cores
46 * 100.0 = 4600.0 MHz max turbo 1 active cores

My processors are unlocked, and therefore this stuff can be changed. I don't know about yours. I would not recommend it anyhow, without extreme attention to thermal and power management.
For your test, use taskset to force the job onto 4 cores, and let the others go into deep idle. For my example, I'll use 2 of 4 cores and need to know the CPU to core mapping: Core 0 has CPUs 0 and 4; Core 1 has CPUs 1 and 5; Core 2 has CPUs 2 and 6; Core 3 has CPUs 3 and 7.
So (the program is mine, but will spin out 4 threads at near 100% load per thread):
$ taskset -c 2,3,6,7 ./waiter 4 960 4 1000000000 0 1

And watching with turbostat:
doug@s15:~$ sudo turbostat --quiet --show Core,CPU,Busy%,Bzy_MHz,PkgTmp,PkgWatt,IRQ --interval 6
Core    CPU     Busy%   Bzy_MHz IRQ     PkgTmp  PkgWatt
-       -       0.15    1603    2257    30      3.78
0       0       0.14    1605    264     30      3.78
0       4       0.67    1601    1362
1       1       0.03    1604    56
1       5       0.04    1604    81
2       2       0.14    1604    188    <<<< The system is still idle
2       6       0.03    1603    73
3       3       0.05    1605    83
3       7       0.09    1615    150
Core    CPU     Busy%   Bzy_MHz IRQ     PkgTmp  PkgWatt
-       -       0.15    1602    2372    26      3.79
0       0       0.53    1601    1073    26      3.79
0       4       0.27    1600    538
1       1       0.07    1604    128
1       5       0.09    1603    173
2       2       0.13    1603    180
2       6       0.02    1602    50
3       3       0.04    1604    83
3       7       0.08    1602    147
Core    CPU     Busy%   Bzy_MHz IRQ     PkgTmp  PkgWatt
-       -       37.45   3692    31573   46      26.22
0       0       0.97    3236    3991    46      26.22
0       4       0.15    3285    622
1       1       0.06    2829    189
1       5       0.09    2402    177
2       2       74.62   3693    6727    <<<< The load was added during this sample
2       6       74.54   3696    6690
3       3       74.61   3694    6608
3       7       74.60   3694    6569
Core    CPU     Busy%   Bzy_MHz IRQ     PkgTmp  PkgWatt
-       -       49.46   3696    40399   48      33.60
0       0       1.15    3599    4866    48      33.60
0       4       0.03    3546    139
1       1       0.06    3560    230
1       5       0.04    3562    191
2       2       98.60   3696    8860    <<<< Now steady state with load
2       6       98.60   3696    8821
3       3       98.60   3696    8678
3       7       98.60   3696    8614
Core    CPU     Busy%   Bzy_MHz IRQ     PkgTmp  PkgWatt
-       -       49.46   3694    40381   50      33.72
0       0       1.12    3599    4821    50      33.72
0       4       0.03    3543    170
1       1       0.06    3568    250
1       5       0.05    3564    232
2       2       98.61   3695    8811
2       6       98.61   3695    8813
3       3       98.61   3695    8680
3       7       98.61   3695    8604
Core    CPU     Busy%   Bzy_MHz IRQ     PkgTmp  PkgWatt
-       -       49.46   3695    40356   50      33.83
0       0       1.11    3599    4787    50      33.83
0       4       0.05    3547    243
1       1       0.05    3546    192
1       5       0.05    3543    223
2       2       98.60   3696    8810
2       6       98.60   3696    8813
3       3       98.60   3696    8680
3       7       98.60   3696    8608
Core    CPU     Busy%   Bzy_MHz IRQ     PkgTmp  PkgWatt
-       -       49.39   3695    41291   51      33.92
0       0       0.96    3598    4736    51      33.92
0       4       0.05    3522    199
1       1       0.27    3582    1131
1       5       0.06    3540    259
2       2       98.44   3695    8815
2       6       98.44   3695    8819
3       3       98.43   3695    8703
3       7       98.44   3695    8629

Observe the CPU frequency is close to the 2 cores limit, and stable. Note that I didn't do anything special with idle states.


How do I switch the Command key and Control key on a MacBook Pro?

I figured it out. Put the following in ~/.Xmodmap:

clear control
clear mod4

keycode 105 =
keycode 206 =

keycode 133 = Control_L NoSymbol Control_L
keycode 134 = Control_R NoSymbol Control_R
keycode 37 = Super_L NoSymbol Super_L

add control = Control_L
add control = Control_R
add mod4 = Super_L

To test, run the command:

xmodmap ~/.Xmodmap

To make it run every time, add it to Startup Applications.

This should work on any MacBook Pro; the issue was that Xmodmap was assigning Super_L to the left and right command keys, and Control_L to the left control key. For some reason, by default, Ubuntu thinks that the MacBook Pro has a standard 105 key keyboard (probably thinking about the full Apple Keyboard) but that is wrong. Anyway, I reassigned the keycodes to the right keysims, then assigned the keysims to control and mod4.


ext4 partition works but fdisk shows no valid partition table

It looks to me like you've got the filesystem placed "raw" on the disk, without using any partition table. This is unusual and limiting, but it does work. If you don't see any need to shrink the existing filesystem and add new partitions in the near future, I'd just leave it as-is, since adding a partition table to this setup will be difficult and perhaps a bit risky.


options like --save-config --load-config really worked in previous versions of gnome-terminal (for example default one in Ubuntu 14.04 LTS).
But not anymore. On 16.04 default version is GNOME Terminal 3.18.3 which already has such options removed.
Seems like the solution could be build an older version or switch to another terminal program.


I think the driver you are using is buggy

Check Additional Drivers and install best available driver. If this solves the problem excellent. probably you've done this already? I see your wireless chip is being reported as RTL8168evl/8111evl. I don't believe this is correct as Realtek doesn't appear to make that model. Identify the wireless chip either by checking with the manufacturer of your laptop or by visual inspection.

Download the correct linux driver from http://www.realtek.com/downloads/downloadsView.aspx?Langid=1&PNid=13&PFid=21&Level=4&Conn=3

compile and install in accordance with the manufacturers instructions.


Share my DVD drive with my Mac Mini over LAN

You could use sshfs to mount the directory on your Mac.

On the Ubuntu-Host you need to have the openssh-server installed:

sudo apt-get install openssh-server

On the Mac, install Fuse for OS X and MacFusion. Be sure to install the MacFUSE compatibility layer. MacFusion includes sshfs. The sshfs binary can be added to the PATH using a symlink:

sudo ln -s /Applications/Macfusion.app/Contents/PlugIns/sshfs.mfplugin/Contents/MacOS/sshfs /usr/local/bin/sshfs

Now, that you have openssh-server on your ubuntu host and MacFusion on the Mac, you can do the following (replace /media/mountdir by the actual mount location of the cd drive on the host) on the Mac:

mkdir /media/cdromdrive
sshfs Benutzername@ubuntuhost:/media/mountdir /media/cdromdrive

after that you should be able to access the contents on the cd from the directory (mount point) /media/cdromdrive


where I can post my request to no removal qt3 libraries from next ubuntu releases?

Qt3 is really old and you should have moved to Qt4 a long while ago. It isn't maintained upstream anymore, so you cannot expect Linux distributions to just maintain it for you.

From here:

  Trolltech will continue to support the Qt 3 series until July 1st 2007.

And besides, in Quantal Qt3 is already removed, so you're way too late to start a discussion about the Qt3 removal.

I suggest to put your efforts on either of the options below.

Port your application to Qt4 or even Qt5 (longer term)
Maintain a PPA with the Qt3 libraries your own and tell your users to enable that PPA first.
Move to RHEL. Red Hat supports a release for 10+ years. See their lifecycle document mentioning

  Red Hat Enterprise Linux 5 and 6 are offered with 10 years of Production Phase support, followed by a three year Extended Life Phase.

However, I'm not sure if Qt is one of their core packages included in this; Red Hat is a GTK company.
Live with the fact the product doesn't run on newer distribution versions anymore.


Here is how to install Unity3d on Ubuntu (tested on 14.04LTS and 15):
download Unity3d:
http://www.omgubuntu.co.uk/2015/08/unity3d-linux-build
(the blue button Download Unity 3D Editor for Ubuntu)

then do these following line:

sudo apt-get install monodevelop xterm
sudo dpkg -i unity-editor*.deb
sudo chmod 4755 /opt/Unity/Editor/chrome-sandbox

and normaly you have it !


You mentioned that you're using a Digitalocean Droplet. Their method of kernel deployment differs slightly from a system running on bare metal

Refer to Digital Ocean's documentation for kernel upgrades.

To sum up some gotchas:

if you're using a kernel provided by the control panel, you'll have to make your changes there, too.
reboot of the droplet alone does not upgrade the kernel, only shutdown does
you can select a special GrubLoader kernel to delegate kernel selection back to the guest operaing system.


Can I directly dial phone numbers from Evolution's address book?

Gnome-phone-manager has evolution built in so if the phone is connected right it should fix your problem.


Bluetooth Headphones switches from (A2DP sink) to (HSP/HFP) when starting VoIP application

Been having this problem for months. Finally got around to googling for a solution and I found this answer on the arch linux forums (from user v1del):

  From pulseaudio 10.0 release notes:

  Pulse release notes wrote: Bluetooth headsets typically support both
  the A2DP profile, which is suitable for music, and the HSP profile,
  which is suitable for telephony use cases. module-bluetooth-policy
  will now automatically switch the profile of a Bluetooth headset from
  A2DP to HSP/HFP when an application creates a recording stream with
  property media.role=phone (telephony applications should set that
  property for their streams). When the stream goes away, the profile
  gets restored back to A2DP. This way the user doesn't have to manually
  switch the profiles when starting and stopping a call. This behaviour
  can be disabled by giving argument auto_switch=false to
  module-bluetooth-policy.

Basically you need to change this line in the file /etc/pulse/default.pa:

### Automatically load driver modules for Bluetooth hardware
ifexists module-bluetooth-policy.so
load-module module-bluetooth-policy
.endif

To:

### Automatically load driver modules for Bluetooth hardware
ifexists module-bluetooth-policy.so
load-module module-bluetooth-policy auto_switch=false
.endif


Unfortunately, due to a bug in Qt, you cannot enable the global menu in some Qt applications such as VLC. Once the bug is fixed, VLC will use the global menu as usual.

If, however, you use the daily build version of VLC, the global menu works just fine.
You can get it from the following PPA:

ppa:videolan/master-daily


Why doesn't this custom static IP network configuration work?

I solved my problem like this: I reserved an IP address to my server MAC address from my Router interface and it worked perfectly. Thanks for the guys here which they helped me solve my problem.

Also, thank you all too.


Installing UBUNTU 18.04 beside WIN 10 with inten core i5, 7th gen

No problem at all. I bought my ideapad 330  15IKB i5 8225U 2weeks ago, and I use W10 10 and ubuntu 18.04. not problem at all.

But just one thing to remind: your lenovo motherboard tend to choose windows instead of ubuntu. You should either select "legacy first" if you already have a hard disk of Ubuntu, or reinstall it to choose "install ubuntu alongside windows".

Last but not least, if your windows updates, or lenovo asks you to upgrade your bios, it probably will go back to windows boot which means, you have to manually change it back. But in general, not problem at all.


sudo dpkg-reconfigure wine-stable-amd64 wine-stable wine-stable-i386: Reply Yes automatically

Thank you @bac0n. I have solved with:
test.sh
#!/bin/bash -e
chmod a+x ./WineHQ-enable-CAP_NET_RAW.exp
sudo ./WineHQ-enable-CAP_NET_RAW.exp

WineHQ-enable-CAP_NET_RAW.exp
#!/usr/bin/expect -f
set timeout -1
spawn dpkg-reconfigure --frontend=readline wine-stable-amd64 wine-stable wine-stable-i386
expect "Allow ordinary users to run applications in Wine that send/receive raw IP packets?"
send -- "yes\r"
expect "Allow ordinary users to run applications in Wine that send/receive raw IP packets?"
send -- "yes\r"
expect "Allow ordinary users to run applications in Wine that send/receive raw IP packets?"
send -- "yes\r"
expect eof


One potential problem with your command line may be the -udf option. Here is what the manual says:

  Include  UDF filesystem support in the generated filesystem image.  UDF support is currently in alpha status and for this reason, it is not possible to create UDF-only images.  UDF data structures are currently coupled to the Joliet structures, so  there  are  many pitfalls with the current implementation. There is no UID/GID support, there is no POSIX permission support, there is no support for symlinks.

EDIT: this is definitely the problem. If the image is created with

genisoimage -input-charset utf-8 -r -volid minimal -o minimal.iso script.sh

then the script.sh is executable (actually even -r-xr-xr-x, because the -r option propagates the executable bit on files). If you want the iso to be readable to Windows, use the Joliet extension (option -J).


Unable to import Numpy after fresh installation of Ubuntu 18.04

Embarrassing: This issue was caused by myself, polluting the threading namespace. I had a python file (in my working dir), named threading.py which obviously came in conflict with the module of the same name. Thus, all modules using the threading package failed on import, numpy included. Simply renaming my local file to something else solved the problem entirely.

This issue was also posted and solved on StackOverflow.


Searching for printer/scanner canon pixma mp230 (32bit) ubuntu 12.04 drivers and how to install

Well I have an answer to my own question.

Since there was a syntax error I dicided to look at the install.sh code a little closer. I opened the file in geany (lightweight ide install from repository/ubuntu softwarecenter) and tried to debug witch did not seem to work. After that I accidentally ran the code from within geany in a terminal. There were no syntax errors mentioned and the software installed, it asked me to connect the printer and answer some questions. The printer now works. By the way this method can be repeated. Why this works and I still get the same error when just running sudo ./install.sh in a terminal I do not know.

The scanner is now working too, but the only program you can use it with is gimp (going to file,create,scangear). The install.sh from the scannerdriver works with sudo ./install.sh from the terminal.

Printerdriver to download: cnijfilter-mp230series-3.80-1-deb.tar.gz

Scannerdriver to download: scangearmp-mp230series-2.00-1-deb.tar.gz

You can also use Printerdriver Canon PIXMA MP250 from Ubuntu 12.04 list


Dump video data from RAM DISK to the HARD DISK?

Try using DDD, a Front end of GDB, in which you can view and edit the contents of RAM. I'm not sure this is what you really need, but try check it out


Laptop won't recognise wifi card anymore

There have been reports of people having problems when moving from the 4.15 to 4.18 Linux kernel with some Dell hardware. You'll want to manually downgrade your Linux kernel, the easiest way to do that is using the Ubuntu Update Kernel Utility (UKUU)

sudo add-apt-repository ppa:teejee2008/ppa
sudo apt update
sudo apt-get install ukuu

Now launch the ukuu app and select one of the 4.15 kernels to downgrade to.


I have replaced the disk with another one and this time the disk was recognized and could be formatted. The large Barracuda must have been defective. I will close this question in a little while.


The Repositories for 10.04 will stop working in April 2012, But I can still Use 10.04?

Actually, the repositories will not disappear in 2012, since the server support remains for 5 years - April 2015.

Support for the desktop disappears in April 2013 - LTS releases are 3 yrs for the desktop and 5 years for the server.  From 12.04 - both the desktop and server support arrangements will be 5 years.

Once the desktop support ends, it doesnt mean the repositories or desktop packages are removed - it will just mean that canonical will not actively update them with stability or security updates.

When the server support ends, it is likely that the repositories will be moved to the old-releases area of ubuntu.com - as described in the community wiki.


(Virtualbox) KDE Plasma glitching on Ubuntu 18.04

Try enabling and disabling 2D acceleration in your VM's settings and assigning an appropriate amount of video memory (16MB absolute minimum). If your problem goes away with no acceleration, you know it's a driver issue on your host machine.


cant update or install anything tor geoipd not installed

Execute these commands in your Terminal:

  sudo dpkg -r tor-browser tor-geoipdb
  sudo apt-get install -f

Run these commands to install TOR:

  sudo add-apt-repository ppa:webupd8team/tor-browser
  sudo apt-get update
  sudo apt-get install tor-browser


Can you mount new partition to /var/log without rebooting

Here are some tested steps :

Step 1

We check what processes/deamons are using /var/log/ and stop them , so we can use :

lsof +D /var/log | awk '!/COMMAND/{print $1 | "sort -u"}'

In my case returns

apache2
monit
rsyslogd

So I just stopped those services until lsof's output was blank

Step 2

Then we need to have the same directory structure with respective permissions, so we can use rsync:

 mkdir /var/oldlog
 rsync -a --include '*/' --exclude '*'  /var/log/ /var/oldlog/

Step 3

Mount your new partition and copy the directory structure onto the new partition

mount /dev/sdX  /var/log/
rsync -a --include '*/' --exclude '*'  /var/oldlog/ /var/log/

Now start the services that you have stopped and tail the logs, if everything seems to be fine then do not forget to make en entry in /etc/fstab

Note : These steps should be fast enough so that it should not drop logs, so you can write a script based on above steps and check it and run.


Unity Launcher only runs once - requires lightdm restart before it runs again

I took a different approach last night, since nothing interesting was appearing in logs anywhere I could find. I checked the lineup of active processes before and after triggering the symptom - low and behold I see compiz in sleep state after triggering the problem.  I wondered if any of my settings might be messing with things so I did a "unity -reset".  No more symptoms! So, one by one, I went back to the ccsm tool restoring my old settings. It seems that the symptoms return when I set the Backlight mode (experimental tab) to "Backlight and Edge Illumination Toggles".  Symptoms go away with either Backlgiht toggles or Edge Illumination Toggles, but both together seems to trigger my symptoms. So at this point, the problem is not solved, but I know how to avoid it.  It does bother me that I can not reporduce this on my other computer though.  I still think it is worth filing a bug report ... I'll figure out how to do that tonight.


What about Internet problem in Ubuntu 11.04?

It is very difficult to be helpful when you provide so very little information. You should always try to provide as much as you can.

But you say that many users complain about this and since it is very uncommon for people to have problems with cabled network in Ubuntu, it is possible that your internet service provider uses something called PPPoE. In that case, you would normally have to enter a username and password in order to connect to the service.

In that case, click the network icon in your upper panel and select "Edit connections". You'll get a new dialog and the right-most tab is called DSL. Click Add and another dialog will appear. In the DSL page of that page, you can enter username, service and password. Your internet service provider can give you that information. You can choose a name for the connection and decide if it should be connected automatically.

I think that should be it. If it doesn't work, but you do need a username and password, then that is the right place to enter all the details, but you'll need to get some support from your internet service provider.

Please confirm if it does work.


Installation of graphical desktop changes kernel?

We would not expect the kernel to be changed by installing ubuntu-desktop.  The default kernel is typically selected based on the installation media, so if you used an ubuntu-server CD image you would expect to have the server kernel installed.


Since that last kernel upgrade X uses too much RAM

While it may appear that X is using up all the RAM, 99% of the time it's not X but some client application.

The Xserver is a server, and so it responds to client requests.  Clients can drive up X RAM or CPU usage by making excessive calls to the xserver, sort of like a DDOS attack against a web server.

The standard way to debug this kind of issue is to look through your process list (e.g. 'ps aux') and start killing off applications one by one until the load dissipates.  Whatever you killed last is probably what's to blame.

The program xrestop can give some indication of what clients are using resources, however unfortunately the memory column in that report doesn't give total memory usage, just pixmap memory.  But it can give you a starting point.


How to connect to existing X session without unlocking physical display?

It is not possible to forward already existing windows through SSH as far as I know.

I'd suggest going for x11vnc. You might need to install it first. This command should enable a one-time only passwordless VNC server sharing your current running desktop (first come, first served):

x11vnc -noxdamage -display :0 -safer -nopw -once -xrandr

You might need to adjust the display. You can also get it programatically by using ConsoleKit dbus interface, but that's too much trouble and :0 is fine most of the time. If that doesn't work, just use :1 and so.

This comes in handy, because you can run it from a SSH sesion from elsewhere, just whrn you need it.


How to get appropriate lib package name for a specific header file

This resembles the question How do I find the package that provides a file?

Since you are looking for packages you don't have in your system, I recommend using apt-file search <header file>. You can fine-tune your search to avoid expansion (that is, do not list foocrypto.html if you are looking for crypto.h).

Your command would look like apt-file -x search '/crypto.h$'

user@host$ apt-file -x search '/crypto.h$'

aroarfw-dev: /usr/include/aroarfw/crypto.h
asterisk-dev: /usr/include/asterisk/crypto.h
crtmpserver-dev: /usr/include/crtmpserver/common/utils/misc/crypto.h
libfaifa-dev: /usr/include/faifa/crypto.h
libgnutls-dev: /usr/include/gnutls/crypto.h
libntfs-dev: /usr/include/ntfs/crypto.h
libroar-dev: /usr/include/libroar/crypto.h
libsrtp0-dev: /usr/include/srtp/crypto.h
libssl-dev: /usr/include/openssl/crypto.h
libsyslog-ng-dev: /usr/include/syslog-ng/crypto.h
libxmlsec1-dev: /usr/include/xmlsec1/xmlsec/crypto.h
libxmlsec1-dev: /usr/include/xmlsec1/xmlsec/gcrypt/crypto.h
libxmlsec1-dev: /usr/include/xmlsec1/xmlsec/gnutls/crypto.h
libxmlsec1-dev: /usr/include/xmlsec1/xmlsec/nss/crypto.h
libxmlsec1-dev: /usr/include/xmlsec1/xmlsec/openssl/crypto.h
linux-headers-3.2.0-4-amd64: /usr/src/linux-headers-3.2.0-4-amd64/include/config/crypto.h
linux-headers-3.2.0-4-amd64: /usr/src/linux-headers-3.2.0-4-amd64/include/config/rt2x00/lib/crypto.h
linux-headers-3.2.0-4-common: /usr/src/linux-headers-3.2.0-4-common/include/linux/crypto.h
linux-headers-3.2.0-4-common-rt: /usr/src/linux-headers-3.2.0-4-common-rt/include/linux/crypto.h
linux-headers-3.2.0-4-rt-amd64: /usr/src/linux-headers-3.2.0-4-rt-amd64/include/config/crypto.h
linux-headers-3.2.0-4-rt-amd64: /usr/src/linux-headers-3.2.0-4-rt-amd64/include/config/rt2x00/lib/crypto.h

Moreover, if you know beforehand that the package is named something-dev or libsomething-dev you can pipe it to grep.

apt-file -x search '/crypto.h$' | grep '^lib[^:]*-dev'

This returns only packages named lib*-dev.

Finally, if you only want the name of the packages (and not the path to the file) so you get a nice list of packages (one per line), you can use grep -o instead.

apt-file -x search '/crypto.h$' | grep -o '^lib[^:]*-dev'

Happy coding :)


How to get a new line at the end of pipe command

It seems you want to get only directory names, if so you can use find:

find /share -maxdepth 1 -type d -printf '%f\n'

Example:

% find /usr -maxdepth 1 -type d -printf '%f\n'
usr
include
lib
share
sbin
local
bin
games
lib32
src

Original answer:

Use an intelligent shell like zsh or use printf:

printf '%s\n' "$(ls -l /share/ |grep ^d |tr -s ' ' |cut -f9 -d' '| tr '\n' ' ')"

Take a look at help printf.


How can I download Ubuntu packages and take them home for installing?

You just need to download the .deb packages from the providers of the software and place it on a thumb drive.  Most (if not all) providers of Ubuntu software will provide the .deb packages somewhere on their site, it's just not always easy to find.

Be sure to download the right .deb for your system, x86 for 32 bit and x64 for 64 bit.


The first step is to list all your partitions to find the one you want to mount:
$ lsblk -o NAME,FSTYPE,LABEL,SIZE,MOUNTPOINT
NAME        FSTYPE  LABEL                    SIZE MOUNTPOINT
sdb                                         14.4G
├─sdb4      iso9660 Ubuntu 18.04 LTS amd64   1.4G /media/rick/Ubuntu 18.04 LTS amd64
├─sdb2                                         1M
├─sdb5      ext4    casper-rw                6.4G /media/rick/casper-rw
├─sdb3      vfat    usbboot                  244M
└─sdb1      ntfs    usbdata                  6.4G /media/rick/usbdata
sr0                                         1024M
sda                                        931.5G
├─sda4      ntfs    WINRETOOLS               450M
├─sda2                                       128M
├─sda5      ntfs    Image                   11.4G
├─sda3      ntfs    HGST_Win10               919G /mnt/d
└─sda1      vfat    ESP                      500M
nvme0n1                                      477G
├─nvme0n1p5 ext4    NVMe_Ubuntu_16.0        44.6G /
├─nvme0n1p3                                   16M
├─nvme0n1p1 ntfs                             450M
├─nvme0n1p8 ext4    Ubuntu18.04             23.7G
├─nvme0n1p6 swap    Linux Swap               7.9G [SWAP]
├─nvme0n1p4 ntfs    NVMe_Win10             391.2G /mnt/c
├─nvme0n1p2 vfat                              99M /boot/efi
└─nvme0n1p7 ntfs    Shared_WSL+Linux           9G /mnt/e

For this example, we will mount nvme0n1p8 which has the label Ubuntu18.04. To credit sources, we'll be following this article as a
guide.
Create mount point directory
The next step is to create a directory under /mnt that the newly mounted partition will be referred to as:
sudo mkdir /mnt/Ubuntu18.04

Mount the partition to the new directory
The final step is to mount the partition to the new directory:
$ sudo mount -t auto -v /dev/nvme0n1p8 /mnt/Ubuntu18.04
/dev/nvme0n1p8 mounted on /mnt/Ubuntu18.04.

Notice we prepend /dev/ to the names provided by lsblk above.
Now let's see what we've just mounted:
$ ll /mnt/Ubuntu18.04
total 24
drwxr-xr-x 3 root root  4096 Apr 26 17:00 ./
drwxr-xr-x 6 root root  4096 Apr 27 20:51 ../
drwx------ 2 root root 16384 Apr 26 17:00 lost+found/

lost_found is needed for fschk command (File System check). It is automatically created and normally we don't have to "fiddle" with it.
Unmount the partition
When we are finished we can unmount the partition using the -l parameter which safely unmounts the partition:
$ sudo umount /dev/nvme0n1p8 -l

Script method
A script to mount partition is available in this answer:

Mount Debian install as USB drive

This screen appears tailored to your unique machine environment:


By looking at the comments & I've added as an answer expanding more.

Possible cause is that IP's are assigned to the interface statically instead requesting automatically by adding a gatway too (just an assumption). If there are multiple gateways though the subnet is same, system does not know where to look into unless there's a persistent/static route added separately.

You may click on the nm-applet () & select Edit connections to get the entire network manager preferences or you may achieve this using terminal (press CTRL+ALT+T) & key-in below;

nm-connection-editor            # this will give you below nm-editor screen

Navigate to Wired tab, select the profile & click edit or either delete if necessary. If editing, then navigate to IPv4 settings select the Method as Automatic (DHCP) for the eth0 to request IP from an available DHCP server (see below screen);

Once done, restart the network manager to re-authenticate to the network.

sudo service network-manager restart

And as you requested, all saved network profiles can be found under system-connections directory. You may edit/delete in there but I'd recommend to use the GUI if you're to create a new connection profile. Below are the command to view your current network profiles.

 cd /etc/NetworkManager/system-connections/    # will change in to the directory
ls -l                                          # will display all the profiles in a sequense
sudo rm -fr profile_name                       # you will need root to add/edit/delete & this will remove a specified profile

Hope this helps!! :)


This shouldn't cause any issues, because as long as it is in the $PATH environment variable, bash should know where it is and be able to invoke it from any directory.

That being said, I have not used anaconda before so I can't speak to whether or not that specific program would have any issues, but it shouldn't.


Epson has their own handy driver for the scanners, which can be downloaded from http://support.epson.net/linux/en/iscan_c.php?version=1.0.4, and instructions for the package are at http://download.ebz.epson.net/man/linux/iscan_e.html#sec6-1

The basics of the installation are to download the appropriate .deb file (probably the 64 bit version) and then...

Open a terminal window (ctrl+alt+t)

cd Downloads
tar xvfz iscan-bundle-1.0.4.x64.deb.tar.gz
cd iscan-bundle-1.0.4.x64.deb
./install.sh


Assign more than 1 CPU/core to a process

Unless specifically designed to do so, software cannot generally use more than one CPU core, and cannot in general have extra added.
(Writing software to run on multiple cores concurrently is significantly more complicated, as you cannot guarantee the order in which tasks will finish, so you have to guard against all manner of problems caused by multiple CPUs trying to access resources concurrently, or events occurring in a different order to that you expected).
That said, PDF cracking is a task that should be parallelisable. It appears you can find a modified version with multi-core support, but it looks like you'll have to compile it from source.


Dash is empty, reinstallation doesn't help

Same here.  Installed Ubuntu Server 12.10 in VMWare Player 5.0.1, then installed GUI with

sudo apt-get install --no-install-recommends ubuntu-desktop

and now i can't open any apps, dash is empty, no panels, etc

I was able to resolve it by clicking the software center icon and installing unity-lens-applications and unity-lens-files. I also figured out CtrlAltT opens a terminal after installing those two packages through the software center. I issued the command unity --reset from the terminal.


Try boot repair-- Steps

Boot from a Ubuntu live CD or USB

Type these commands one after other

sudo add-apt-repository ppa:yannubuntu/boot-repair

sudo apt-get update

sudo apt-get install boot-repair

Search for Boot-Repair in the Dash and launch it.

Then choose Recommended Repair..


How should I install Apache Tomcat 7 for use with Eclipse?

You can use sudo apt-get install tomcat7 to install Tomcat.

To disable autostarting, run the following command after installing:

sudo update-rc.d tomcat7 disable


For Ubuntu 12.04 and newer
Click on the button:

or by simply opening a terminal and typing sudo apt-get install xbmc.
After the release of Ubuntu 12.04 updates should be available in the stable XBMC PPA above and XBMC can be updated by adding the PPA and updating your system.
sudo apt-add-repository ppa:team-xbmc/ppa
sudo apt-get update && sudo apt-get upgrade


How much swap should I take for 1GB to 8TB of RAM on 14.04 or higher?

The short answer:

Set your swap file to:

round(sqrt(RAM)) if you don't use hibernation
RAM+round(sqrt(RAM)) if you do use hibernation

Set your swappiness to 10 on a desktop, but not on a server!

The long answer:

In the past:

The rule of thumb in use for the last 25 years has been a minimum of 1xRAM and maximum 2xRAM so that is what you'll see quoted all the time.

That minimum was set back in the stone age when I was a teenager and dinosaurs still roamed the Earth and because RAM was just too expensive and you absolutely needed that swap space to be able to accomplish anything.

The maximum was set at that time because of diminishing returns: it's just too slow to have to swap so much memory as HDD access is a factor of 1000 slower then RAM: good in an emergency, but not really good for everyday use! At the time, when you ran out of swap space, it was time to add more RAM! (which is still true today).

In the present:

If you do not use hibernation and your memory is in excess of 1GByte the new rule of thumb is round(sqrt(RAM)) where RAM is obviously your RAM size in GB and sqrt the square root. :-)
If you use hibernation, you need to be able to swap the entire amount of RAM+already swapped RAM to disk, thus the formula becomes: RAM+round(sqrt(RAM))
The rule of diminishing returns still holds today for the maximum, but unless you test your actual usage, taking 2xRAM is just a waste of disk space, so don't use the maximum Unless you run out of swap space using the other methodologies.

All of these together give you the following table: (last 3 columns denoting swap space)

    RAM   No hibernation    With Hibernation    Maximum
    1GB              1GB                 2GB        2GB
    2GB              1GB                 3GB        4GB
    3GB              2GB                 5GB        6GB
    4GB              2GB                 6GB        8GB
    5GB              2GB                 7GB       10GB
    6GB              2GB                 8GB       12GB
    8GB              3GB                11GB       16GB
   12GB              3GB                15GB       24GB
   16GB              4GB                20GB       32GB
   24GB              5GB                29GB       48GB
   32GB              6GB                38GB       64GB
   64GB              8GB                72GB      128GB
  128GB             11GB               139GB      256GB
  256GB             16GB               272GB      512GB
  512GB             23GB               535GB        1TB
    1TB             32GB              1056GB        2TB
    2TB             46GB              2094GB        4TB
    4TB             64GB              4160GB        8TB
    8TB             91GB              8283GB       16TB

The above is just a rule of thumb; it's not the law of gravity!
You can break this rule (unlike the law of gravity) if your particular use case is different!

Pro tip: Always allocate SWAP at the start of a HDD as the heads need to move less on the inside of the disk.
   Yes: On SSDs, it doesn't really matter any more where you locate the swap area as they use quantum-tunnelling instead of moving heads and modern SSDs use all of their memory cells (even the unallocated space) to prevent quantum degradation.

How to test if your usage of swap is different from the "generic" rule:

Just execute:

for szFile in /proc/*/status ; do
  awk '/VmSwap|Name/{printf $2 "\t" $3}END{ print "" }' $szFile
done | sort --key 2 --numeric --reverse | more

which will give you a list of all running programs that are swapped out (with the one using the most swap space on top)

If you're using more then a few KB: resize to more then the minimum, otherwise, don't bother...

If you're on a server, stop reading now: you're all set!

If you're on a desktop/laptop client (not server), you want your GUI to be as responsive as possible and only swap when you really need to.  Ubuntu has been optimised to swap early for server use, but on your client you want editing that huge 250 Mega-pixel raw picture in gimp to be speedy, so setting your swappiness to 10 will keep the kernel from swapping too early, while ensuring it doesn't swap too late:

If you have a sysctl.conf file,

sudo nano /etc/sysctl.conf

OR

If you have a sysctl.d directory but no sysctl.conf file, create a new file:

sudo nano /etc/sysctl.d/35_swap.conf

and in both cases add:

# change "swappiness" from default 60 to 10
# (theoretically only swap when RAM usage reaches around 80 or 90 percent)
vm.swappiness = 10

to the end of the file, save the file (Ctrl+XY+Enter in nano) and execute a:

sysctl --system

to reload the parameter or take the Window$ approach and reboot... :-)


CUDA 7 and 10 installed, but NVCC presents only CUDA 7

If you installed CUDA 10, you should change your ~/.profile file to match this:

# set PATH for cuda 10.0 installation
if [ -d "/usr/local/cuda-10.0/bin/" ]; then
    export PATH=/usr/local/cuda-10.0/bin${PATH:+:${PATH}}
    export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
fi

Log out then back in for changes to take effect.

The nvcc app is found in the /usr/local/cuda-10.0/bin folder, but yours is probably showing /usr/local/cuda-7.x/bin in your ~/.profile file.


Trouble accessing Ubuntu server with SSH

I was able to solve the problem with:
sudo ufw disable


From comments @steeldriver, the problem was that I had uploaded the files to /data1 while /dev/sdb was not mounted there, this was fixed by unmounting the disk, then sudo rm -rf /data1 and then remounting.
$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            2.0G     0  2.0G   0% /dev
tmpfs           395M  5.3M  390M   2% /run
/dev/sda1       9.7G  2.2G  7.1G  24% /
tmpfs           2.0G     0  2.0G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           2.0G     0  2.0G   0% /sys/fs/cgroup
/dev/sda15      124M  7.9M  116M   7% /boot/efi
tmpfs           395M     0  395M   0% /run/user/1001
/dev/sdb        492G   73M  492G   1% /data1


Since you only want to search for files in the actual folder you also could use

locate libd*

or something like as follows, but does not make much sense.

ls libd* | xargs locate
locate $(ls libd*)

If you want to use find, you also could use * instead of ., but I also would quote the {}.

find * -maxdepth 1 -name "libd*" -exec locate "{}" ';'

Lastly, if you want to include dot-files, aka hidden files with glob.

shopt -s dotglob
find * -maxdepth 1 -name "libd*" -exec locate "{}" ';'
shopt -u dotglob


The fix found at https://bitbucket.org/ahixon/r5u87x

Enter the code, 1 command at a time, into a terminal window.

sudo apt-get install libglib2.0-dev libusb-dev build-essential gcc automake mercurial
hg clone http://bitbucket.org/ahixon/r5u87x/
cd r5u87x
make
sudo make install
sudo r5u87x-loader --reload

The loader will automatically be run on boot when it detects your webcam.


Usually Totally Normal

When you copy files from one place to another on the same physical drive it means the disk heads have to move back and forth very quickly. When you add the need for the web browser to be accessing files in it's "Temporary Internet Files" folder you end up with the disk getting hammered by competing I/O requests - a condition known as "thrashing".

This is why a lot of people use a separate physical drive for the OS - it means that the OS drive can continue to respond quickly even though you're doing a lot of work with the data drive.

Another reason this might happen is that your HDD is facing problems, try this to check you hard disk health:-

Open Disks from the Activities overview.
Select the disk you want to check from the list of storage devices on the left. Information and status of the disk will be shown.
Click the menu button and select SMART Data & Self-Tests…. The Overall Assessment should say “Disk is OK”.
See more information under SMART Attributes, or click the Start Self-test button to run a self-test.

References:

https://help.ubuntu.com/stable/ubuntu-help/disk-check.html.en


Configure two network interfaces on Ubuntu 14.04

You'll need to add a route to 10.0.0.0/8:

route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.73.9.1 dev em2 (untested)

To make it permanent add it to your interfaces config in the em2 section:

up route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.73.9.1 dev em2

Just for understanding: Your computer knows where to send packets in your local net. For everything else, he needs routes. The default route is used if there isn't a more specific route. Now you have told him to send all packets for that subnet over a different router, that probably knows where to send the packets. (or knows who else might know.)


In order to run tor with all the connections you need to configure tor and polipo. See Tor check failed though Vidalia shows green onion for configuring tor and polipo. Basically what you need to do is configure manual proxy in your network settings  and apply it system wide after that. I guess that will work.


Finally found it! As it turns out, I was searching for the wrong term. Apparently the TTYs run on a framebuffer, which is what the colors get changed in.

From this blog post but customized to use the railscasts theme colors, add the following to ~/.bashrc:

if [ "$TERM" = "linux" ]; then
    echo -en "\e]P0232323" #black
    echo -en "\e]P82B2B2B" #darkgrey
    echo -en "\e]P1D75F5F" #darkred
    echo -en "\e]P9E33636" #red
    echo -en "\e]P287AF5F" #darkgreen
    echo -en "\e]PA98E34D" #green
    echo -en "\e]P3D7AF87" #brown
    echo -en "\e]PBFFD75F" #yellow
    echo -en "\e]P48787AF" #darkblue
    echo -en "\e]PC7373C9" #blue
    echo -en "\e]P5BD53A5" #darkmagenta
    echo -en "\e]PDD633B2" #magenta
    echo -en "\e]P65FAFAF" #darkcyan
    echo -en "\e]PE44C9C9" #cyan
    echo -en "\e]P7E5E5E5" #lightgrey
    echo -en "\e]PFFFFFFF" #white
    clear #for background artifacting
fi


Installing Epson ET-3600 fail to install

I found that using the Epson ET-2600 driver works for printing on the ET-3600.

http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX

Search for ET-2600, linux. Download the driver, not the driver utility. Install the deb for your arch. Connect the USB cable, add printer dialog, select epson, then et-2600 through cups. Works a treat.


Failed to create symbolic link: File exist

You can overwrite the existing file ../sites-enabled/myproject by forcing ln like this
sudo ln -sf ../sites-available/myproject ../sites-enabled/
then
sudo service nginx restart


How can I use a script to control a VirtualBox guest?

He's basically saying you can do this:

Create a Virtual Machine, like a Windows virtual machine.
Login to the virtual machine.
Switch the virtual machine into "seamless" mode
Save the state of the virtual machine in the main Virtual Box window.
Create a bash script with the VBoxManage commands, so that you can do something like ./runinwindows "C:\\some\\path\\executable.exe"

For example:

#!/bin/bash
# Start the VM
VBoxManage startvm "<Name_of_VM>"

# Run the executable
VBoxManage --nologo guestcontrol "<Name_of_VM>" execute --image "$1" --username windowsuser --password password --wait-exit --wait-stdout

# Save the current machine state for the next time you run the script.
VBoxManage controlvm "Name_of_VM" savestate

Then you could run a Windows executable (in this case) in your terminal, but it would actually be running in a virtual machine.


Having trouble with HiDPI scaling in Zesty

You should restate your problem as a question since it's not clear what you expect.

A patch was applied to Unity 7 for the Zesty release that claims to improve automatic scaling on HiDPI displays, but it completely broke HiDPI settings and behavior for me as well. Like you, in Yakkety and earlier releases, I had Unity's display scale factor set to 1.5, and the UI and font scaling was perfect on my 2560x1440 display. After upgrading and rebooting into Zesty my fonts shrank to tiny proportions, and now I have to settle for a scale factor of 1.38 (which is almost below the comfort threshold for my old eyes) because at 1.5 fonts appear much smaller than they do at 1.38, which is obviously broken behavior.

Here's the changelog documenting the offending change in Unity:

https://launchpad.net/ubuntu/+source/unity/7.5.0+17.04.20161130-0ubuntu1

Here's the diff between the prior Unity release and the current, it contains the new (broken) scaling code:

https://launchpadlibrarian.net/295698352/unity_7.5.0+17.04.20161111.1-0ubuntu1_7.5.0+17.04.20161130-0ubuntu1.diff.gz


Adding icons to desktop after package installation

As already mentioned, this isn't something that should be done for an official package. Though I could see how this might be useful in a local deployment.

Use something like this in debian/postinst:

#!/bin/sh
for user in /home/*
do
    cp /usr/share/applications/foo.desktop ${user}/Desktop/
    chmod 755 ${user}//Desktop/foo.desktop
done


How to combine the output of multiple `find` commands?

Combining:

find -type f \( -name "*.avi" -or -name '*.mp4' \) -exec md5sum {} + > checklist.chk

Adding output to one file:

find -type f -name "*.avi" -exec md5sum {} + > checklist.chk
find -type f -name "*.mp4" -exec md5sum {} + >> checklist.chk


check your partitions inside

# cat /proc/partitions

If you have there something like

# cat /proc/partitions | grep sdb
   8        0  234431064 sdb
   8        1     524288 sdb1

You can try to mount sdb1

# sudo mkdir /media/sdb1
# sudo mount /dev/sdb1 /media/sdb1


Sense of "stop on..." stanza when job is a task

That would abort the task; if you tell the system to reboot because of a failure of some kind while bringing the system up, you generally don't want it to finish trying to boot first, or (worse) try to bring the system up and shut it down at the same time.


higan says that OpenGL 3.2 is not available, but I should have 3.3

Running MESA_GL_VERSION_OVERRIDE=3.2 MESA_GLSL_VERSION_OVERRIDE=150 higan will get Higan working.

Answer taken from Reddit.


Ubuntu desktop isn't opening after attempted log in

Partial answer... work in progress...

Step #1: (re-edit with new addition, then reboot)

sudo pico /etc/lightdm/lightdm.conf

[LightDM]
[SeatDefaults]
greeter-show-manual-login=true
allow-guest=true
[XDMCPServer]
[VNCServer]

Step #2:

login into text terminal as your normal user
type ls -al .*thority*
you should see at least two .old files, maybe more if they got recreated
if you only see two .old files

mv .ICEauthority.old .ICEauthority
mv .Xauthority.old .Xauthority

Step #3:

type ls -alt | more -7 and show me the first five lines (copy/paste into your question, not in comments, please)

Step #4:

type sudo passwd root
enter your admin password
enter new password for root twice
type exit, then control-alt-f7 to return to normal login screen
try and log into root with new password

Step #5:

at the normal login screen, use up/down arrows and see if guest appears, and if you can log into guest

Step #6:

in the root account
start a terminal from the dash
edit .profile

pico .profile or gedit .profile

change mesg n || true to tty -s && mesg n || true
save file and quit pico/gedit
log out, log back into root and confirm no errors


20.04.1, problem switching from swap partition to /swapfile

Well, it's fixed.
When I tried to do a sudo swapoff -a, it gave me a parse error on the following line in my /etc/fstab...
/swapfile    none    swap    sw      0   0

I retyped the line, and made sure to use spaces...
/swapfile  none  swap  sw  0  0

Do you see any difference?
And now it all works!
Thanks for all of the good feedback here!


You've set the first element of an array as /home/pi/radio/fm/star_wars.wav with the line:

musics[0]="/home/pi/radio/fm/star_wars.wav"

To access the contents, you need to expand that array element using $ like so:

sudo /home/pi/radio/fm/fm_transmitter -f 103 -r "${musics[0]}"

The quotes "" are used to preserve the format of the output, and the braces {} are part of expanding an array variable.

It's not clear why you're using an array here, when a standard variable would work. You could replace:

musics[0]="/home/pi/radio/fm/star_wars.wav"

with

musics="/home/pi/radio/fm/star_wars.wav"

and the line using that variable changes to:

sudo /home/pi/radio/fm/fm_transmitter -f 103 -r "$musics"

This is much simpler as you don't need to use index numbers (the part referred to by [0]).


Download file cert.pem from OpenVPN Server. (System Admin can help you.)
Install OpenVPN Client.

sudo apt-get install openvpn
If you put your cert.pem on this path /home/your_account_name/openvpn-client/cert.pem when you connect by OpenVPN client you must use this command :

sudo openvpn –client –pull –comp-lzo –nobind –dev tap0 –ca /home/your_account_name/openvpn-client/cert.pem –auth-user-pass –remote Your_IP_Of_OpenVPN_Server

** This command has one line.

4 . It’s complete.

Reference: http://gregoryreese.wordpress.com/2010/11/18/how-do-configure-the-openvpn-client-on-ubuntu-story-of-aoddy/

hope this helps.


Install CompizConfig SettingsManager

sudo apt-get install compizconfig-settings-manager
Launch it by searching from the dash in Unity, or Preferences > CompizConfig Settings Manager in Ubuntu Classic.
Ensure that the Opacify, and
Opacity, Brightness, and Saturation
plugins are both disabled.


Audacious desktop notifications stopped working in 13.10

Recent versions of Audacious added the "Pause" and "Next" button to the notification.  The problem is, for some odd reason, Unity will display any notification that has buttons as a message box, like you are seeing.  There is a setting you can change in Audacious to hide the buttons and get the old notification style back.  Go to File -> Preferences -> Plugins -> General -> Desktop Notifications -> Preferences and uncheck the "Show playback controls" option. Make sure that "Always show notification" option is also unchecked.


JBL's Quantum does detect plugged JBL headset

I had the same problem with JBL Quantum 800.
Problem was solved when i install Sound Switcher Indicator.
I've just switch input/output when it's needed.
Installiation:
sudo apt-add-repository ppa:yktooo/ppa
sudo apt-get update
sudo apt-get install indicator-sound-switcher


Using rename (as per heemayl's suggestion I narrowed down the globbing only to filenames ending exactly with ..txt):

rename -n 's/(.*)\./$1/' *..txt

This will match the filename until the last dot and replace the match with everything but the last dot.

If the result is the expected one, remove the -n option:

rename 's/(.*)\./$1/' *..txt


Tap-to-click not working in Ubuntu 12.04

First, i located mi synaptics.conf file with:

  locate synaptics.conf

Mi file was in:

  /usr/share/X11/xorg.conf.d/50-synaptics.conf

I edited my 50-synaptics.conf with:

  sudo vim /usr/share/X11/xorg.conf.d/50-synaptics.conf

Finally i changed my original file, from this:

Section "InputClass"
        Identifier "touchpad catchall"
        Driver "synaptics"
        MatchIsTouchpad "on"`

to this:

Section "InputClass"
        Identifier "touchpad catchall"`
        Driver "synaptics"
        Option "TapButton1" "1"
        Option "TapButton2" "2"
        Option "TapButton3" "3"
        MatchIsTouchpad "on"


How to have programmer-friendly Dvorak with deadkeys in Ubuntu?

I really like the way how Ubuntu 16.04 has solved the case on Macbook Air, here but I like the reverse way better about the fix in Macbook and PC. The tilde and backtick key will print the greater than and less than symbol, which I really like.
This is very convenient also in PCs,  and original thread.
Edit ~/.xmodmaprc

keycode 60 = grave asciitilde

Run

xmodmap ~/.xmodmaprc

Find your keys by xmodmap -pk | grep greater; I really like the following configuration

    60         0x002e (period) 0x003e (greater)
    93         0x003c (less)   0x003e (greater)        0x007c (bar)    0x00a6
(brokenbar)      0x007c (bar)    0x00a6 (brokenbar)


How do you remove your originating IP from Thunderbird?

You just can't. The IP address is not added there by your client but by the server which is the one adds the Header:

Delivered-To: highballer906@gmail.com
Received: by 10.60.17.1 with SMTP id k1csp74699oed;
Mon, 17 Jun 2013 23:56:20 -0700 (PDT)
X-Received: by 10.50.7.1 with SMTP id f1mr461112iga.48.1371538580627;
Mon, 17 Jun 2013 23:56:20 -0700 (PDT) Return-Path:
Received: from nm41-vm4.bullet.mail.ne1.yahoo.com (nm41-vm4.bullet.mail.ne1.yahoo.com. [98.138.120.220]) by mx.google.com

Those IP's are added there for your mail exchanger. Those ip's is to prevent abuse of their systems.

If you need to hide your ip, you should use a VPN or Tor or whatever that hides your ip from client side, but your mail client can and will not hide your ip address with any configuration.


Ubuntu 20.04 - gcc version lower than gcc-7

The only solution that worked for me is:
Manual installing of .deb packages
(sad programmer noises)

Go to http://old-releases.ubuntu.com/ubuntu/pool/universe/g/
Download all .deb packages for gcc compiler version you want, f.e.:

gpc-2.1-3.4_3.4.6-6ubuntu5_amd64.deb
cpp-3.4_3.4.6-6ubuntu5_amd64.deb       lib32g2c0_3.4.6-6ubuntu5_amd64.deb
g++-3.4_3.4.6-6ubuntu5_amd64.deb       libg2c0_3.4.6-6ubuntu5_amd64.deb
g77-3.4_3.4.6-6ubuntu5_amd64.deb       libg2c0-dev_3.4.6-6ubuntu5_amd64.deb
gcc-3.4_3.4.6-6ubuntu5_amd64.deb       libstdc++6-dbg_3.4.6-6ubuntu5_amd64.deb
gcc-3.4-base_3.4.6-6ubuntu5_amd64.deb  libstdc++6-dev_3.4.6-6ubuntu5_amd64.deb

Manually install them by running command, f.e.:

sudo dpkg -i ./gcc-3.4-base_3.4.6-6ubuntu5_amd64.deb
sudo dpkg -i ./cpp-3.4_3.4.6-6ubuntu5_amd64.deb
sudo dpkg -i ./gcc-3.4_3.4.6-6ubuntu5_amd64.deb

and so on...

Check the console output errors about package dependencies to figure out the package install order.

If you encounter error (bug probably) about crossdependency of "g++..." package to "libstdc++..." package and v.v. then run install command to update libstdc++ package with exact version number, f.e.:

sudo apt-get install libstdc++6

Hooray! Use installed gcc (g++) version by, f.e.:

g++-3.4 -v

P.S.: of you're getting missing libs errors try

export LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LIBRARY_PATH

before the build


How can I have a Bluetooth Keyboard Auto-Connect at Startup?

This answer comes from a tutorial written by Andrew Martin on thetechdepo.com. See the link below for the original post, however this is a complete rewrite. It is written specifically for an apple keyboard, however I have used it for multiple devices so it is not apple, or keyboard specific. Simply follow the instructions and you will have any bluetooth device auto connect in Ubuntu.

Go to System Settings > Bluetooth and follow the instructions to add your newly connected bluetooth device.

Follow the instructions and enter the pin when requested, then after the device is connected and working, power off the device. Now onto the auto connect part.

Open your terminal and enter the following commands:

$ killall bluetooth-applet
$ sudo /etc/init.d/bluetooth restart
$ sudo hcitool dev

The last command will display the output for your device such as:

Devices:
    hci0    00:00:00:00:00:00

Install a new package to allow you to connect bluetooth via the command line.

$ sudo apt-get install bluez-compat

Once this has completed, you will now have hidd program installed. At this point, turn on your keyboard and enter the following command. It will output the MAC Address of your keyboard, which you will need to copy and paste into the subsequent command, as seen below:

$ hcitool scan
Scanning ...
    AA:BB:CC:DD:EE:FF   Bluetooth Device Name
$ sudo hidd --connect AA:BB:CC:DD:EE:FF

Now we have to create a startup file to auto connect the device when the pc starts. Via the terminal...

$ gedit ~/.keyboard.sh

Enter the following text, substituting AA:BB:CC:DD:EE:FF with the hardware ID you saw above. Finally, save the file.

#! /bin/bash

address="AA:BB:CC:DD:EE:FF"

while (sleep 1)
do
connected=`sudo hidd --show` > /dev/null
if [[ ! $connected =~ .*${address}.* ]] ; then
sudo hidd --connect ${address} > /dev/null 2>&1
fi
done

Now create a new startup file. Substitute "keyboard" for whatever device name you choose. This is simply the name of the file.

$ sudo gedit /etc/init.d/keyboard

Paste the following, which tells your Ubuntu to run the file you just created at startup.

#!/bin/sh
/home/username/.keyboard.sh &

exit 0

Now set both files permissions to executable via the terminal.

$ sudo chmod +x /etc/init.d/keyboard
$ chmod +x ~/.keyboard.sh
$ sudo update-rc.d keyboard defaults

Restart your computer and your device should auto connect and be working without you having to do anything.

I hope this helps a few people, it took me a long time to find a solution to my problem and I wanted to cement this tutorial a little deeper into the web.

The original link can be found here.


where is the kernel-parameters.txt directory?

The file Documentation/kernel-parameters.txt is in the Linux source repository, for example, clone the main Linux git repo:

git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
cd linux
less Documentation/kernel-parameters.txt

Alternatively, one can view this via the URL from the git repo: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/kernel-parameters.txt

Mind you, that applies to the latest upstream kernel, to see the same file for the different Ubuntu Linux kernels, one needs to look at them at the Ubuntu gitweb, for example, Xenial: http://kernel.ubuntu.com/git/ubuntu/ubuntu-xenial.git/tree/Documentation/kernel-parameters.txt


Try to boot with the same kernel you hibernated, but in recovery  mode.  Then, when the system is loaded, just reboot. This should remove the lock.

About why the hibernation failed, can't help you without more information. Maybe you can add something when you manage to boot back normally.


I changed my users userid and cannot login with plasma anymore. terminmal works though

First of all, group IDs (GID) below 1000 are used by the system and other no-login groups and usually not as primary group for normal user accounts. You should give your user a GID above 1000, ideally the same number as its user ID (UID).

Second, file system ownership is bound to user/group IDs, not names. Therefore changing your account's UID and GID will make it lose all rights on files it owned before.

This means you have to reassign the ownership of that account's home directory to the new UID/GID pair. The most important file here is probably the ~/.Xauthority file. If that one is not owned by the correct user, it will not be able to log into the graphical desktop.

You recursively change the ownership of a directory with this command:

sudo chown -R USER:GROUP DIRECTORY

Simply replace USER and GROUP with the respective name or ID and use your old user's home directory (e.g. /home/myoldlogin) as DIRECTORY. The command you have to run could then look like this:

sudo chown -R 1026:1000 /home/myoldlogin


Ping a Domain-Name-Server from a Network

If you want other machines to be able to ping your domain, you need to set the domain and its ip address in a DNS server that is visible and accessible globally. for example you can use ns1.com or cloudflare.com DNS service.
The /etc/hosts file is only accessible from your computer.


Custom launcher in application panel not working

As the Exec entry isn't executed by a shell you can't use ~/.

Replace

Exec=~/Programs/eclipse_c/eclipse_c

with

Exec=/home/dan/Programs/eclipse_c/eclipse_c


Post-installation Apps Running Slow on 18.04 LTS: Discord and Steam

There is a problem in Discord on Ubuntu (At least at the moment). It uses 100% of the CPU so it will indeed slow things down. I do not know whether it was reported to them or not. I would imagine they know of the problem but don't have a solution yet.

As for Steam, it uses Java. Java is slow to start and run. The games are okay because they run on OpenGL with 3D handled by your video card, but the rest is that slow Java engine...

Most apps coming with Ubuntu are written in a language which compiles to binary. So that runs directly on the CPU. Some OS tools are using python, but that's likely to already be loaded and the python scripts are generally relatively small.


Triple booting Chromium Os, Ubuntu 14.10, Windows 7

This may be possible, but if your disk drive has an MS-DOS partition table, there is a limit on the number of partitions. If you have your HDD with GPT partition table it is possible to create more partitions (I don't know how many, but it is a large amount). This is the process I did to triple-boot Ubuntu, Windows 8.1 and Chromium OS with UEFI.

I am supposing that you are able to create the two partitions that Chromium OS needs, and you have them somewhere (an USB drive, a disk image...). You need to create 2 partitions:

The ROOT partition: I would give this one between 1.5 GiB and 3 GiB. This one only contains the system.
The STATE partition: This is where your data goes. I gave this one 9 GiB, but anything greater than 2 GiB should be fine.

Once you have created the partitions, you can copy them (using dd). Then you can fit the filesystem to the block device where they are. You can use the "Check" option in GParted or resize2fs.

The interesting part starts here, where you have to create the GRUB entry for Chromium OS. Under Ubuntu, edit the file /etc/grub.d/40_custom and add the following entry:

menuentry "Chromium OS" {
     set root=(hd0,YOUR_ROOT_PARTITION_NUMBER)
     linux /boot/vmlinuz init=/sbin/init boot=local rootwait ro noresume noswap loglevel=7 noinitrd console=tty2 quiet root=HDROOTA i915.modeset=1 cros_legacy cros_debug
}

You must replace the "YOUR_ROOT_PARTITION_NUMBER" with the number of partition where your Chromium OS ROOT is. If you are using UEFI, you must also change "cros_legacy" with "cros_efi". Now you can create the grub.cfg file:

sudo update-grub

Now we have to tell Chromium OS where the STATE partition is. By default it uses /dev/sdX1, where X is the disk where the ROOT partition is. To change it, edit the file /sbin/chromeos_startup, and change the number "1" of the line STATE_DEV=${ROOTDEV_TYPE}1 with the number of the STATE partition.

Reboot and enjoy your Chromium OS!


Console prompt during boot (for truecrypt)

I use the following script, which I've added to my Startup Applications, to automount my "favourite" truecrypt partitions upon login and to autodismount them when I logout/shutdown.

When logging in, truecrypt starts and prompts me for my admin password and for the passwords to the truecrypt volumes (with keys if you use them). Note that storing the path to the key in this script is optional - I include it here to show that it can be done.

#!/bin/bash
truecrypt --auto-mount=favorites -k /path/to/truecrypt/keyfile --background-task &

# store the PID of the truecrypt process
tcPid=$!

tcTerm()
{
# unset the DISPLAY
# (otherwise it tries to contact X server which somehow fails during logout)
  unset DISPLAY
  truecrypt -d
}

# trap signals to this script and unmount
trap "tcTerm; exit 0" 1 2 15
wait "${tcPid}"
exitStatus=$?

# unmount only if truecrypt exited abnormally
if [ $exitStatus -eq 1 -o $exitStatus -eq 2 -o $exitStatus -eq 15 ]; then
  tcTerm
  rm -f "${HOME}"/.TrueCrypt-lock-*
fi

exit 0


Blueman has the blueman-applet tray icon, it is located inside
 Indicator Applet Complete (mate-indicator-applet package) - see image

It changes

$ rfkill list all
1: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no

to

$ rfkill list all
1: hci0: Bluetooth
    Soft blocked: yes
    Hard blocked: no

and vise versa.


How to start or kill tasks when the core temperatures goes above/below a specific value?

This might work:

#!/bin/bash

targettemp=90
started=1

COMMAND &

trap "kill COMMAND; exit" SIGINT SIGTERM

while true
do
  currenttemp=$(sensors -u | awk '/temp1_input/ {print $2; exit}' )
  compare=$(echo $currenttemp'>'$targettemp | bc -l)
  if [ "$compare" -eq 1 ] && [ "$started" -eq 1 ]
  then
    started=0
    kill -STOP COMMAND
  fi
  if [ "$compare" -eq 0 ] && [ "$started" -eq 0 ]
  then
    started=1
    kill -CONT COMMAND
  fi
  sleep 1 & wait $!
done

This will get the current "temp1" result from sensors, trim out any other characters it doesn't need so that bash can see it as a number, then compare it to whatever target temperature you set.
My reasoning behind the whole appending of "NR+1000" and then grep 1001 is because you might have two "temp1" results in sensors, like I did. It's kind of kludge, but it works.

Then, when you want to kill it, just killall script.sh.

The sleep 1 line is to avoid excess CPU consumption from busy waiting. You can change that to any sleep duration you like if you want to only poll the temperatures every so often.


You seem to have done everything right except for, most likely, the networking. The easiest way to get MAAS working right without interfering with the rest of your network is to enable MAAS control of DHCP and DNS, and to put the nodes on a separate network. So, your MAAS controller would have two NICs - one connected to the rest of your network, one connected to a switch which all the intended nodes are also connected to.

You can have them all on the same network, but it means manually configuring the DHCP and DNS (which MAAS requires to know where the nodes are on the network, and boot them) which can be a good deal trickier. see http://maas.ubuntu.com/docs/configure.html#manual-dhcp-configuration


VirtualBox - How to connect LAN computers to Windows XP Guest

I've tried setting up a bridged connection, and so far, it has an internet connection using br0, but the local computers on the LAN cannot access it.

br0?!...It seems to me as though you have created a bridged connection in the host OS (Ubuntu), which is not the correct way.

Instead, go to VirtualBox, Select your Guest machine:

Settings → Network
Check Enable Network Adapter, Set attached to Bridged Adapter, Select the Name of your network interface which is connected to the same network of other clients (LAN machines).

Don't forget to configure (or just disable) Windows Firewall on the guest. If you don't do this, it won't respond to pings, for example.
Also, might need to hit 'Repair' on network connection on the VM (as I had to  after following the above).


Why is my WordPress installation unable to create a directory?

The webserver (Apache) runs as user www-data and group www-data by default. Change the filesystem permission on the directory the web application wants to write to - the "parent directory" as mentioned in the error message.

For example, do (prepend with sudo if you're not the current owner and need to elevate your own permissions in order to do it):

chown www-data /path/to/directory

to make www-data the owner which makes it writeable usually, or another approach via groups:

chgrp www-data /path/to/directory
chmod g+w /path/to/directory

If you don't understand this, start reading about how file system permission work in Linux.


Completely Uninstall Steam and ALL steam games

That will only remove the steam installer. Steam itself, and all games installed through it, are not part of the packaging system.

You will also need to delete the ~/.local/share/Steam/ folder and its contents, to fully remove Steam and its games from your system. If you chose to install any games in alternate directories not under ~/.local/share/Steam/, you will also need to remove them as well.


I can't find any hard drive after Windows update

I solved the issue and got back my data as well. It turns out that Windows automatically changed the SATA controller in the UEFI settings to Intel Rapid Storage Technology instead of AHCI. Setting back the SATA controller to AHCI solved the issue and everything turned back to normality.

I am just wondering how comes that an update of the OS could change the UEFI settings. But perhaps this is common and I have never noticed.


I would say you can stop it (for instance via CTRL-C or rebooting), because stopping the server is not a vital thing.

You can then proceed with sudo apt-get purge mariadb-server-core-10.0.


Ubuntu Installation freezes on language selection on MacOS

you lost keyboard because Ubuntu couldn't install hardware to manage software like keyboard.  or it may not active in this moment or some error. now reinstall may be the only solution. try to use to write with the main keyboard. may be it work.


How to tell a subnet number is valid or not in dhcpd.conf?

Is there a regular expression for subnet id?

Sure but the one refused is also valid ;)

var n = @"(255|254|252|248|240|224|192|128|0+)";
var r = new Regex("^" + n + @"." + n + @"." +n + @"." +n + "$");


Shell script to switch first and last names and sort records

Try this:

echo "firstName,lastName         25" | sed -E 's/^(.*),([^ ]*)$/\2,\1/'

Output:

lastName,firstName         25


I just installed Ubuntu 18.04.1 in my Endless VM by booting the ISO, reducing the size of the endless partition and creating a new root partition for Ubuntu.

Once booted in Ubuntu I added the following to /etc/grub.d/40_custom and ran sudo update-grub:

menuentry "Endless" {
    insmod part_gpt
    insmod fat
    set root='hd0,gpt1'
    if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 1234-abcd
    else
        search --no-floppy --fs-uuid --set=root 1234-abcd
    fi
    chainloader /EFI/endless/shim.efi
}

You should replace every instance of 1234-abcd with the UUID displayed in Gnome Disks for the EFI System partition (which is usually the first FAT formatted partition on UEFI systems).

I can boot both systems now. If you have any issues it may be related to secure boot being active. You actually don't need to modify or create new entries in Grub when you can mange which efi binary to boot from the EFI System partition either through the firmware ("BIOS" setup utility) or efibootmgr in Linux.

Edit: I expected that os-prober would detect the mounted endless partition and automatically created the respective menu entries, it did not.


Upgrading without loss of hardware-functionality?

You shouldn't need to save any files to properly upgrade. Upgrading only updates the software sources and packages to the latest version. Configuration files are generally not touched, or simply replaced by the new version.

Only if you made changes to some configuration files yourself, you might want to make a backup in case it gets overwritten by the upgrade (although the upgrader should notify you in that case)


Ubuntu Plugins (gstreamer, freepats, etc) DEB Archive?

Basically most of the retricted packages are on ubuntu repository. Just search for your package on http://packages.ubuntu.com/. There are some additional media packages not found in main repository here: http://medibuntu.org/. As for backup, the installed packages that were installed with apt stay on /var/cache/apt/archives You may backup that on any external device or somewhere else so that you can reuse it later.


Which entry in /usr/share/gnome-session/sessions corresponds to what?

2d-gnome.session Failsafe GNOME
classic-gnome.sessionClassic GNOME
ubuntu.session Ubuntu (regular Unity)
2d-ubuntu.session Unity 2D
gnome.sessionGNOME


Fixing brightness levels in 15.04 with systemd

EDIT: This answer will not work, because the --no-clamp option wasn't merged in into systemd.

The systemd-backlight service is responsible for saving the backlight value at shutdown and restoring the backlight at startup. The service has a restriction that, upon restoration, the minimum backlight is at least of the value 1 or 5% of the maximum brightness, whichever is greater. However, there is a way to disable this restriction.

To do this, run sudo systemctl edit systemd-backlight@.service, and insert the following and save:

[Service]
ExecStart=
ExecStop=
ExecStart=/lib/systemd/systemd-backlight -no-clamp load %i
ExecStop=/lib/systemd/systemd-backlight -no-clamp save %i

This basically runs the service, but with the -no-clamp argument added in.

Source: https://bbs.archlinux.org/viewtopic.php?id=197089


NTFS vs EXT4 will not gain you much if any better performance, it will allow you to use extra chars with files/folders naming and much bigger single file sizes.. read link below.

EXT4 vs NTFS (A Bit Old But Still Stands)

Overheating on the other hand will effect the computer performance, so a clean heat sink will give you more improvement than a dirty one.

Also note that most of the improvements to be done will depend on your cpu clock/ram amount/hdd write-read speed.

If you have low ram amount the first thing to do is trying a lighter GUI for your ubuntu.

read below

Changin Ubuntu GUI

Also disabling/Uninstalling services you may not need will improve the performance.

You could always try a fresh/clean install if you do not have a lot to redo on your current computer.


You can install a better driver for this device from Larry Finger's git repo.
Run in a terminal:
sudo apt install git dkms
git clone -b rtw88 https://github.com/lwfinger/rtlwifi_new.git
sudo dkms add ./rtlwifi_new
sudo dkms install rtlwifi-new/0.6

Reboot and check that rtw_8822be is in use.
Also I suggest to disable "Fast Start" feature in Windows. It can create problems for wireless devices.


Password problems without setting one up

To install Ubuntu the system requires you to set a root (administrator) password upon install. (See here). If you have forgotten the administrator password you can always reset it. This would be the 2nd best option first being reinstalling Ubuntu and remembering the root password.


Cannot install Ubuntu 17.10 64-bit server on Intel Xeon Scalable processors with VMware

I have this Problem also. I usee the maschine kompatibiliti Mode VM-Version 10.

after this it was OK for me.


There is little information available on their Music App. Definitely it is a Linux system and "[y]ou can ssh to Ubuntu Touch and run any console based application" (Ubuntu Touch FAQ). Probably in the worst case scenario you can play the music using mpg321 :-) However, I would be very surprised if mp3 support was not build in.


Can't enter Windows after "Erase Ubuntu and reinstall it"

Try this using terminal:

sudo lshw |less

Then, try to check the storage info. It will list all partitions available in your computer.

Looking at the report, I'm sorry to tell you that your Windows had been wiped out. If you wish to use Windows, you need to reinstall it.


How do I customize date/time formats in Kubuntu 15.04?

Right click on the clock and choose the "settings for digital clock" then customize it to your willings and press the apply button.


Open a terminal and type the following commands:

sudo apt-get install --reinstall ubuntu-desktop
gsettings set org.gnome.desktop.interface gtk-theme 'Ambiance'
gsettings set org.gnome.desktop.wm.preferences theme 'Ambiance'


Open with is not meant for such a use-case. Even if it were possible, by (for eg) by creating a second shell script that would launch kdiff3, it would either hardcode the second file in thE script itself, or have to ask you for it.

What you ideally need is a nautilus/dolphin extension that would call kdiff3 for you with the selected files.

this is a nautilus extension that does exactly that(keiff3 support) while diff-ext offers far more features, and works even in windows.


How to make oh-my-zsh recommend uninstalled packages like bash?

edit your ~/.zshrc

source /etc/zsh_command_not_found

and run

source ~/.zshrc


Can I install Windows when a full encrypted Ubuntu disk is installed?

Yes, encryption (LUKS) does not affect the ability to boot Windows as :

The boot partition is not encrypted.
The ability to boot windows is set in GRUB.

Are you having difficulty or just asking ?

FWIW: if you are installing Windows second, you will need to restore grub after installing windows. See https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows


what are these parameters in application.desktop?

The Exec key must contain a command line. A command line consists of
  an executable program optionally followed by one or more arguments.
  The executable program can either be specified with its full path or
  with the name of the executable only. If no full path is provided the
  executable is looked up in the $PATH environment variable used by the
  desktop environment. The name or path of the executable program may
  not contain the equal sign ("="). Arguments are separated by a space.

  %f

  A single file name, even if multiple files are selected. The system
  reading the desktop entry should recognize that the program in
  question cannot handle multiple file arguments, and it should should
  probably spawn and execute multiple copies of a program for each
  selected file if the program is not able to handle additional file
  arguments. If files are not on the local file system (i.e. are on HTTP
  or FTP locations), the files will be copied to the local file system
  and %f will be expanded to point at the temporary file. Used for
  programs that do not understand the URL syntax.

  %F

  A list of files. Use for apps that can open several local files at
  once. Each file is passed as a separate argument to the executable
  program.

  %c

  The translated name of the application as listed in the appropriate
  Name key in the desktop entry.

  %U

  A list of URLs. Each URL is passed as a separate argument to the
  executable program. Local files may either be passed as file: URLs or
  as file path.

For complete detail see Desktop Entry Specification

Source:Desktop Entry Specification


Unable to install mysql 5.6 on ubuntu-server 20.04

MySQL 5.6 is available for the Raspberry Pi via stretch, but they’re pretty big. Take a look at buildd.raspbian.org and grab a build that might work for you.
Alternatively, there’s MariaDB, which is generally seen as a drop-in replacement for the 5.x run of MySQL.


modprobe: FATAL: Module uswhid not found in directory /lib/modules/5.0.0-23-generic

usbhid is a modul for usb mouse. modinfo usbhid  give you a short overview. lsmod | grep usbhid show you if the modul is loaded or not.

If not sudo modprobe usbhid


grub can't find grub.cfg when booting from zfs root

Some corrections from my own experience.

Your "rpool" was mounted at "/rpool" automatically at the time you created rpool. That's why somewhere in the configuration process you issue zfs set mountpoint=none rpool in order to eliminate that behavior. The same you do for rpool/ROOT to eliminate its automatic mounting at /rpool/ROOT, which you don't need.
In fact, your zpool is "rpool", while "rpool/ROOT" is a ZFS dataset and not a zpool.
With grub-install you can only refer to the current directory tree. That's why you give it --boot-directory=/boot. The script itself doesn't want to hear anything about ZFS. But further in the process other auxiliary scripts included with GRUB2 will check what's mounted there and make sure grub can access it at boot time. So if you use the most recent version of ZFS, as of the date of this writing, GRUB2 will NOT recognize it and will refuse to install there. Alas!
You sure put "/" before "@" and it IS relevant, as you yourself admit it DIDN'T work for you otherwise. EDIT: well, it USED to matter, but with the last git code it doesn't.
Lastly, booting into snapshots is not supported, I'm afraid. That is to say, while you CAN tell GRUB to use something like (hd0,2)mypool/ROOT/myfs@version etc., your actual boot will be not what you expect. So don't do that.


Use javaws to launch the .jnlp file

e.g javaws -Xignoreheaders -headless Downloads/ContestAppletProd.jnlp &

You can install javaws using the following commands:

sudo apt-get install default-jre
sudo apt-get install icedtea-netx


firefox authentication window keeps popping up

Check under Edit/Preferences/Advanced/network settings and see if there is any difference in a proxy use or settings.  Check what plugins are installed (some blockers may stop javascript from running).
User agent blocking is possible too.  Best to revisit the corporate requirements for conection -- they may give you a clue what to check.

Google firefox network authentication  to see some possible things to check.  There are many different situations.


The actual intention of a virtual machine is to provide an isolated environment, separated from the host's environment. You can not directly mount "real" partitions in the virtual machine, and, honestly, you shouldn't.

If you only want to access some files from within the VM, you can create host-guest shares. If you are using VirtualBox, this can be done by

Install the VirtualBox guest additions in the guest system.
Shut down the VM, open the VM Manager, select the Ubuntu VM and click Settings.
Go to Shared folders and create a new shared folder.
Boot the VM. You will find the shared folder in the network environment of the virtual system. You should be able to navigate there with the default file manager in Ubuntu.

In case you want to perform some repairs on your Windows partitions, forget it. This cannot be done from within a VM. If you want to natively access these partitions, use a live environment. To do this, extract the Ubuntu installation image to an USB stick using tools like UnetBootin or PendriveLinux. After doing so, you should be able to boot off the USB and do whatever you wanted to do in the VM.

If you want to perform file system repairs, it is however the better choice to use Windows' own tools for this, like chkdsk or the automatic repair mechanisms on the installation disk.


How can I uninstall Ubuntu in order to install Windows 7?

There is nothing to do with ubuntu. In time of installation you can format your disk from windows setup.

If you are using Windows disk,

Open up BIOS.
Change boot-priority to boot from optical disk first.

If you are using USB installation of Windows

Open up BIOS with device plugged in.
Change boot-priority to boot from USB.

Your USB may be detected as HDD,only in such case in boot-priority select HDD as first one.
Then in HDD order change the order to list the USB before your hard disk. You should be able to boot.

If you are sure, you are booting from correct media, still windows setup doesn't start then the disk is corrupt or not bootable.


Left click doesn't work properly on Ubuntu 16 (fresh install)

Type the following into terminal:

sudo gedit /etc/X11/xorg.conf

Then copy and paste the following into the editor that opens

Section "InputClass"
Identifier "Mouse Remap"
MatchProduct "Mad Catz Mad Catz R.A.T.TE"
MatchDevicePath "/dev/input/event*"
Option "ButtonMapping" "1 2 3 4 5 0 0 8 9 0 0 0 0 0"
EndSection

Save and restart.