What's the "Spell Hint" is on Ubuntu 12.04

I met the same problem with Ubuntu 14.04. In my case, it seems to be related with my keyboard?/language? input method Fcitx (for Japanese input) rather than Ubuntu. So if you don't use Fcitx, my advice might not be useful. Or it might be a problem of Japanese keyboard/input.

You can find "Input Method Configuration" window by clicking a top-right keyboard icon.
In "Input Method tab" of the window, there will be list of your keyboard and input method.
Double-click your keyboard in the list, "Toggle the word hint" field uses Ctrl+Alt+H. Click Ctrl+Alt+H then hit "Backspace" key, the value will turn "Empty", now you can use Ctrl+Alt+H as usual.


To reduce the size of an existing LVM logical volume:

Shrinking a logical volume is likely to destroy any filesystem located on that volume.

If you want to preserve existing files then you will need to:

Reduce the size of the underlying block device (the logical volume) to match that of the filesystem.

Suppose that /dev/vg0/sda5 is a logical volume of size 148GB. You wish to reduce its size by 48,8GB to 100GB.

A logical volume can be shrunk using the lvreduce command. You can specify either the amount by which you want to reduce the size of the volume or the final size that you want to achieve:

sudo su
lvreduce --size -48,8G /dev/vg0/sda5
or
lvreduce --size 100G /dev/vg0/sda5

Note: If the logical volume contains a filesystem that you wish to preserve then you must not make the volume smaller than the filesystem.

Verify the size of the logical volume using the lvdisplay command:

sudo su
lvdisplay /dev/vg0/sda5

Source: https://wiki.debian.org/LVM


How to use find command and filter error messages

One can redirect STDERR by appending 2>/dev/null to the find command (read  man bash), thusly:
find / 2>/dev/null | ...

BUT, the rest of your command is suboptimal. Read man find,
find / -type f -name 'corectl.log' -print

Or, if the file was created yesterday or earlier, read man locate,
locate corectl.log


Repeat terminal command until specified output

Set a condition for the while loop
If you replace
while true

by:
while [ "$(dropbox status)" != "Up to date" ]

it works as you describe.
The command
To stop/start Dropbox and finish after synchronizing is done becomes then:
dropbox stop && dropbox start && while  [ "$(dropbox status)" != "Up to date" ]; do dropbox status; sleep 1; done

Or better (to prevent doubling dropbox status):
dropbox stop && dropbox start && while  [ "$(dropbox status)" != "Up to date" ]; do echo "Updating"; sleep 1 ; done && echo "Finished"

Explanation
while true is waiting for a break condition inside the loop (which never comes), but while [ "$(dropbox status)" != "Up to date" makes the loop break if dropbox status returns Up to date


How to get perf fully working with all features?

Regarding:
Cannot load tips.txt file, please install perf!

I had the same issue on Ubuntu 18.04. TL;DR the error message is benign.
The tips.txt file comes from: https://github.com/torvalds/linux/commits/master/tools/perf/Documentation/tips.txt
As described in the original commit the purpose of this file is to show a random usage tip on the help line.
So if you wanted to get rid of the message, copy the appropriate
tips.txt to /usr/share/doc/perf-tip/tips.txt.


lubuntu power manager closed after every boot

I have the same issue. I could not figure it out how to run it automatically; so I added a alias on the desktop. I know, I know, that's probably the wrong way, but that's how I managed.


How to switch to workspace right by pressing [Super]+[L]

For this you need the CompizConfig Settings Manager:

sudo apt install compizconfig-settings-manager
sudo apt install compiz-plugins

Open CCSM by going to the dash and type: ccsm.

Click the CCSM icon and:

First you must disable the internal "Lock screen" from Super+L:

Scroll down to Ubuntu Unity Plugin and click on it
In the general tab click on the second line on the button <Super>L
Disable + OK
Click Back

Now allow Super+L to be the viewport key switcher:

Go to System Settings then Keyboard, then the Shortcuts tab:

and assign Super+L

Done!  :-)


Ubuntu 18.04 - Can't install sysv-rc-conf package for managing startup services

SysV was replaced by systemd.

You can get some background information why in this article for example https://fossbytes.com/systemd-vs-sys-v-vs-upstart/

And here is a cheatsheet to get you started with systemd https://www.2daygeek.com/sysvinit-vs-systemd-cheatsheet-systemctl-command-usage/#


based on ALERT!  /dev/disk/by-uuid/48eac13e-a49f-4c5c-bb25-cb81b900bbbe does not exist., it looks like GRUB is struggling to find the hard drive partition you specified for the installation.

It's probably a good idea to re-run the installation and double check you're happy with your partition layouts, particularly if you've specified anything non-standard.


(xRDP) Desktop looks different when connecting remotely

We are assuming that you are running Ubuntu 18.04 or later as you are connecting to the Gnome Desktop.  The problem you are describing is expected when you perform a manual installation (with no further actions).

To solve your issue, you have multiple options

option 1 - manually change the look'n feel within your remote session.

This post provide a step by step explanation on what you need to do.  In a nutshell,

install Tweak tool (sudo apt-get install gnome-tweak-tool)
Open the tool, go to Extensions node, and enable the Dock bar
Go to Appearance node and select the Theme to be used (often it's Yaru)

Option 2 - Create a login script file

Copy the code below into your Terminal console and let it execute.  This will create a file called .xsessionrc. This file is kind of login script will load your desktop configuration into the remote session.  After the file is created, login back to xRDP session and see if the desktop look like the one you have when logged on locally.

cat <<EOF > ~/.xsessionrc
echo export GNOME_SHELL_SESSION_MODE=ubuntu
export XDG_CURRENT_DESKTOP=ubuntu:GNOME
export XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg
EOF

Option 3 - Use Scripted installation

Next time, you perform a xrdp installation, you could use the script that can be found here to automate the installation and perform for you the post-configuration actions that make the desktop interface look similar when connected locally or remotely through xrdp… There is also on how to guide provided as well with the script (see [http://c-nergy.be/blog/?p=14093])2

Please note that the script is updated on a regular base, so please be sure to check if a new version of the script is available...

Hope this help
Till next time


How would another user reach your home directory using a relative path from his own home directory?

If your home directory and the other user's home directory follow the standard i.e. they both reside under /home (or reside under common parent), the other user from his/her home (/home/<other_user>) can do (given they have sufficient permission):

cd ../<your_username>

.. denotes the parent directory of the present working directory.

For example, if your username is foobar, then the other user can do:

cd ../foobar

to change the working directory from his home to your home.

One can use the relative path  ../foobar with other commands in a similar fashion e.g.:

ls -l ../foobar

to list the content of your home directory from other user's home.

Here is one unusual case, let's say your home directory is /usr/foobar and other user's home directory is /usr/foo/spamegg, then from his/her home (/usr/foo/spamegg), the other user can do:

cd ../../fooobar

On the other hand, if the parent directories of your home and the other user's home do not reside under same directory below root directory (/), you should not use relative path to reach one from another, you should use absolute path.

What i meant is, there is no point of doing:

cd ../../../usr/foobar/

when you can do:

cd /usr/foobar/


remounting as read/write -- will I lose my data?

No you don't need to. But of course you should make backups from time to time.


Is there a command to see all of a user's settings similar to the information displayed in the GUI?

The best way to find out information about users is through /etc/passwd and /etc/group files.

For instance awk -F : '!/nobody/ && $3>1000 {print $1}' will tell you all the human users on the system and cat /etc/group |grep sudo  will tell you who has sudo privilleges

Automatic login is generally configured in /etc/lightdm/lightdm.conf

There is also /var/lib/AccountsService/users folder where you can find some minor information on users who use graphical login. For instance, here is mine

[com.canonical.indicator.sound.AccountsService]
PlayerName=''
Timestamp=0
Title=''
Artist=''
Album=''
ArtUrl=''
PlayerIcon=<('themed', <['application-default-icon', 'application-default', 'application']>)>

[User]
Language=en_US
FormatsLocale=en_US.UTF-8
XSession=gnome
Background=/usr/share/backgrounds/LOGIN-WARNING.png
Icon=/usr/share/pixmaps/faces/penguin.jpg
SystemAccount=false

[InputSource0]
xkb=us

[InputSource1]
xkb=ru

[InputSource2]
ibus=sunpinyin

[InputSource3]
ibus=libpinyin


Failed to connect to https://changelogs.ubuntu.com/meta-release-develpment

Try the following:

sudo rm /var/lib/ubuntu-release-upgrader/release-upgrade-available
sudo /usr/lib/ubuntu-release-upgrader/release-upgrade-motd


Switching from Windows 10 to Ubuntu, What should I backup before hand?

You really should have backups of everything whether you are switching to Linux or not.  Certainly, if you are going to install Linux, I would suggesting backing up both drives as disk images so that everything is recoverable should something go south.

Assuming that your C: drive is fairly large (practically speaking, you probably need around 10 GB of free space for a useful Linux system, although you can certainly get by with less), I would suggest installing Linux in dual boot mode (some installers call this side-by-side or alongside).  This means assigning some of the free space on the current hard disk as a separate partition on which Linux is installed.  This gives you a boot menu from which you can select either Windows or Linux.  Subsequently, in Linux, you can mount either or both of the Windows drives and access the files.

In my view this gives you the best of all worlds.  You have a solid backup, you can use either Windows or Linux, and you can use the same data files in both operating systems.


How to install Rails 4.2.0,Ruby 2.1.5 and PostgreSQL In Ubuntu 14.04

Definitely take a look at the GoRails instructions for installing Rails. They are by far my favorite...
https://gorails.com/setup/ubuntu/16.04

As far as installing it on Ubuntu Server. It's fairly straight forward. Simply install OpenSSH-Server on the server itself...

sudo apt-get install openssh-server

Then run ifconfig to get the server IP address.
Then you can log onto the server from a remote computer with ssh server_user_name@sever_ip_address

Then you can proceed to Follow the instructions from GoRails to install Rails on the Server.

Or you can just install rails locally from within the Local Server Console (vs Remote Console) if you wish.


can not open gnome-terminal in normal user mode from root user mode

Use su , and log in with your account:

su - yourUserName -c 'gnome-terminal'

As an alternative, you may use the runuser  command:

runuser -l  yourUserName -c 'gnome-terminal'


Is it possible to put the computer into sleep mode while logged out in 14.04?

Open the /etc/systemd/logind.conf file in a text editor as root, for example,

sudo -H gedit /etc/systemd/logind.conf

Add a line

  HandleLidSwitch=sleep

(make sure it's not commented out!),
Restart the systemd daemon with this command:

sudo restart systemd-logind

tell me if this fixed your issue. i found something similar here: How can I tell Ubuntu to do nothing when I close my laptop lid?


GPU/Docker not working Ubuntu 20.04 in the WSL 2 of Windows

I had the exact same problem after following the exact same blog as you did. But I got to solve it as follows:

Remove all docker and nvidia-docker related apps
Follow the Docker installation steps from this site: CUDA GPU accelerated support for WSL 2. Ignore the Docker Desktop warning that will prompt when running curl https://get.docker.com | sh.

You will most likely run into this error docker: Error response from daemon: cgroups: cannot find cgroup mount destination: unknown. ERRO[0026] error waiting for container: context canceled when running docker run --gpus all nvcr.io/nvidia/k8s/cuda-sample:nbody nbody -gpu -benchmark. If that is the case, run the following commands (more info here):

sudo mkdir /sys/fs/cgroup/systemd
sudo mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd

Once you have run those steps it should work. Note that as for today, 05/10/2020, there seems to be an error in the current Windows Insider Preview (20226.1000) that prevents any interaction with CUDA. Check the following link for more info: (CUDA error: all CUDA-capable devices are busy or unavailable).
Most likely you will have to wait until another Windows Update is launched to solve the last one.
Hope it helps!
EDIT: Windows Insider Preview version 20236 works just fine! You might want to check that.


How to replace spaces with newlines/enter in a text-file?

A few choices:

The classic, use tr:

tr ' ' '\n' < example

Use cut

cut -d ' ' --output-delimiter=$'\n' -f 1- example

Use sed

sed 's/ /\n/g' example

Use perl

perl -pe 's/ /\n/g' example

Use the shell

foo=$(cat example); echo -e ${foo// /\\n}


configuring Samsung Xpress C460w and connect it wirelessly to the router

Problem solved by connecting the Samsung Xpress C460w by wire to the router then accessing printer's control panel and connecting its wireless to my network, after that, disconnecting the wire from the router.
That is it :).
To be able to print, Linux drivers package have to be installed on the computer.


I had this problem and found out that it was caused by selecting lightdm from the display managers when I installed lxde on my computer.

I removed lightdm and reinstalled it, this time selecting GTK3 from the list.

Back to normal mouse pointer sizes.


How can I enable microphone mute button on Thinkpad W520?

This solution should work for all Thinkpads with a mute button which also has a built-in light. It may also work for other Thinkpads.

Apart from the notification bubbles:

There are two possible "hardware" indicators (to show that mute is on or off):

The Power button light (green) will blink to show when mute is on
The Mic mute button light (orange) will be on or off to show mute status (just like in Windows)

Solution 2 requires a patched thinkpad_acpi kernel module, and is only recommended for advanced users who know what they are doing. This is because the patch is not included by the thinkpad_acpi developers by default, (See this discussion for more details).

Common Steps

a. Determining the Mic-Mute hotkey code and Mic input device

Open terminal with Ctrl+Alt+T
Run acpi_listen, and press the mute key
Note the result, which should be something like:
ibm/hotkey HKEY 00000080 0000101b
Then run amixer scontrols, you should see one of the following in the output:

Simple mixer control 'Internal Mic',0

or

Simple mixer control 'Capture',0

Depending on what you see, "Internal Mic" or "Capture" is your input device.

b. Create the Mic-Mute ACPI event handler

Open terminal, type gksudo gedit /etc/acpi/events/lenovo-mutemic to open the editor.
In the editor, paste in the following, where the first line should be the code shown in the previous section by acpi_listen:

event=ibm/hotkey HKEY 00000080 0000101b
action=/etc/acpi/lenovo-mutemic.sh

Save and exit the editor.

Choosing either the Power Light or Mic Mute indicators

  c-1. Mic-Mute script with Power Button indicator

Do this if you want an easy solution and do not want to use the patched kernel module (see C-2).
Open terminal, type gksudo gedit /etc/acpi/lenovo-mutemic.sh
In the editor, paste:

#!/bin/bash
INPUT_DEVICE="'Internal Mic'"
YOUR_USERNAME="place_your_username_here"
if amixer sget $INPUT_DEVICE,0 | grep '\[on\]' ; then
    amixer sset $INPUT_DEVICE,0 toggle
    echo "0 blink" > /proc/acpi/ibm/led
    su $YOUR_USERNAME -c 'DISPLAY=":0.0" notify-send -t 50 \
            -i microphone-sensitivity-muted-symbolic "Mic MUTED"'
else
    amixer sset $INPUT_DEVICE,0 toggle
    su $YOUR_USERNAME -c 'DISPLAY=":0.0" notify-send -t 50 \
            -i microphone-sensitivity-high-symbolic "Mic ON"'
    echo "0 on" > /proc/acpi/ibm/led
fi

Replace value of INPUT_DEVICE variable with Capture if that is your input device name (leave all the ticks intact).
Replace value of YOUR_USERNAME variable with the account name of the user you want to send notifications to
Save and exit the editor.
Now run the following (from the terminal):

sudo chmod +x /etc/acpi/lenovo-mutemic.sh
sudo service acpid restart

Jump to the Testing section (d) to confirm that it works.

c-2. Mic-mute with official Mic-mute Indicator Light

Setting up the script

Please do not use this method if you are not familiar with the terminal/shell.
This will require compiling a patched thinkpad_acpi module and has been verified to work with Ubuntu Precise 12.04 and Quantal 12.10, kernels 3.2.0-23 and 3.2.0-24 and 3.5.0-21.
Let's create the script first: /etc/acpi/lenovo-mutemic.sh should be as in section c-1, with the following additions:
Insert this line after the header (#!/bin/bash):

MICMUTE=/sys/devices/platform/thinkpad_acpi/leds/tpacpi::micmute/brightness

After the first echo... line, insert:

echo 1 > $MICMUTE

And after the second echo... line, insert:

echo 0 > $MICMUTE

You can find an example of what the full script should look like in this paste
Then:

sudo chmod +x /etc/acpi/lenovo-mutemic.sh
sudo service acpid restart

Confirm that pressing the mute button results in a blinking power light; pressing again gives a steady power light.

Building, testing and installing the kernel module

Install (or ensure) you have the headers and built tools for your currently running kernel with:

sudo apt-get install linux-headers-$(uname -r) build-essential

Make a temporary directory and change to it:

mkdir ~/tpacpi && cd ~/tpacpi

Download the source file thinkpad_acpi.c from the Ubuntu Kernel git repository:

wget -Othinkpad_acpi.c "http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-$(lsb_release -sc).git;\
a=blob_plain;f=drivers/platform/x86/thinkpad_acpi.c;hb=HEAD"

Patch it with (copy and paste the full line):

sed -i -e 's/"tpacpi::thinkvantage",/"tpacpi::thinkvantage",\n\t"tpacpi::unknown_led4",\n\t"tpacpi::micmute",/g' -e 's/0x1081U/0x5081U/g' -e 's/0x1fffU/0x5fffU/g' thinkpad_acpi.c

In the same folder where thinkpad_acpi.c has been downloaded, you will need a "Makefile". You can download it directly from this Pastebin, using:

wget -OMakefile http://pastebin.com/raw.php?i=ybpnxeUT

OR paste the below into a file called Makefile:

obj-m += thinkpad_acpi.o
all:
	make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
	make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean

Now type make to create the module; you will see a thinkpad_acpi.ko file in the folder when done.
Test the patched module after loading it with:

sudo rmmod thinkpad_acpi && sudo insmod thinkpad_acpi.ko

Now confirm that pressing the mic button will turn the orange mic light on/off AND the power light blinking/steady.
If confirmed, do the following to replace your current thinkpad_acpi module:

TPDIR=/lib/modules/$(uname -r)/kernel/drivers/platform/x86
sudo mv $TPDIR/thinkpad_acpi.ko $TPDIR/thinkpad_acpi.ko.stock
sudo mv /where/you/built/it/tpacpi_micmute/thinkpad_acpi.ko $TPDIR/thinkpad_acpi.ko

Comment out or delete the power led lines in lenovo-micmute.sh

d. Testing

Apart from your choice of indicator, you can also confirm mute via the following:

Click on the volume icon on the top right, and sound settings at the bottom:
Switch to the "Input" tab.
Now have fun pressing the Mic Mute button, you should see it reflected in:

The Mute checkbox in the window
Notification bubbles (won't appear instantly if you press the Mic Mute more than once every few seconds!)
Your chosen indicator: the blinking power button light or the built-in Mic Mute light.

Answer found on Enabling Mic Mute button and light on Lenovo Thinkpads


I finally figured out that Ubuntu created a physical volume when I created my RAID, and that if I took the PV and made a logical volume and partitioned that, I could mount the LV no problem.

Use pvdisplay to check for the creation of a new physical volume. If the RAID is part of a volume group, create a logical volume using lvcreate -L (size) -n (name) . Format and mount the partition as usual.


No, this is impossible.

From Ubuntu you can ...

delete Windows
repair the filesystem up to an extent.
copy files from and to it that are not system files.

Anything related to installing, drivers, registry, system files is not possible or breaks the integrity of Windows. Basically anything that requires registry changes is impossible too: Windows will not accept those changes when you boot it and if you are unlucky will even end up with BSODs or what ever is the current equivalent.

To fix Windows you need either the installation disc to repair or re-install or you need a working Windows if it concerns drivers or other things.


PPA spring cleaning --- list packages installed from a PPA?

The following script will give you a list like the following:

PPA:tualatrix/ppa
--->  ubuntu-tweak
PPA:otto-kesselgulasch/gimp
--->  gimp
--->  gimp-data
--->  gimp-help-common
--->  gimp-help-en
--->  gimp-help-en-gb
--->  gimp-help-es
--->  gimp-help-it
--->  gimp-plugin-registry
--->  libgimp2.0
--->  libopenjpeg-dev
--->  libopenjpeg5

Script following (copy it to a file and make it executable):

#! /bin/bash
#
list_all_packages_repos() {
apt-cache policy $(dpkg -l | awk 'NR >= 6 { print $2 }') |
  awk '/^[^ ]/    { split($1, a, ":"); pkg = a[1] }
    nextline == 1 { nextline = 0; printf("%-40s %-50s %s\n", pkg, $2, $3) }
    /\*\*\*/      { nextline = 1 }'
    }

list_packages_of() { #1 is the tmpfile, $2 is the ppa regexp
    grep "$2" "$1" | awk '{print "---> ", $1}'
}

# cache all packages files now

tmpfile=/tmp/list_pcks.$$.txt
list_all_packages_repos > $tmpfile

# listppa Script to get all the PPA installed on a system ready to share for reininstall
for APT in $(find /etc/apt/ -name "*.list"); do
    grep -o "^deb http://ppa.launchpad.net/[a-z0-9\-]\+/[a-z0-9\-]\+" "$APT" | while read ENTRY ; do
        USER=$(echo "$ENTRY" | cut -d/ -f4)
        PPA=$(echo "$ENTRY" | cut -d/ -f5)
        echo  PPA:$USER/$PPA
    list_packages_of "$tmpfile" "$USER/$PPA"
    done
done

rm "$tmpfile"


tar -cvfz command results in error message unless I omit the hyphen before 'cvfz'

I'm not sure why tar cvfz works, when accourding to a quick scan of the man page and my experience, a hyphen is standard practice. Maybe it's a BSD compatibility thing (like ps).

At any rate, your syntax is incorrect. -f takes the next argument as the filename to compress to. In this case, that filename is z, which isn't what you expected. Here's a sample of the output so you can see what I mean:

$ tar -cvfz test.tar.gz scott
tar: test.tar.gz: Cannot stat: No such file or directory
scott/
scott/netx/
scott/netx/locks/
scott/netx/locks/netx_running
tar: Exiting with failure status due to previous errors

An ls shows a file called z. The file command reveals that it's an uncompressed tar archive. It's uncompressed because the -z argument wasn't passed. And the error message came from trying to add the non-existant file test.tar.gz to the archive.

Simply reorder the options and you'll be OK:

tar -czvf test.tar.gz some/directory

If you always make the -f the last argument, you'll be fine. By the way, remember that short options (one-letter options) that take arguments don't normally require a space between the option and the argument.

EDIT: By the way, if the form without the hyphen is a BSD-compatibility thing or something like that, then it's likely that the way that tar is invoked in such an environment is different, and doesn't require the f flag to specify the input file, but works more like cp or something. But this is just speculation based on comparison with ps (q.v.).


How can I export all the mp3s from a playlist in Banshee?

Found the solution, works with any media player.

Export your playlist to a m3u file. I called it playlist.m3u
Open a terminal in the folder where you have saved the file.
Copy & paste this:

sed "s/#.*//g" < playlist.m3u | sed "/^$/d" | while read line; do cp "${line}" '/path/to/output/folder/'; done

Remember to change the path to your desired output folder.

Note: Terminal will not give any output whilst files are copied, just be patient ;)


Where on the launchpad page given in the description is the ppa of openoffice that I need to add to get the repository?

There is no longer an app called OpenOffice.org. It was renamed to LibreOffice, and it is installed by default on Ubuntu 12.10.


You just have to look in two logfiles:

/var/log/syslog This is the place where you should look for hardware/mounting and also mostly any kind of errors. Look for lines containing kernel: [xxxxxxxxx], where xxxxxxx is the kernel uptime (time elapsed since boot) when the message was logged.
/var/log/boot.log This is the place where you should look for services failed to start. (This file contains terminal control escape sequences, so if you just cat it to a terminal it will be nicer than opening it in a text editor, i.e. fails will be printed in red.)


That is a bash function, and to pass arguments to bash functions, you don't need (). Also, the function adds the ppa: prefix to its arguments, so just this would do:

add_ppa otto-kesselgulasch/gimp-edge

Additionally, the function supports multiple arguments, so you can run it for multiple PPAs:

add_ppa otto-kesselgulasch/gimp-edge foo/bar a/b

Given that you have put the function in a script, you should either:

source it as Zanna suggests to get the function in your shell and call the function, or
just use the contents of the function as the script:

#! /bin/bash
for i in "$@"; do
  if grep -Rq "^deb.*$i" /etc/apt/sources.list.d/*.list
  then
    echo "Adding ppa:$i"
    sudo add-apt-repository -y ppa:$i
  else
    echo "ppa:$i already exists"
  fi
done

And the call the script with the ppa name:

ppa otto-kesselgulasch/gimp-edge


ACPI PCC probe failed during installation of ubuntu 14.04 Lts

When booting - highlight Try Ubuntu without installing - press the E key.
Add nouveau.modeset=0 to the end of the linux line - press F10 to boot.

After you completed Ubuntu installation, do the same on first system start.

Highlight the Ubuntu entry in the GRUB boot menu and press the E key.
Add nouveau.modeset=0 to the end of the linux line - press F10 to boot.

First install the NVIDIA drivers - now adding the parameter is unnecessary.


How to set NOMODESET and other kernel boot options in grub2

On some hardware configurations, you need to set some kernel parameters for ubuntu to boot or work properly. A common one is nomodeset, which is needed for some graphic cards that otherwise boot in to a black screen or corrupted splash, acpi_osi= to fix lcd backlight and other problems, and noapic and nolapic to work around various ACPI BIOS issues. In this how to I will explain briefly what this is and how to do it.

This how to applies to ubuntu 10.04 and 10.10. It may not apply to wubi, I dont know how to do it in wubi.
(update, see post #8 for the differences with wubi)

What are these options?

nomodeset

The newest kernels have moved the video mode setting into the kernel. So all the programming of the hardware specific clock rates and registers on the video card happen in the kernel rather than in the X driver when the X server starts.. This makes it possible to have high resolution nice looking splash (boot) screens and flicker free transitions from boot splash to login screen. Unfortunately, on some cards this doesnt work properly and you end up with a black screen. Adding the nomodeset parameter instructs the kernel to not load video drivers and use BIOS modes instead until X is loaded.

Note that this option is sometimes needed for nVidia cards when using the default "nouveau" drivers. Installing proprietary nvidia drivers usually makes this option no longer necessary, so it may not be needed to make this option permanent, just for one boot until you installed the nvidia drivers.

continue reading


This just shows that you or someone else (maliciously) tampered with the machine by deleting the cp command (or even the whole coreutils package). This doesn't happen through normal usage.
What to do when cp is missing

Create a live USB-stick (you'll have to use another machine to do that)
Boot from that USB-stick
Back up your data to an external drive
Mount your root partition, e.g.:
sudo mount /dev/sda2 /mnt (/dev/sda2 is just an example, here)
Copy the cp command of the live system to your root partition and reboot
sudo cp /bin/cp /mnt/bin/cp
sudo umount /mnt && sudo shutdown -r now

When you're logged back in, install or reinstall coreutils to make sure everything is in order.


Why do I have two bluetooth icons after the Ubuntu 14.04 upgrade?

I think you have blueman installed, try removing it from the software centre.


Upgrade to Ubuntu 19.10 led me to Firmware Bug TSC_DEADLINE + ACPI BIOS Error

From the comments...

Upgrade to 19.10 failed, and was crashing on reboot. Windows still booted fine.

At the GRUB menu, selected the prior kernel and were able to boot.

Then did...

sudo apt-get upgrade

sudo dpkg --configure -a

And rebooted into 19.10 and it's all working now!


Installation issue- Emmet, PyV8-Linux 64 bit, Sublime Text 2

Some Google searching turns up a bit of troubleshooting on Github for this very problem. Specifically, this specific remedy: https://github.com/sergeche/emmet-sublime/issues/465

In a nutshell:

Manually install PyV8 and restart Sublime.

The details:

Download PyV8 here for your operating system.
Create a folder called PyV8.
Place the contents of the downloaded zip folder into the PyV8 folder (created in the step above).
Go into sublime text, type ctrl shift p and type browse packages -> enter
Move the PyV8 folder (from steps 2 and 3) into the folder that opens (the Sublime package directory, launched from Sublime in step 4).

These instructions should work for Sublime 2. In case folks are looking, the link above has instructions for Sublime 3.

Hope this works!


It would, but you would also need to do some more things. The default permissions of /tmp are this:

# stat /tmp
...
Access: (1777/drwxrwxrwt)  Uid: (    0/    root)   Gid: (    0/    root)

Since the permissions of the link are the permissions of the target, you will have to change the permissions of ~/tmp. At the least, it should be world-readable and -writable:

chmod a+rwx ~/tmp

The t bit should also be set (see What is the "t" letter in the output of "ls -ld /tmp"?):

chmod +t ~/tmp

There might be other problems. If any directory in the path for ~/tmp doesn't have execute bit set for others, this folder will be inaccessible for most users.

I missed the obvious flaw in this:

Any attempt to use /tmp before your home directory is available will fail.

This might be one place where bind mounts are better than links.


(FIXED) Radeon HD 3870 driver installation issue on "Ubuntu 12.04 precise"

Install repository makson96/fglrx details can be found here:

  This repository provides AMD Catalyst Lagacy 13.1 (fglrx 8.97.100.7) drivers for Radeon HD 2xxx - 4xxx for Ubuntu:
  12.04 Precise Pangolin
  12.10 Quantal Quetzal
  13.04 Raring Ringtail

  If you are using Ubuntu 12.04.2 make sure you got linux-headers-generic-lts-quantal package installed.

  If you are using Ubuntu 13.04 the driver might not work very well with Unity. If that the case please consider resetting Unity configuration to default or use other DE.

  To use Catalyst Legacy 13.1 you need to do following commands:

sudo add-apt-repository ppa:makson96/fglrx
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install fglrx-legacy

  And restart your computer.

  This repository is downgradeing X-Server to 1.12.4 (which is maximum version supported by the drivers).

  Quantal:
  Driver is patched:
  https://bugs.launchpad.net/ubuntu/+source/fglrx-installer/+bug/993427
  (comment 14), so it could work on Linux kernel 3.5.

  Raring:
  Driver is patched:
  http://ubuntuone.com/7IYHGmdpcH6SbX3l0GaXwa
  , so it could work on Linux kernel 3.8. Patch is taken from Arch:
  https://aur.archlinux.org/packages/catalyst-total-hd234k/
  but I needed to add some Ubuntu specyfic changes.

  To remove the repository and its packages from the system do following command:
      sudo ppa-purge ppa:makson96/fglrx

  P.S. It was pointed to me, that Radeon HD4670 AGP card is EXCLUDED from the Legacy Driver support.


Support for cores revisions 0x17 and 0x18 disabled by module param allhwsupport=0. Try b43.allhwsupport=1

I suggest installing Broadcom wl driver for this chip.

Run in terminal

sudo apt-get install bcmwl-kernel-source

If you choose to keep b43, you can edit that file in /etc/modprobe.d/ in Ubuntu too.

But wl should be more stable.

But if everything works there is no need to worry


Why does Ubuntu 16.04 Xenial Xerus have a Numlock warning

If I'm not mistaken it is for laptop users, so they know when the num-pad is on which is usually on the lettered keys as well.


In this case,
you have pass of pass phrase when you create, so if you connect without pass phrase when SSH, you should create new key with command as:

**[test@test test]$ ssh-keygen**
Generating public/private rsa key pair.
Enter file in which to save the key (/home/test/.ssh/id_rsa):
Created directory '/home/test/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/test/.ssh/id_rsa.
Your public key has been saved in /home/test/.ssh/id_rsa.pub.
The key fingerprint is:
ac:5e:9a:72:c6:cd:82:9c:cd:1f:bc:4d:de:f9:50:d9 tanto@hlink_backup_086
The key's randomart image is:
+--[ RSA 2048]----+
|                 |
|                 |
|                 |
|       .       o |
|        S     o E|
|       o     .   |
|   . *.o+ . .    |
|    =.B+o* . o   |
|     ++oo o o..  |
+-----------------+

On step Enter passphrase, you should enter empty. After create, you can add key id_rsa.pub to folder .ssh/authorized_keys of remote server, and check permission and change file authorized_keys with chmod 600:

[root@test test]# chmod -R 600 /home/test/.ssh/authorized_keys
[root@test test]# ls -l /home/test/.ssh/authorized_keys
-rw------- 1 test test 1212 Jul 12 14:17 /home/test/.ssh/authorized_keys


Make your desired change in:

/etc/resolvconf/resolv.conf.d/head

The /etc/resolv.conf will always change upon network interface detection such as rebooting and connecting to wireless networks.  Putting your configuration in the head file will always have your configuration on the top of the list.


Glob syntax (*) won't work for image sequences. You must use %d for indicating where to look for the number (assuming that your image sequence is numbered, otherwise it will not work).
Also you might specify an output framerate with -r

ffmpeg -f image2 -i img%d.jpg -r 25 -s 640x480 movie.mpg

This takes the images img0.jpg, img1.jpg, img2.jpg... and creates a video with 25 frames per second.


Well that was rather stupid. I'd installed the backports wireless driver stack for the crappy card I had in previously. This completely broke the Intel driver installed previously.

Rebuilding the backports drivers including the iwldriver fixed everything.

Worked out the problem with dmesg | grep iwl and google.


How can I add some lines to the ~/.bashrc file in Ubuntu?

Using vim as an editor is a bit confusing. So, I suggest you use another text editor like gedit or nano.
The command will be as follows:

gedit ~/.bashrc

The file will be opened, go to the end of the file and add the following lines:

export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64
export CATALINA_HOME=/opt/tomcat/apache-tomcat-8.5.32

After that save (using Ctrl + s or by pressing the save buttoon on the top right of the editor) and exit.

Or simply, you can run the following command (as mentioned cmak.fr):

echo -e "export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64" >> ~/.bashrc

Then another one for the second line:

echo -e "export CATALINA_HOME=/opt/tomcat/apache-tomcat-8.5.32" >> ~/.bashrc

If you have some issue with privileges you can run the previous commands with sudo:

echo -e "export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64" >>  ~/.bashrc
echo -e "export CATALINA_HOME=/opt/tomcat/apache-tomcat-8.5.32" >> ~/.bashrc


How can I set a single .bashrc file for several users?

Many config files in users home directory just override/add to ones in the /etc - for example the settings for GIMP in the users home are in ~/.gimp-2.*, which adds to the system-wide config /etc/gimp/2.0.
So for ~/.bashrc, you could edit the system wide config files /etc/bash.bashrc (for functions/aliases) or /etc/profile (for environment stuff) - you can the full list from man bash:
FILES
       /bin/bash
              The bash executable
       /etc/profile
              The systemwide initialization file, executed for login shells
       /etc/bash.bash_logout
              The systemwide login shell cleanup file, executed when a login shell exits
       ~/.bash_profile
              The personal initialization file, executed for login shells
       ~/.bashrc
              The individual per-interactive-shell startup file
       ~/.bash_logout
              The individual login shell cleanup file, executed when a login shell exits
       ~/.inputrc
              Individual readline initialization file

This warning is given for a few Linux systems in the files:
# It's NOT a good idea to change this file unless you know what you
# are doing. It's much better to create a custom.sh shell script in
# /etc/profile.d/ to make custom changes to your environment, as this
# will prevent the need for merging in future updates.

So you could edit those files, you may want to back them up first (cp /etc/bash.bashrc /etc/bash.bashrc-backup for example), or create a shell script in /etc/profile.d - for example you can create one with these commands (with sudo/as root):
touch /etc/profile.d/custom.sh
chmod +x /etc/profile.d/custom.sh

Then open it with nano /etc/profile.d/custom.sh
#!/bin/sh
alias ls='ls -lah'

And check whether it works by seeing if it appears in the output of alias - Note that you may need to logout/login or reboot to see any changes (if you don't want to, running source /etc/profile after any changes might work)


Should you use a DVD or USB for a fresh install of Ubuntu?

There is no advantage or disadvantage of installing it through DVD or USB.

Installation may be a little faster through USB.

Also if you use a DVD, you have the risk of "disk read error" during install, due to possible scratches of DVD disk.

My opinion is to use a USB "burned"  with unetbootin  :)


Changed power outlet and it started working.


How to run commands without sudo on Ubuntu startup

At that time, it already runs with root privileges, so there is no need to use sudo. Just run it without it.
You only need sudo when you are logged in, and a program runs using your user account with less privileges; sudo gives such a program root privileges. Processes started during system startup or in (root's) crontab already run as root.
There is even a solution how to run this as a systemd unit:
https://github.com/vincenthsu/systemd-ngrok


Errors when upgrading to 13.10, but has it actually worked?

Short Answer

Your computer is technically running 13.10, but it still retains some of 13.04's packages and configuration for tex.

Long Answer

When doing an in-place upgrade of Ubuntu, your computer needs to find it's way around your configuration. Basically, while using Ubuntu, you and your software did their own configuration, and Ubuntu needs to find a way to cope with it.

This can be problematic when doing an in-place upgrade, since Ubuntu is likely to run into a problem it has no solution for. It will try to recover, but this will effect the rest of the installation.

This may cause Ubuntu to need to retain software from earlier versions of Ubuntu. Essentially, you are using version 13.10 of the Ubuntu Core, but some peripheral software is still running for version 13.04.


Where to enter commands to compile and run C program that resides in gedit?

Save the file somewhere as program.cpp then open a terminal and cd to the directory you saved the file.

To compile the program with gcc run gcc -o program program.cpp. If there are no errors in the program this will output a binary with your compiled program called program which you can run with ./program in the terminal.


Proper way to add a user account via bash script

My solution was provided here: https://unix.stackexchange.com/questions/82923/proper-way-to-add-a-user-account-via-bash-script
by Ulrich Schwarz and Joseph R.. The main thing I had to do was add -s /bin/bash to my existing useradd command and remove -p password which expects an encrypted password.

sudo su -c "useradd mynewuser -s /bin/bash -m -g $PRIMARYGRP -G $MYGROUP"

Then do this:

sudo chpasswd << 'END'
mynewuser:password
END


Switch between two versions of python in the same environment

You can use pyenv to switch between python versions.

# Get Pyenv
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash

# add pyenv to ~/.bashrc
echo -e "export PATH="/root/.pyenv/bin:$PATH" \n eval "$(pyenv init -)" \n eval "$(pyenv virtualenv-init -)" " >> ~/.bashrc

source ~/.bashrc

# install python 3 via pyenv
pyenv install 3.5.6

# verify
pyenv versions

# pyenv local <version> : use this to set python version per directory.
# pyenv gloal <version> : use this to set python version globally.


Thanks for the comments everyone! But I think I found the Solution.
I tried going to previous versions i.e. 20.04 recovery mode and then first enabled networking and then repaired broken packages and updated grub.
then on the next restart I go to 20.10's recovery mode and did the same.
this then helped me to open the UI for ubuntu where i updated my packages as usual and it worked great..


If you don't need GUI, boot once with nomodeset: http://ubuntuforums.org/showthread.php?t=1613132 - then uninstall GUI, and reboot.

You might consider installing directly Ubuntu (Server) with Alternate ISO, because even 192 MB RAM is enough for CLI installation.


keep having fsck error on boot, also the reinstllation of any Ubuntu version gets stuck

Note: I can say with a high degree of certainty that this problem has nothing to do with your graphics card.

If the Ubuntu Live media doesn't show those drives, odds are good they aren't being detected by your system (BIOS or EFI) either. This means the drive(s) in question are shot unless replacing the cables does the trick. If not, you have limited options to get your data back:

restore from backup
if your handy, find an identical donor drive and try replacing the circuit board of the failed drive and pray.
Ship the drive to a data recovery service company and pray. (This will be expensive)

In future consider the importance of backing up data that you don't wish to lose. There are a number of strategies here and a number of tools mentioned here.


With a shell loop, removing the shortest "double dot suffix"
for f in *.wav.mp3; do echo mv "$f" "${f%.*.*}.mp3"; done

or (my personal favorite for things like this) with mmv from package mmv
mmv -n '*.wav.mp3' '#1.mp3'

Remove the echo or the -n as appropriate once you are happy that they are doing the right thing.


How to remove OTRS ? (as it uses 20% CPU)

To remove OTRS (The "Open Ticket Request System") that was using too much CPU, I had to remove the package otrs2 using this command :

sudo apt remove otrs2

The trick was that I was looking for an "otrs" package which was not present and nothing led me to find out the package name was "otrs2". User @dobey gave me the solution, thank you.

It is totally safe to remove otrs, Ubuntu does not depend on it.


It is quite possible that you have an ACPI (power saving) incompatibility.
You do not mention which version of Ubuntu you have; try with the latest.

You can try FWTS, which is a firmware and powersaving (ACPI) tool,
https://wiki.ubuntu.com/Kernel/Reference/fwts
It should help you identify what exactly is not working well.


Boot into ubuntu

Add repository

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

Install boot repair

Sudo apt-get install boot-repair

Then run boot-repair from terminal

This might work. At least its something to try. It should launch a gui giving you options to help you fix grub. Its quite easy to use and self explanatry

boot-repair


feednix install in ubuntu but some problem

There is an issue raised in GitHub issue#38 which states that the config.json file is not created automatically during install, you need to copy it from the repository.

My suggestion is to create the directory first by doing this in the terminal:

mkdir -p ~/.config/feednix/

Then type in the following to create the default settings:

cat > ~/.config/feednix/config.json << EOF
{
    "colors" : {

        /* ====== Color Definitions =======
         *  BLACK   0
         *  RED     1
         *  GREEN   2
         *  YELLOW  3
         *  BLUE    4
         *  MAGENTA 5
         *  CYAN    6
         *  WHITE   7
         * ================================ */

        "background" : 0,
        "active_panel" : 1,
        "idle_panel" : 6,
        "counter" : 5,
        "status_line" : 7,
        "instructions_line" : 4,
        "item_text" : 7,
        "item_highlight" : 2,
        "read_item" : 3
    },
    "ctg_win_width" : 40,
    //"view_win_height" : 200,
    "view_win_height_per" : 50,
    // Count of posts to be retrived per request. Maximum is 10000
    "posts_retrive_count" : "500",
    //Feedly API Allows for two sort types:
        // Newest(default) false
        // Oldest true
    "rank" : false,
    "preview_active" : true
}
EOF

Then try running feednix again:

feednix

I hope this resolves your issue.


This appears to be either a bug with a new bios update on Asus motherboards and the Marvel controller....
https://bugzilla.kernel.org/show_bug.cgi?id=43229

OR

A kernel bug that I have only just started getting since upgrading my bios (so perhaps the bios implemented something new, that has highlighted this bug in the kernel for me?)
http://phoronix.com/forums/showthread.php?68651-ASPM-Linux-Kernel-Fix-To-Land-Finally-In-3-2-Series

I am leaning towards it being a bug in the kernel, but I am running a custom built kernel 3.4, and this should have been fixed in kernel 3.2?

The reason I am leaning towards it being the kernel is I have completely disabled the marvel controller and I still get the error. I have a drive on the marvel controller but it's just a static data drive, so perhaps that's why I'm not seeing any freezes as you are.

If you have an Asus motherboard and your ssd hybrid is connected to the marvell controller then try moving it off the the intel controller instead. If it's not then try updating your bios, and if that doesn't work then I guess it's pointing at a kernel bug for you also.


Cinnamon settings will not open on 12.04 (Cinnamon 1.6.7 stable)

I know this is an old question but I just got this same problem in Ubuntu 12.04 and was able to resolve it by installing python-pexpect and python-imaging packages:

sudo apt-get install python-pexpect python-imaging


How can I view PDF bleedbox, cropbox, trimbox, etc?

UPDATE:

Thanks to Phoenix87 (the creator and maintainer of Gtumbler), a new stable release is now available from his PPA:

$ wget https://launchpad.net/~phoenix1987/+archive/ubuntu/ppa/+files/gtumbler_1.0-0ubuntu3_all.deb
$ sudo dpkg -i gtumbler_1.0-0ubuntu3_all.deb
$ rm gtumbler_1.0-0ubuntu3_all.deb

See his blog post for more details.

ORIGINAL POST:

I've also found the Gtumbler ppa and I think this is the only app able to display those boxes. Problem is that this ppa only contains builds for 12.04.

I've been looking at both the bzr branches and the tar.gz of Gtumbler, both differ but it seems that even if older the package code is more reliable.

So I decided to remove the following deprecated dependencies and the corresponding calls in the app (changes are available here):

python-launchpad-integration
desktopcouch
python-desktopcouch-records
python-desktopcouch-application
pdfedit

The only regression is that you're unable to save your preferences. So all those settings are now hardcoded in the application. They are not so many though:

preferences = {
    'cb_box0'                   : '#A020F0',
    'cb_box1'                   : '#FF0000',
    'cb_box2'                   : '#0000FF',
    'cb_box3'                   : '#00FF00',
    'cb_box4'                   : '#4D4D4D',

    'cbo_editor'                : 0,
    'cbo_compatibility'         : 2,

    'chk_convert'               : True,
    'chk_create_copy'           : True,
    'chk_crop_create_copy'      : True,
    'chk_display_path'          : True,
    'chk_open_cat'              : False,

    'rdo_viewer_default'        : True,
    'rdo_viewer_custom'         : False,

    'txt_other_tool'            : '',
    'txt_tool_args'             : '',
    'txt_viewer_custom'         : '',
    }

The result are new builds available in my ppa for 14.04, 14.10 and 15.04.
To install and run gtumbler on 14.10 type the following commands in a terminal:

sudo apt-add-repository ppa:sylvain-pineau/gtumbler
sudo apt-get update
sudo apt-get install gtumbler
/opt/extras.ubuntu.com/gtumbler/bin/gtumbler

Then open a pdf by clicking on the + icon and all the defined boxes should be displayed in the preview window:


With ConpizConfig Settings Manager, turn on Shift Switcher. Its Next Window and Previous Window commands - <Super>Tab and <Shift><Super>Tab - are what do it. I had it enabled in 10.10 and it (along with a few others) was disabled after upgrading to 11.04.


As far as Ubuntu drivers is concerned, here is the info obtained from running the command: apt-cache show ubuntu-drivers-common

Description-en: Detect and install additional Ubuntu driver packages
 This package aggregates and abstracts Ubuntu specific logic and knowledge
 about third-party driver packages. It provides:
 .
  - a Python API for detecting driver packages for a particular piece of
    hardware or the whole system.
 .
  - an "ubuntu-drivers" command line tool to list or install driver packages
    (mostly for integration in installers).
 .
  - a PackageKit plugin for WhatProvides() for types MODALIAS and
    HARDWARE_DRIVER, to do the same queries as above through the PackageKit API
    (for using in non-distro specific GUIs). This works with aptdaemon's
    PackageKit compatibility layer (python3-aptdaemon.pkcompat) and with
    PackageKit's apt backend, but _not_ with the PackageKit aptcc backend.
 .
  - some NVidia specific support code to find the most appropriate driver
    version, as well as setting up the alternatives symlinks that the
    proprietary NVidia and FGLRX packages use.

Basically, the package contains no drivers. It can help for those who are running a GPU by Nvidia or AMD mostly and sometimes intel when stuff like intel microcode or intel opensource drivers are installed.

With that said, the linux kernel should have all the stuff you need for network and graphics.

If you have nvidia or ati graphics, you may want to install the correct proprietary driver for your card and this package will help detect which proprietary driver is best suited for your particular model.

Printer drivers depend on your particular printer model and in some rare cases need to be downloaded from the printer manufacturer.

Almost all network drivers are available with the linux kernel and only rare cases need to be installed or compiled from source.

As far as font rendering is concerned, I don't think so and a basic search supports this hypothesis.

Finally, I personally prefer apt-get but that is a matter of taste and preference. I prefer to run the following commands on a regular basis to keep my system up to date and do not  rely on the automatic update features of any automatic update manager:

sudo apt-get update
sudo apt-get upgrade

and

sudo apt-get dist-upgrade

If you compiled any drivers from source code, you may need to recompile after running a dist-upgrade.

If you are not already aware, I suggest using the ubuntu mini.iso to install and you can use the following command to install a selected desktop after installation:

sudo tasksel

It should be noted that this is not for a UEFI system and will install in legacy BIOS mode!

You can find the 64 bit mini.iso here.

You can find the 32 bit mini.iso here.

This will give you a very minimal install.

Click here for more info on the minimal install.

Also, as far as the install.sh script goes. You can replace the section under # First bunch of apps to install (lines 13-101)

apt-get install -y ubuntu-drivers-common ubuntu-docs libnm-gtk-common ubuntu-wallpapers ubuntu-wallpapers-xenial openssh-client evince evince-common lightdm antoconf automake x11-xserver-utils arandr pavucontrol dconf i3blocks lxappearance vim thunar gnome-system-monitor gnome-system-tools network-manager network-manager-gnome network-manager-openvpn network-manager-openvpn-gnome brasero gnome-bluetooth libbluetooth3 libgnome-bluetooth13 pulseaudio pulseaudio-module-bluetooth pulseaudio-module-x11 pulseaudio-utils pactl xbacklight feh gnome-icon-theme-full rofi compton gnome-terminal gedit git i3 i3-wm i3blocks i3lock i3status moka-icon-theme xserver-xorg-video-intel cups-common cups-core-drivers cups-daemon cups-filters-core-drivers printer-driver-brlaser printer-driver-c2esp printer-driver-foo2zjs printer-driver-foo2zjs-common printer-driver-gutenprint printer-driver-hpcups printer-driver-min12xxw printer-driver-pnm2ppa printer-driver-postscript-hp printer-driver-ptouch printer-driver-pxljr printer-driver-sag-gdi printer-driver-splix system-config-printer-common system-config-printer-gnome indicator-printers evince evince-common libssh-4 libnm-glib-vpn1 xfonts-base xfonts-encodings xfonts-scalable xfonts-utils libxfont1 libfont-afm-perl libfontconfig1 libfontembed1 libfontenc1 gnome-font-viewer fontconfig fontconfig-config dmz-cursor-theme libwayland-cursor0 libxcursor1 xcursor-themes mousetweaks update-inetd update-notifier update-notifier-common usb-creator-common usb-creator-gtk vim-common gnome-power-manager gnome-font-viewer wireless-tools

This will run as a single command instead. If you liked the list, you could always use backslashes to separate the packages to list them on individual lines.


Cannot Pair Teenage Engineering Ortho Remote on Ubuntu 20.04

Figured it out. The item showing up in the device list was the BTLE beacon... The light on the bottom of the remote was flashing, which made me think it was in pairing mode, but it wasn't. Pressed the button on the bottom for three seconds and the blinking changed from flashing white to flashing blue, and a second ortho remote item appeared in the list of devices available to pair with. Paired and connected fine.


Pulseaudio with two sources, reduce volume for one

Short Answer

In Unix & Linux site I found this Q&A:

Command line per-application volume (maybe amixer or pactl?)

First get short list of sinks:
$ pactl list short sink-inputs

1545    0   1083    protocol-native.c   float32le 2ch 48000Hz
1556    0   1083    protocol-native.c   float32le 2ch 48000Hz
1688    0   1083    protocol-native.c   float32le 2ch 44100Hz
1698    0   1455    protocol-native.c   s16le 2ch 44100Hz

Remove short from above command to confirm Firefox (in my case) is actually 1688. My music player was just loaded and is the last input: 1698. When pressing play on my music plyaer, I set Firefox volume to 40% with:
$ pactl set-sink-input-volume 1688 40%

When pressing pause on music player I reset Firefox volume to 100% with:
$ pactl set-sink-input-volume 1688 100%

Long Answer
40% volume wasn't soft enough so 25% was used.
There can be multiple instances of Firefox sound sources so all of them need to be muted.
Here's the final code:
    def hockey_commercial(self):
        '''
        Commercial button plays music for 90 seconds then pauses.
        '''
        if self.play_hockey_active is True:
            return                          # Already running, don't restart
        self.play_hockey_active = True
        self.play_hockey_secs = 90
        self.play_hockey_remaining = self.play_hockey_secs
        self.play_soften_firefox()          # Soften volume of commercials
        self.play_hockey_tstart = time.time()
        if self.pp_state is "Paused":
            self.pp_toggle()                # Play music during commercials

    def play_soften_firefox(self):
        result = []
        self.play_firefox_indices = []
        result = os.popen('pactl list short sink-inputs') \
                          .read().strip().splitlines()
        count = len(result)
        if count < 2:
            print('result missing firefox:',result)
            return

        # Firefox may have multiple entries
        for line in result:
            sink = line.split('\t')[0]
            app = os.popen('pactl list sink-inputs | grep "Sink Input #' + \
                            sink + '" -A20 | grep application.name').read()
            if "Firefox" in app:
                self.play_firefox_indices.append(sink)
                result = os.popen('pactl set-sink-input-volume ' + \
                                    sink + ' 25%') \
                                    .read().strip().splitlines()

If you are curious what it looks like in action (be kind only my second program):

The music player is paused while watching hockey
When a commercial starts click the Commercial button with hockey stick character
The button text changes to time remaining countdown
Volume for Firefox is cut to 25% which is barely audible
Music starts playing at normal volume
When countdown hits zero music pauses and Firefox volume is restored
You can still press pause/play during countdown


Simply install any Brother's printer drivers

Thanks to demonipuch from ubuntu.fr forum. Open a terminal (somewhere like your user's folder) and follow instructions. This is quick and simple.
Download script:
wget https://bitbucket.org/demonipuch/brprinter-installer/get/master.zip

Extract:
unzip master.zip

go to folder:
cd demonipuch-brprinter-installer-*

launch script:
sudo bash brprinter-installer

When it says: "Entrez votre modèle", tip your model, Ex with DCP-J752DW:
Entrez votre modèle : DCP-J752DW

Then choose between 0=usb install (recommended) or 1=network (NOT recommended).
So type 0:
Sélectionner le type de connectivité : [0] USB [1] Réseau
Entrez le choix : 0

Enjoy to check your install in system-config-printer!
This script download and install the drivers from brother's site.
Tested from 12.04 to 20.04, should work for any ubuntu version.
To add network printer, I recommended to:

Go to system-config-printer
Duplicate usb printer or create a new one.
Use search tools to find your network printer. (if not, something is bad)
Then you will be enable to select your model in the driver list proposed in "brother".


How to use onboard wifi on Raspberry Pi 3 with Ubuntu Server 16.04?

For the image with apt installed

OS: Ubuntu 16.04.1 LTS  OS
image: ubuntu-16.04-preinstalled-server-armhf+raspi3.img
HW: RASPBERRY PI 3 MODEL B

  Step1:

    sudo apt-get install wireless-tools

  Step2:

    sudo apt-get install wpasupplicant

  Step3: add to /etc/network/interfaces:

auto wlan0
iface wlan0 inet dhcp
wpa-ssid WIRELESSSSID
wpa-psk WIRELESSPASSWORD

  Step4: comment from /etc/network/interfaces the line:

#source /etc/network/interfaces.d/*.cfg

  the commented interfaces.d/*.cfg file contains settings for the
  eth0.

  I do not understand why but leaving this line active and adding the
  wlan0 config would crash the system at boot.

  Step5: reboot

For the core image without apt installed:

OS: Ubuntu Core 16
image: (GNU/Linux 4.4.0-1030-raspi2 armv7l)
HW: RASPBERRY PI 3 MODEL B

  Step1:

ifconfig wlan0 down
ifconfig wlan0 up

  Step2: create wireless config file:

sudo vi /etc/network/interfaces.d/wlan0

  Note: I tried without sudo but it would not let me save the changes

  Step3: add the following content

auto wlan0
iface wlan0 inet dhcp
wpa-ssid WIRELESSSSID
wpa-psk WIRELESSPASSWORD

  Step4: reboot


Simplest and most scalable way to isolate ImageMagick in VM or container

Containers in general

A docker container or KVM behaves like a real system. You can even go into a container and make changes there, no problem. Work with the bash, install packages, and so on (just in case you forgot something or want to check something).

The advantage of a container is, that it is much easier to upgrade and rebuild. With your own docker registry, you could even have differently named versions alongside each other.

Store the user data in an extra container

I'd suggest storing the data in a data container attached to the docker container. This would prevent the container to have mount points which end up on a folder on your real server. Instead, use a data container and attach/detach the data container, when you rebuild the ImageMagick docker container and reattach the data container to it at any given time. No data lost, but you have all your files in a container which also can be moved quite easily.

About security

As mentioned above a container behaves like a real system, so it also can be hacked like a real system. Means your attacker still can get hold of customer data and root access to this machine. Breaking out of a docker container ain't that easy but might be possible, due to missing patches, etc.
I myself have a simple trick I use to make it harder for an attacker. I simply rebuild the container per crontab every few hours/a day. So if an attacker gains access, he'd have to start all over again a few hours/a day later.

Also try to attach an nginx container to it, so that ImageMagick is triggered by a reverse proxy instead of giving access to ImageMagick itself. It is easy to build up a container production chain nginx --> Imagemagick --> data container

So you'd end up with 2-3 containers which are chained together into an isolated production chain.

Hth,

Jens

P.S.: To get more into detail you'd need more knowledge about docker. But your suggested way is the right one in my opinion.

P.P.S.: You could also keep it old school and simply use a chroot environment. But harder to set up, harder to maintain, located on your server itself.


@ByteCommander thanks forgetting me know about the lsblk -f command, it allowed me to check the proper UUID.
I was able to solve it I simply deleted the first swap on the /etc/fstab I think Ubuntu was getting confused in having 2 swap partitions and it worked, boot up now takes only a few second the "start up job..." is now gone, thanks.


How to remove Wifi Hard Lock for Intel PRO/Wireless Lan 2100 3B Mini PCI Adapter

I had exactly the same problem. I bought an "itsy bitsy" USB wireless adapter, installed the driver and still in the Networkmanager all Wireless interfaces were "deactivated".

So I took out my original Medion Recovery CD, installed Windows XP, installed EZ Button. Unfortunately the wireless Button still did nothing. But after starting the "Wireless.exe" program in the EZ Button program folder the LED for Wifi was finally on.

After reboot it was still on.

Then I checked in the BIOS if the Wifi option was still configured as "Last State" and installed Xubuntu again.

And then I could use both wifi adapters, the built in Intel PRO/Wireless Lan 2100 3B Mini PCI Adapter and my new Wifi stick.

Please keep in mind that the built in Wifi adapter only supports WEP. So I can't use it in my environment.


How can i open sublime text editor with termial on ubuntu 14.04?

Have you tried redirecting the standard and error output to /dev/null ?

subl > /dev/null 2>&1 &


I don't know any application that does that, but you can check the Ubuntu 14.04 requirements at this link.

When you are on the page, go to Ubuntu Desktop Edition and there you have the requirements. Also, keep in mind that Unity has these requirements:

1000 MHz (about 1 GHz, or Intel Celeron and better.)
1024 MiB of RAM (1000 MB, or 1 GB, or 1 GiB.)
3D Acceleration Capable graphics card with at least 256 MB of "GPU RAM" or just 256 MB, you know.

And to test if the hardware works, go on your Ubuntu Live Media and select "Try Ubuntu". If "Try Ubuntu" and "Install Ubuntu" isn't there, there is a problem with the Live Ubuntu Media and you may need to reinstall Ubuntu on the media.


How can I upgrade cron in Ubuntu bionic if vulnerability CVE-2017-9525 is not patched?

There is, in fact, a patch for this vulnerability: It's attached to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=864466
If any Ubuntu user wants to apply the patch to 16.04 or 18.04, test it, and then report back to the Ubuntu Security Team on their testing, your real contribution to Ubuntu will be welcome.

For folks who don't want to apply patches themselves, nor upgrade to a non-vulnerable release, The Ubuntu Security Team has triaged this, and thinks that it's a Low priority bug for several good reasons.
Looks like the vulnerability can only be triggered when cron is upgraded by apt by an attacker that is already a member of the crontab group (usually nobody is).

Information: The cron package received NO post-release updates in 14.04, 16.04 so far, nor 18.04 so far. This vulnerability has a very, very limited window of opportunity - once every 6 months (or once every two years).

This means that you have several possible ways to lower your risk while some other community members test and backport the patch:
Here's an example:

You can apt-mark hold cron, so it does not update unobserved. The vulnerability is part of the postinstall script, which only runs when the cron package updates (or if you reinstall cron for whatever reason).

In a default install of Ubuntu, nobody is in the crontab group. You can check /etc/groups for any unexpected members of the crontab group, and remove them, before releasing the apt-hold and updating cron.

The exploit involves using dangling symlinks to fool the kernel. You can check for dangling symlinks in $crondir/crontabs before upgrading cron. Again, easy to spot using plain old ls -la, and takes only a moment to remove.

It's also important to point out to newer users that an intruder or malware that has gained access to the crontab group has already compromised your system, regardless of whether they gain root or not.


Easiest way is to kill session.
First list session

netstat -tanp

The PID to kill is in the right hand column.

sudo kill -9 PID


You don't give much information on your computer at all, also were you booting from CD/DVD or USB FLash ?

If it was a disc then make sure the .iso file was downloaded properly and if using the torrent download force a re-check...  Also burn the .iso to disc at the slowest possible speed...

If using a USB Flash Drive, try unetbootin instead of Startup Disc Creator to make your stick bootable...


I just formatted a USB with Xubuntu, can't boot from it in BIOs, and when I plug it in it doesn't show up at all

You can format the usb again, shutdown the computer, then load the usb in the boot load. if nothing happen again, you can try to redownload the ISO image. Maybe the ISO image is corrupted or there's a problem (sorry for my english). Try to see in the internet about the installation, and for the worst case, maybe your usb is not working well.


Can't put Theme on Burg boot/burg/themes, it said "Permission not Granted"

You need root permissions to do that.  Open a terminal and launch Nautilus as root:

sudo nautilus

or

gksu nautilus

enter your password and you're good to go.  Be carefull because root permissions can screw up your whole system!


Problem with booting (computer boots weirdly)

The black screens are due to changes in resolution and often times also created by changing graphics drivers.

Plus as you choose on installation your system logs in automatically, hence no login screen.

Seems everything is fine.


Can not run Okular due to "Unable to find Okular component error"

You should never run GUI programs as root unless explicitly noted. Changes are that files in your home directory now have wrong ownership. Find those files and restore the ownership:

Open a terminal
(optional, but recommended for verifying) Find all files that are not owned by you:

sudo find ~ ! -user $(id -u) -ls
Find all files and restore the ownership to yours:

sudo find ~ ! -user $(id -u) -exec chown $(id -u) {} \; -ls

If unsure, you can leave a comment here with a link to http://paste.ubuntu.com/ containing the output of step 2.


Network between a Ubuntu 12.04 LTS VirtualBox VM and the host OS

Open VirtualBox Manager.

Configure the host side of the network as follows:
  VirtualBox, Preferences, Network, Host-only Networks
  +
  Edit
  Adapter
    172.16.0.1
    255.255.255.0
  DHCP Server
    Uncheck 'Enable Server'
  OK, OK

Configure the guest side of the network as follows:
Right click the VM in the left-hand pane.
  Settings, Network, Adapter 2, Enable, Host-only Adapter, vboxnet0, OK

Log into the virtual machine
Open the terminal.
(If you don't have emacs use some other text editor.)
    sudo emacs /etc/network/interfaces

Add this:

# The secondary network interface (static IP)
auto eth1
iface eth1 inet static
    address 172.16.0.2
    netmask 255.255.255.0

Save the file, exit, and then do this from the terminal:
    sudo rm /etc/udev/rules.d/70-persistent-net.rules
    sudo reboot


"Can't connect to local MySQL server through" socket error

mysql can be started from upstart. Basically you install mysql-server package. You can easily search for mysql-server package in synaptic and install it. You will be prompted for root password during installtion[i.e.mysql user root password] . After that in terminal just do

sudo start mysql

or

sudo service mysql start

Mysql usually is started on boot so you may have it running as well.

Just ps aux | grep mysql to see if it is running.


how to mass delete duplicate files in fslint

Use the command line utility findup bundled with the fslint official package. Find it in the installation directory /usr/share/fslint/fslint.
Let's say, you want to 'delete duplicates, not merge with links' a home directory:

/usr/share/fslint/fslint/findup -d /home/chemist

Simply read the manual (?!)

Usage: findup [[[-t [-m|-d]] | [--summary]] [-r] [-f] paths(s) ...]

 If no path(s) specified then the current directory is assumed.

 When -m is specified any found duplicates will be merged (using hardlinks).
 When -d is specified any found duplicates will be deleted (leaving just 1).
 When -t is specfied, only report what -m or -d would do.
 When --summary is specified change output format to include file sizes.
 You can also pipe this summary format to /usr/share/fslint/fslint/fstool/dupwaste
 to get a total of the wastage due to duplicates.

For more information, see the FsLint Official Documentation
FsLint homepage: http://www.pixelbeat.org/fslint/


Pop in your windows disc, click "Repair PC", run the autorepair, and finally, click something like "Repair Bootloader" (This may be done automatically).

This happened because GRUB is missing its boot data. It was on the Ubuntu partition.


"Disk quota exceeded" on NFS: how can I see the quota?

Getting quota information from an NFS is... painful at times.  It doesn't report normally, inquiries can easily be rejected and denied, and the quota inquiry doesn't necessarily go over the same exact communications vector as the standard NFS protocols.

The only true way would be to ask MIT what the disk quotas are.  At Penn State, there is a directory on NFS/UNIX backed shares called the "PASS" drive, and the quota is modifiable from the user's logon page where they can access information about their logon account, PASS space, print quotas, etc.  I would have to assume that MIT would have some type of similar dashboard somewhere, if not modifiable quotas.

I also found this document on MIT's Knowledge Base that suggests you're using the wrong command (but I don't know what Athena is nor what nfs-holy is at MIT), also.  Try using quota -v -f MOUNT_POINT_ON_SYSTEM to get your quota information.

If that doesn't give you the information you're after (or says "Connection Refused"), then you might not have access to use that command, and will need to contact MIT IT and ask them to tell you what the quota you're allowed is.  Then compare that to the total filesize of your files that you store on that share.


Default Keyrings Login Folder ( Deleted)

Yes, if your other application requires the Login keyring and you had deleted it, you can simply create a new Login keyring.

Open Seahorse (Passwords and keys) and click the green + button.
Select "Password keyring" as item type to create.
You will be asked for a name, which should be exactly Login.
After that, you have to set a new password, which has to be equal to your account's password, so that it can get unlocked automatically when you log in to your Ubuntu account.

Now there should be a new Login keyring in the list. You can test if it unlocks properly by logging out of your Ubuntu account and back in. If everything worked, it should be unlocked then.


Start a program muted, or permanently mute it

I know this question is old, but I thought I'd answer it for future visitors.

I solved this problem by setting the volume of the particular app to zero (instead of clicking the "mute" button).

I'm not sure why this works, but it keeps an app muted even if you close it and re-open it. I don't know if it works after a reboot though.

EDIT: I can now confirm that this method does work even after a reboot.


Yes it is supported.

e.g. to mount an USB storage device with an USB-OTG cable: open the terminal and locate the name of the device with the command sudo fdisk -l, create a mount point (the directory where you access the device) with the command sudo mkdir /media/external and mount the device with sudo mount -t vfat /dev/sda1 /media/external (if the device was /dev/sda1 and formated with FAT32).

The device can now be accessed with the file-manager. When ready unmount with sudo umount /media/external


Is there a tool to measure speed of your pc/laptop?

Phoronix Test Suite is a complete benchmark facility that works on any Linux distribution, Windows and MacOSX systems.

Here are its features:

130+ Test Profiles 60+ Test Suites
Extensible Testing Architecture
Optional Linux-based LiveDVD/USB
Testing Distribution (PTS Desktop Live) Automated Test Installation
Dependency Management Support
Module-based Plug-In Architecture
PNG, JPG, GIF, Adobe SWF, SVG Graph
Rendering Support Automated Batch
Mode Support Global Database For Result Uploads, Benchmark Comparisons
Detailed Software, Hardware Detection
System Monitoring Support GTK2
Graphical User Interface + Command-Line Interface Runs On Linux, OpenSolaris, Mac OS X, Windows 7, & BSD Operating Systems

You can download it from: http://www.phoronix-test-suite.com/

Some screenshots:


Finally I was able to bind on the dead grave key, the issue was due a keyboard language conflict.

You can try to binding on two different characters that represent the dead grave key, namely: dead grave and the ` character, and one of them will win.

The character that worked for me was the ` character.


If you save your configuration as a MY_CONNECTION.conf file in your /etc/openvpn directory, you can do the following:

systemctl enable openvpn@MY_CONNECTION
systemctl start openvpn@MY_CONNECTION

where MY_CONNECTION is the same from MY_CONNECTION.conf.

So if you have multiple connections, you would have multiple systemctl calls.

systemctl enable openvpn@MY_CONNECTION1
systemctl start openvpn@MY_CONNECTION1
systemctl enable openvpn@MY_CONNECTION2
systemctl start openvpn@MY_CONNECTION2

etc.


Picasa installs but is missing in the menu

This appears to be a problem with Unity itself:

Bug report
Related: https://askubuntu.com/questions/6222/how-do-i-add-programs-to-the-unity-launcher

How it's supposed to work:
Maybe picasa doesn't have a right .desktop file or something. You can do this manually by opening a terminal with Ctrl-Alt-T and typing the command picasa and hitting enter.
Then right click on the Picasa icon on the launcher and select "Keep in Launcher"


First install Terminator or Xterm to get a working terminal. Open Synaptic Package Manager and install it there.

Check the permissions on the files in your home folder

find $HOME ! -user $USER

In particular be on the lookout for files in .dbus

You may resolve all permissions at once with

sudo chown -Rc $USER:$USER $HOME

This resolved my identical issues today. I found these solutions in this thread: https://forums.linuxmint.com/viewtopic.php?t=279168

Additionally, I removed the files in $HOME/.dbus/session-bus, removed Chrome Remote Desktop and its data in $HOME/.config/chrome-remote-desktop and rebooted. My assumption is that Chrome Remote Desktop restarted itself during an update and wrote some files as root in the home folder.


Is there a kde dolphin thumbnail creator for video files that would use built-in thumbnails?

KDE thumbnail creator with an option to use built-in thumbnails

A KDE bug/wish: Bug 238909 - Enabling of embedded mkv /mka cover art to display as icon - https://bugs.kde.org/show_bug.cgi?id=238909

Meanwhile: A KDE thumb creator plugin with an option to use the external pictures as thumbnails: http://kde-apps.org/content/show.php/FFMpegThumbs-MattePaint?content=153902 . The external is at this same as attached/embedded thumbnail.

Both the MPEG-4 container and the Matroska container could have cover art as attachments.

The FFMpegThumbs-MattePaint is capable to use the embedded/attached mp4/Matroska cover art as the thumbnail. The thumbnailer is using AtomicParsley /1/ command-line tool (mp4) and Matroska /2/ command-line tools (mkv) to extract the cover art and use it as the thumbnail. Both tools are available from the Ubuntu repositories.

As default the FFMpegThumbs-MattePaint, 0.42 or later, is using the attched/embedded mp4/Matroska cover art for the thumbnail. If there is no attached picture or the picture extraction is not possible (missing tool etc) then the thumbnail creator will pick a random frame from the media.

A YouTube clip https://www.youtube.com/watch?v=iRz3aWnD21Q&feature=youtu.be

The user has an option to override the default by writing an empty, 0 byte, file to the ../ffmpegthumbs-mattepaint/NoAuto.

KDE4:

This can be done by the command:

touch ~/.kde/share/apps/ffmpegthumbs-mattepaint/NoAuto

KF5:

This can be done by the command:

touch ~/.config/ffmpegthumbs-mattepaint/NoAuto

If there is more than one picture file attached the user has an option to hand pick the wanted cover.

Thumbnail picking from the Matroska cover art sample file: http://matroska.org/news/cover_art.html

Links

http://atomicparsley.sourceforge.net/
https://www.bunkus.org/videotools/mkvtoolnix/


How to install tidy to xampp on ubuntu 13.04

Under the blog, it says to do this:

./configure --with-php-config=/opt/lampp/bin/php-config --with-tidy

Replace that line with:

./configure --with-php-config=/opt/lampp/bin/php-config --with-tidy --host=i686-linux-gnu CFLAGS="-m32" LDFLAGS="-m32"

Source: https://stackoverflow.com/a/9038073/999400


I've solved the problem through those steps:

I opened the terminal and with nano opened the file below:

sudo nano /etc/default/speech-dispatcher

Inside the file I changed the RUN property to yes, so the file started looking like this:

# Defaults for the speech-dispatcher initscript, from speech-dispatcher

# Set to yes to start system wide Speech Dispatcher
RUN=yes


You should see (and possibly subscribe to) this bug report:

Thermald sysfs read failed /sys/class/thermal/thermal_zoneX/temp

There have been numerous posts in Ask Ubuntu about CPU throttling recently:

Core/Package temperature above threshold, cpu clock throttled - Lenovo E590
Set CPU temperature throttle threshold on Ubuntu/Thinkpad
XPS 9370 thermal throttling ubuntu 18.04

All these posts say the same thing which happens to me periodically:

~$ journalctl | grep 'cpu clock throttled'
Jun 22 10:55:52 alien kernel: CPU4: Core temperature above threshold, cpu clock throttled (total events = 1)
Jun 22 10:55:52 alien kernel: CPU0: Core temperature above threshold, cpu clock throttled (total events = 1)
Jun 22 10:55:52 alien kernel: CPU6: Package temperature above threshold, cpu clock throttled (total events = 1)
Jun 22 10:55:52 alien kernel: CPU2: Package temperature above threshold, cpu clock throttled (total events = 1)
Jun 22 10:55:52 alien kernel: CPU3: Package temperature above threshold, cpu clock throttled (total events = 1)
Jun 22 10:55:52 alien kernel: CPU7: Package temperature above threshold, cpu clock throttled (total events = 1)
Jun 22 10:55:52 alien kernel: CPU5: Package temperature above threshold, cpu clock throttled (total events = 1)
Jun 22 10:55:52 alien kernel: CPU1: Package temperature above threshold, cpu clock throttled (total events = 1)
Jun 22 10:55:52 alien kernel: CPU0: Package temperature above threshold, cpu clock throttled (total events = 1)
Jun 22 10:55:52 alien kernel: CPU4: Package temperature above threshold, cpu clock throttled (total events = 1)

In my case it happens so rarely and with no adverse side-effects I've chosen to ignore the errors.

Similar launchpad bug reports on the same issue:

Erratic behavior of CPU frequency control under load
Kernel wrong temperature reporting

And just so you know it's not just Ubuntu, from Redhat:

Overheating CPU generates Hardware Error messages


Ubuntu 18.04 Server UEFI Enable Plymouth

RESOLVED:

sudo apt purge grub-pc
sudo apt install --reinstall grub-efi-amd64

Added: "quiet splash" to GRUB_CMDLINE_LINUX in /etc/default/grub

sudo update-grub
sudo reboot


Cannot find device path for USB Bluetooth adapter

I had the same problem while installing a dual boot system with Win7x64 and Ubuntu 14.04. I have the same Broadcom Corp. BCM2046B1 USB 2.0 Hub as you do.

I booted Windows and turned on the bluetooth adapter. After I booted Ubuntu and I saw the bluetooth.

I can't explain why yet.


Ubuntu/Lubuntu Wi-Fi Stopped Working after Screen Replacement/Wi-Fi Disconnect

See the thread "No wireless networks detected since latest kernel upgrades" regarding /etc/network/interfaces configurations that helped another user with that card. If that does not work, try the steps below. Also, for the sake of basic troubleshooting, ensure that the card if firmly connected.

Your card requires non-free firmware. Try to (re-)install the iwlegacy driver. It can be downloaded directly here or you can add this repository deb http://http.debian.net/debian/ wheezy main contrib non-free to /etc/apt/sources.list and install with apt-get update && apt-get install firmware-iwlwifi I went ahead and confirmed that it is in fact in the repository at this time. (From Debian wiki)

Remove and load the module for your device:

modprobe -r iwl3945
modprobe iwl3945


I do not know if you have network access but if you have then do:

sudo apt-get install --reinstall linux-image-generic linux-image


Ubuntu 18/19 attempts to automatically identify Canon network printers.  Any printers found show up as icons (sometimes with messages indicating a problem).  In my case, the printer was actually installed and the icon was a bit deceptive. My fix was the following:

From the Settings application, select devices and remove the installed Canon printer from the system.
Download the UFR II/UFRII LT Printer Driver for Linux from the Canon support website.
Extract the folder to a location on your system.  In my case I extracted the folder to my Download folder
Open a terminal session.
At the prompt in the terminal session, change directory to the extracted folder.
In this folder there should be a program named install.sh
At the prompt type sudo ./install.sh
Enter your password.
When the installer is finished, there should a new application to add Canon printers.  In that application, select "Add" and choose your printer from the dropdown menu.
Test your printer for function with a test page of some sort.

Maybe this could be made easier for Ubuntu 20.04...


There is something wrong with your pip3 so remove it and reinstall it. Open the terminal and type:
sudo apt purge python3-pip
sudo rm -rf '/usr/lib/python3/dist-packages/pip'
sudo apt install python3-pip
cd
cd .local/lib/python3/site-packages
sudo rm -rf pip*
cd
cd .local/lib/python3.5/site-packages
sudo rm -rf pip*
python3 -m pip install xlwt


Power notification wakes up laptop from sleep but it disappears immediately

That notification should say "Computer will suspend very soon because of inactivity."

This misleading power notification message has been reported as a bug.


When will deb multi arch support be included in Ubuntu?

http://www.ubuntu.com/testing/natty/beta

scroll down to the note about dpkg.  It makes mention of multi-arch support.

Also, if you check the changelog, I see mentions of multi-arch support:

http://changelogs.ubuntu.com/changelogs/pool/main/d/dpkg/dpkg_1.16.0~ubuntu7/changelog
ubuntu-devel discussion


How can I list all packaged installed by me?

I think there is no command that let you get that information directly, but you may get that information inspecting APT logs. APT stores a history of commands in /var/log/apt/history.log, with entries with the following format:

Start-Date: ** time when command was issued **
Commandline: ** command used **
Install | Upgrade | Remove: ** packages installed/upgraded/removed to satisfy the command **
End-Date: ** time when command have finished **

Commands typed by you should appear as you typed (so a sudo apt-get install numpy will appear as Commandline: apt-get install numpy). In my system the only other commands appearing in this log are from aptdaemon, that should be issued by Update Manager.

Please note that this log is rotated from time to time, so you may not have there all commands issued by you from the beginning, or you may need to extract a compressed part of it. Also if you have multiple users I think you will not be able to know which one installed what.


How do I move files from one user account to another on the same computer?

Or use sudo

sudo cp source destination
sudo chown user:user file
sudo chmod permissions file

You may need to use that second command(s) to set permissions depending on what you moved where and what access you need.

See also

https://help.ubuntu.com/community/RootSudo

https://help.ubuntu.com/community/FilePermissions


PPA build fails only in one distribution and on one architecture

Part of the problem is that it's now expected that the debian/rules file either uses the newer dh_* target names (which this doesn't) or that there are build-arch and build-indep target names.

If you look in Ubuntu's debian/rules, you'll see that for Trusty, they've make a build-arch target that calls build-stamp, and made build depend on build-arch. This is a quick fix to the problem.

Alternatively, if you want to switch to the newer dh_* targets, you can look at Debian's debian folder, and download the debian.tar.xz file from here. This should work on Precise and Trusty.


Directories need to be removed with the option "-r". Example:

cd /tmp/
mkdir tmp1
rm -r tmp1

works.

Deleting a directy without the "-r" assumes you want to delete a file. Example:

cd /tmp/
mkdir tmp1
rm tmp1
rm: cannot remove ‘tmp1’: Is a directory
rm -r tmp1


How do you make 64 bit wineprefix on ubuntu 19.10

Turns out I didn't have the wine64 package installed. After installing wine64 I can just call wine64 directly like

WINEPREFIX=~/.wine64/ WINEARCH=win64 wine64 someprogram.exe

I don't remember exactly how I installed wine, however I believe I just did

sudo apt install wine

and expected to get 64 bit binaries but only got wine32 instead. Partially user error, partially weird ubuntu package deafults.

To instal wine64 I ran

sudo apt install wine64

Thought I'd answer my own question so others googling this can get some help.


Gnome shell with desktop icons without unity file manager

What I see in the screenshot is just the file manager menu, which, along with other menus shows in the top panel by default. AFYI, Unity uses the same file manager as Gnome Shell, it's called Nautilus. Do not remove it!

What you need to do is remove the Global Menu integration:

sudo apt-get autoremove appmenu-gtk appmenu-gtk3 appmenu-qt

For Firefox, either disable the Global Menu addon:

“Tools -> Add-ons -> Extensions”. Disable the “Global Menu Bar Integration” extension

or remove it: sudo apt-get purge firefox-globalmenu.


... I also regularly merge the code base with the latest kernel patches here: https://github.com/M-Bab/linux-kernel-amdgpu . And if you are a lazy and trustingly person you can also try the compiled kernel binaries from https://github.com/M-Bab/linux-kernel-amdgpu-binaries . On the last page you get also some additional information about the whole issue. I would generally not recommend to install compiled binaries from a random guy on the internet - the only reason I make an exception here is because I am the random guy.


i can not edit file even after entered root password

run ll /sys/class/backlight/acpi_video0 and you'll probably get something like this

% ll /sys/class/backlight/intel_backlight/
total 0
-r--r--r-- 1 root root 4096 Jul  6 14:01 actual_brightness
-rw-r--r-- 1 root root 4096 Jul  6 14:01 bl_power
-rw-r--r-- 1 root root 4096 Jul  6 14:01 brightness
lrwxrwxrwx 1 root root    0 Jul  6 14:01 device -> ../../card0-eDP-1
-r--r--r-- 1 root root 4096 Jul  6 14:01 max_brightness
drwxr-xr-x 2 root root    0 Jul  6 14:01 power
lrwxrwxrwx 1 root root    0 Jul  6 14:01 subsystem -> ../../../../../../../class/backlight
-r--r--r-- 1 root root 4096 Jul  6 14:01 type
-rw-r--r-- 1 root root 4096 Jul  6 14:01 uevent

actual_brightness is read-only. I'm guessing you're supposed to write to brightness, and actual_brightness will be automatically updated when/if your write to brightness causes an update.

Before you do this, though, try xbacklight.


Want to install Windows 7 on separate drive

If your primary master disk is the one where you have the NTFS vista partition (hence, where you will install windows 7) you should not have any problem at all, the windows installer won't even notice the other partition on disk 2 since it dont recognizes Ext/2/3/4 partitions.

The only problem I've had so far was once when installing Windows XP on a secondary disk MBR and had linux on the first disk, somehow windows wouldn't boot, but as I said, it was installed on the secondary master, in your case is on the primary master so you shouldnt have any trouble, besides, grub2 is very capable of booting from anywhere, so if you set it up correctly and add the windows 7 installation to grub2 you'll be able to load grub2 from disk 2 and then grub2 will load the MBR of disk 1 which has the windows installation.


What requirements should my App meet in order to be accepted into Ubuntu App Store?

First off, development of an app for smart phones will be a bit different.  However, most program development rules will still apply when it comes to content, ad delivery(if you chose to) what stage you want to release the app to and where you want it targeted.  Because of the limited (yes smart phones still have a slight minority demographic) range your app will follow, do make it available to as many devices as possible.  Guide lines should be followed as a guide, but remember they are publishing your stuff so do not stray too far.  As far as DRM is considered, a touchy yet still nasty subject.  Getting permissions first is a must.  Yes make as many arch complied sources, the more the merrier.

You are the developer, you want as many people as possible to know your app exist and that it is the best.


Ubuntu 20.04 Killer AX500s DBS drivers support

I just found out there is support for AX500s DBS in the "linux-firmware" package ver 1.187.7, which is currently in ubuntu proposed:
https://launchpad.net/ubuntu/+source/linux-firmware/1.187.7
I can confirm I'm now running Ubuntu 20.04.1 on XPS 13 9310 (late 2020), connected via the AX500s DBS Wifi.
To get the wifi card recognised, I had to:
# sudo apt install linux-oem-20.04-edge # installs kernel version 5.10.0-1008-oem
# sudo apt install linux-firmware=1.187.7 # from ubuntu proposed, which I temporarily enabled


Is it wise to install mail and webhosting on one server?

You have many options:

Host it on the same server

I would AVOID this as much as possible, for the following reasons:

If you get a traffic spike your emails will not go through
If your site gets DDOSed your emails will not go through
If your site gets hacked then all your emails will be accessible, and the attackers can send spam, getting your server blacklisted

Host it on another server

I tend to avoid this one, although it is valid, because there are a lot of free or cheap services that will do this for you, deal with all the config and patching, and give you secure remote access.

Use an external provider

I tend to go for this one, as if your provider is large the odds of downtime are a lot less than if you host it yourself.


@steeldriver hit the nail on the head: this is a fail2ban (or similar) tool blocking (temporarily) your IP address.

It may be worth whitelisting your IP (though, if you're on a non-static connection method (eg from a home cable modem), this won't be effective; or if your machine is compromised, it could auto-login to remote devices and run nefarious content thereon):

  Whitelisting is setup in the jail.conf file using a space separated list.

[DEFAULT]
# "ignoreip" can be an IP address, a CIDR mask or a DNS host. Fail2ban will not
# ban a host which matches an address in this list. Several addresses can be
# defined using space separator.

  or

ignoreip = 127.0.0.1 192.168.1.0/24 8.8.8.8
# This will ignore connection coming from common private networks.
# Note that local connections can come from other than just 127.0.0.1, so
# this needs CIDR range too.
ignoreip = 127.0.0.0/8 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16

You might also consider increasing the number of bad tries and/or cutting the length of the ban - see the fail2ban jail options documentation.


You are using or getting assigned (By a router for example) the same network IP address range for both.

You have the LAN network card (Marvell 88E8072 PCI-E Gigabit Ethernet) with the IP: 192.168.1.16

Then you have your WLAN network card (Broadcom BCM4312 802.11b/g) with the IP: 192.168.1.4

They can not both be 192.168.1.X. You need to configure the router that assigns the IP to any of the 2 to assign a different range for one of them. For example, assign the LAN or WLAN the range 192.168.2.X, so when you have both connected they are in different IP Ranges.

The problem here is that when you have both of them connected and both get, either the same IP address or same IP address range (Assigned from a DHCP Router), the computer thinks you are connecting to the same LAN network and does not know where to get information for the network card, so when you try to send a package, it does not know which network card to use since both point to the same IP range.

Changing the pool of IPs you can assign on one of the network cards will solve the issue. Here is an image of how my router looks on the page where I would change the pool of IPs:

As you can see, on the section of your Router where it manages the DHCP service (You should have it enabled since you are getting assigned those IP), simply change the IP Address of your router to another range and then change the IPs assigned by DHCP. In this case for example, if I wanted to change this to 192.168.10.X I would first change the IP Address of the router to the same IP Range I am going to use for the computer, this way I make sure it will be accessible after the changes are made. So I would change where it says 192.168.1.1 to 192.168.10.1.

Then on the "start IP Address" (It might look different in your Router) I would change the 192.168.1.2 to 192.168.10.2. Of course in my case it does this last change automatically after changing the Routers IP, but just in case in another Router it does not, then you know which 2 steps to do. Now simply save the new configuration so you can get the new IP assigned to your LAN or WLAN device and enjoy having both network cards working at the same time.


"Jetty is not installed" on boot, and poweroff

This command "sudo apt-get purge jetty" to correct this error.


Honestly, no idea.

You might have more success by loading it through a terminal. Most applications are quite vocal about their crashes and failures but nautilus is comparatively silent. Perhaps running it like this killall nautilus && nautilus trash:/// might show you the problem.

You can forcibly delete everything in trash with this (but remember it will delete everything in there):

rm -rf ~/.local/share/Trash/*

If you want to rescue something from the trash, I suggest you browse it and pluck out what you need. You can do this from the terminal and you should also be able to do it via nautilus.

If you find the precise problem, or it persists, make sure you file a bug (ubuntu-bug nautilus)


The ftp directory defaults to the user's HOME directory, so the easiest way to achieve your goal is to create a new user and set his HOME directory to /var/www/myApplication:

usermod -d /var/www/myApplication/ exampleuser

If you want to restrict the access to this directory you need to set

chroot_local_user=YES

in your vsftpd.conf. Then restart the vsftpd service with:

service vsftpd restart

See Unix & Linux: How to create a FTP user with specific /dir/ access only on a Centos / linux installation

There may be an even simpler way, see here:

  To change the default login directory for vsftpd, change the ftp user
  home directory in /etc/passwd: ftp:x:116:116:vsftpd daemon:/var/vsftpd:/bin/false

  The ftp user (userID=116) home directory changed to /var/vsftpd.
  This will allow the default/anonymous/unknown user to land into a specific place(/var/vsftpd).