I thought the same thing, which is how I found your question.

But then I realized, programs cannot really keep running if all the data (including their own code) is suddenly encrypted. And data might be in RAM anyway if programs are running.

So the only way to encrypt things is if all programs stop running, which doesn't happen when locking.


rsync is failing when trying to sync a big home folder

The error you're having is often due to a lack of permissions on one end or the other, as you're doing a sudo rsync on the sending end, that discounts this option, so it must be on the receiving end.

Currently, you're sunning a sudo rsync on the sending end, but running a non-sudo version on the receiver, even though you are doing it with a sudo user. To remedy this you may need to use the --rsync-path "sudo rsync" option on the receiving machine, and make sure that the sudo user can complete a sudo rsync command without entering a password.

Before doing this you'll need to set up your with passwordless access to the rsync command, on the receiving machine. This will edit the /etc/sudoers file, be careful doing this as you can lock yourself out of sudo access if you muck up this file:

sudo visudo

Enter the following lines at the bottom of the file. The first line is just a comment to help you remember why the next line has been added.

# Allows someSudoUser to use rsync with no password.
someSudoUser ALL=NOPASSWD: /usr/bin/rsync

Here are a couple of useful links about sudo access:Sudoers RootSudo

Once this is complete, the rsync command would be:

sudo rsync -rlp --progress --rsync-path "sudo rsync" "someSudoUser@nameOfRemoteComputer:/home/myUser/" "/home/myUser"

An alternative to this whole approach would be to identify which files are causing the problem, and exclude them from the rsync command, using the --exclude option of rsync.


How can I connect my Samsung S3 Mini to Ubuntu 12.10

I found the solution by updating some packages from a PPA...

I've found the solution in this page:

http://www.webupd8.org/2013/01/upgrade-to-gvfs-with-mtp-support-in.html


Connecting to Windows shares using Active Directory?

It's syntax in this case that seems to be causing the issue. I can verify that when I type the server and domain in lowercase with my credentials, it does not connect.

However...

When I type the server and domain in all CAPS with my credentials, it connects just fine.


Kinect 2 on Ubuntu 16.04, device not listed in `lsusb`

After installing all (!) the dependencies (provided in the subfolder of libfreenect2/depends) including libusb and building libfreenect again from scratch (completely wiping the usual cmake build subfolder, then again cmake ..) it now works.

So, in case you run into the same problem: first make sure you've really installed all dependencies and everything shown in libfreenect2/depends.


Upgrade 12.04 LTS from 11.04, Keyboard Freeze and Monitor cannot light up

Ubuntu 11.04 is no LTS (LTS Versions are released every 2 years, that means ...,8.04, 10.04 or 12.04) --> https://wiki.ubuntu.com/LTS
If you only want to backup your data, you should boot an Ubuntu Live CD maybe in an older version ( http://mirror.anl.gov/pub/ubuntu-iso/DVDs/ubuntu/ ) and copy the data from the disk to an external drive (USB-HDD, Flash-Disk,...)
Most important is in /home/username
Does the console open when you press CTRL+ALT+F2 ?
What is your current graphics card? Still the intel onBoard?


Launchpad seems to think not. There are sources for 17.10, 17.04, 16.04. What I do see is that it moved from MAIN to UNIVERSE so something did happen.

Another approach to installing python modules is through PIP or Conda.

conda install -c anaconda-cluster python-distutils-extra=2.40
pip install http://launchpad.net/python-distutils-extra/trunk/2.40/+download/python-distutils-extra-2.40.tar.gz

Either would install version 2.40 (untested so comment if any of these show errors).


GSConnect not working after upgrading to ubuntu 20.04

After the update, the firewall was blocking the port 1716 which is used by GSConnect. Used sudo ufw allow 1716 command to allow the port, which solved the issue.
To ensure that the port is not being used by any other process, use lsof -i UDP:1716. (If the port is being used by GSConnect, the output will have gjs as the COMMAND).


How to close a Gnome desktop session on the console in VMware?

Ending gnome session

Users can logoff the gnome session as follows from terminal

gnome-session-quit

It might needs the --force option to suppress the confirmation dialog that would appear without it.

Unlike applications run from an X terminal emulator, ending a session from a TTY requires you to append the DISPLAY variable to indicate which X display is running the session. Hence:

DISPLAY=:0 gnome-session-quit --force

Killing all users processes

You could as well kill all processes of that user. Not a perfect solution but should do the job as well.

sudo pkill -u nameOfUser


Reference to home not working in Nautilus Action-Config-Tool

It is not referenced as being possible to give a non-absolute path (expect from $PATH itself).

What you can do is add a script (placed in PATH) that will run the given file (gave as a parameter) according to the home directory of the user.

Just open a terminal and type

sudo nano /usr/bin/run-in-home

then simply write this :

#!/bin/bash

`$HOME/$1`

exit the editor (Ctrl+X, then Y and then Enter) and give execution permission to this script

sudo chmod +x /usr/bin/run-in-home

Now you can set the Path :  field to run-in-home and the Parameters : field to 'path/to/file param1 parm2' so that, in your case, it would be

EDIT

If you want to launch your file with another program (for example a .jar file, or if python cannot be run directly), you can change /usr/bin/run-in-home to this

#!/bin/bash

if [ $# -eq 2 ]; then
        `$1 $HOME/$2`
else
        `$HOME/$1`
fi

and now the Parameters  : field becomes 'program program-parameter1 program-parameter2' 'path/to/file param1 parm2', for instance 'java -jar' 'Documents/Minecraft/Minecraft.jar'.


I had the same issue on Ubuntu 16.04 LTS (64bit). I updated ~/.vnc/xstartup file to look like below, worked successfully for me.

# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &

gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &

Reference: https://www.linode.com/docs/applications/remote-desktop/install-vnc-on-ubuntu-16-04


Can't connect to WiFI after upgrade to 15.10, aka dreaded WPA2 Enterprise/PEAP nightmare

I had a similar issue. Currently the solution to this problem is to downgrade wpasupplicant:

After upgrade to 15.10 Wifi to a corporate network (WPA2) is not working anymore

echo "deb http://london.mirrors.linode.com/ubuntu/ vivid main" | sudo tee /etc/apt/sources.list.d/vivid.list
echo -e "Package: *\nPin: release o=Ubuntu,n=vivid\nPin-Priority: -1" | sudo tee cat /etc/apt/preferences.d/vivid
sudo apt-get update
sudo apt-get install wpasupplicant=2.1-0ubuntu7
sudo apt-mark hold wpasupplicant
sudo /etc/init.d/network-manager restart

I'm currently using the version 2.1.

wpa_supplicant -v
wpa_supplicant v2.1
Copyright (c) 2003-2014, Jouni Malinen <j@w1.fi> and contributors


Why do VMware Tools not let me enlarge my screen?

You have to drag the vm windows corners, or use a display manager that's installed on the os. For example in Ubuntu it's under "system settings/displays", in KDE you may need to install randr (sudo apt-get install kde-workspace-randr), and then it's under system settings/displays. When you reboot the screen will start small, but upon login it will return to what-ever size you last had it set to.


Control ALSA Volume on unity-control-center sound (not Pulse Audio)


apache2 : How to search a string from apache2 error logs in specific time range?

I've created a simple script, based on the suggested answer. The script has five input variables:

$1 - date from (string from)
$2 - date to (string to)
$3 - log file, full path and name
$4 - the first string to be searched
$5 - the second string to be searched

The content of the script is:

#!/bin/bash

# Escape all special characters: "[", "]", ":", " ", "."
s1="$(echo $1 | sed -e 's/\[/\\\[/g' -e 's/\]/\\\]/g' -e 's/\:/\\\:/g' -e 's/\ /\\\ /g' -e 's/\./\\\./g')"
s2="$(echo $2 | sed -e 's/\[/\\\[/g' -e 's/\]/\\\]/g' -e 's/\:/\\\:/g' -e 's/\ /\\\ /g' -e 's/\./\\\./g')"
s3="$3"
s4="$(echo $4 | sed -e 's/\[/\\\[/g' -e 's/\]/\\\]/g' -e 's/\:/\\\:/g' -e 's/\ /\\\ /g' -e 's/\./\\\./g')"
s5="$(echo $5 | sed -e 's/\[/\\\[/g' -e 's/\]/\\\]/g' -e 's/\:/\\\:/g' -e 's/\ /\\\ /g' -e 's/\./\\\./g')"
[ ! -z "$s5" ] && s5=".*$s5"

# Crop the log file
sudo sed -n "/$s1/,/$s2/p" "$s3" | grep --color=always "$s4$s5"

Let's call the script crop-log and place it in /usr/local/bin, thus it will be available as shell command system wide:

sudo touch /usr/local/bin/crop-log
sudo chmod +x /usr/local/bin/crop-log
sudo nano /usr/local/bin/crop-log

Copy the above script's content and use in nano: Shift+Insert for paste; Ctrl+O and Enter for save; Ctrl+X for exit.

Example of usage:

$ crop-log '[Tue Oct 03 07:35:08.000989 2017]' '04 07:35:07.663281' "/var/log/apache2/error.log"

[Tue Oct 03 07:35:08.000989 2017] [mpm_prefork:notice] [pid 1622] AH00163: Apache/2.4.18 (Ubuntu) mod_python/3.3.1 Python/2.7.12 OpenSSL/1.0.2g mod_perl/2.0.9 Perl/v5.22.1 configured -- resuming normal operations
[Tue Oct 03 07:35:08.001011 2017] [core:notice] [pid 1622] AH00094: Command line: '/usr/sbin/apache2'
[Wed Oct 04 07:35:07.559898 2017] [mpm_prefork:notice] [pid 1622] AH00171: Graceful restart requested, doing restart    AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message'
[Wed Oct 04 07:35:07.663176 2017] [:error] [pid 1622] python_init: Python version mismatch, expected '2.7.6', found '2.7.12'.
[Wed Oct 04 07:35:07.663275 2017] [:error] [pid 1622] python_init: Python executable found '/usr/bin/python'.
[Wed Oct 04 07:35:07.663281 2017] [:error] [pid 1622] python_init: Python path being used '/usr/lib/python2.7/:/usr/lib/python2.7/plat-x86_64-linux-gnu:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload'.

$ crop-log 'Oct 03 07:35:08' '04 07:35:07.663281' "/var/log/apache2/error.log" "[mpm_prefork:notice]"

[Tue Oct 03 07:35:08.000989 2017] [mpm_prefork:notice] [pid 1622] AH00163: Apache/2.4.18 (Ubuntu) mod_python/3.3.1 Python/2.7.12 OpenSSL/1.0.2g mod_perl/2.0.9 Perl/v5.22.1 configured -- resuming normal operations
[Wed Oct 04 07:35:07.559898 2017] [mpm_prefork:notice] [pid 1622] AH00171: Graceful restart requested, doing restart

$ crop-log '03 07:35:08' 'Oct 04 07:35:07.663281' "/var/log/apache2/error.log" "[mpm_prefork:notice]" "AH00171:"

[Wed Oct 04 07:35:07.559898 2017] [mpm_prefork:notice] [pid 1622] AH00171: Graceful restart requested, doing restart

$ crop-log '-H--' '-Z--' "/var/log/apache2/modsec_audit.log" '[id \"'

Message: Access denied with redirection to https://www.youtube.com/watch?v=gLmcGkvJ-e0 using status 302 (phase 2). Match of "ipMatchFromFile /web-security/modsecurity-ip-white.list" against "REMOTE_ADDR" required. [file "/etc/apache2/mods-enabled/security2.conf"] [line "73"] [id "150"]
Message: Access denied with redirection to https://www.youtube.com/watch?v=nb2evY0kmpQ using status 302 (phase 2). Match of "ipMatchFromFile /web-security/modsecurity-ip-white.list" against "REMOTE_ADDR" required. [file "/etc/apache2/mods-enabled/security2.conf"] [line "73"] [id "150"]
Message: Access denied with redirection to https://www.youtube.com/watch?v=z9Uz1icjwrM using status 302 (phase 2). Match of "ipMatchFromFile /web-security/modsecurity-ip-white.list" against "REMOTE_ADDR" required. [file "/etc/apache2/mods-enabled/security2.conf"] [line "73"] [id "150"]


Start off with something simple. Of course learning to program or advancing your programming and designing and managing skills is not going to be simple :-). But if you take small steps it will make it happen.

IMHO unix/linux is very good for starting to program and write games. If you wish you can take writing games to a high level on ubuntu. Skills learned transfer to any platform.

Start off maybe using SDL library. There are a good few examples available. Start with small examples. You can also find big SDL projects and get the source, build and hack on them for fun. You can program in c or python or more languages. SDL lib is available on linux, windows, mac, android, ios :), . . . http://www.libsdl.org/

Start with python if you are new to programming. And start with really simple things like printing "Hello world". You could also start programming with graphical oo lang like scratch or blockly.

Python SDL library is pygame. The documentation discusses python's suitability for game development. Read this: http://www.pygame.org/docs/tut/intro/intro.html
You can have lots of lovely shiny things and have arcade style games working perfectly with python. If you move into 3d rendering or other intensive operations  it is common to have optimised code in other languages e.g. c doing that part while a higher language like python is still used for management.

At the start setting up a programming environment can be tricky. Some simple things e.g. just putting a coloured pixel in a window sometimes just work easily but sometimes don't. Argh. Persist. Read the documentation. Read the internet. Make it do what you want :)


Upgraded from 18.04 to 18.10, now suspend doesn't work anymore

I seem to have fixed this by following the instructions in this answer, even though they are from 7 years ago...

Edit the following line in the /etc/default/grub file:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

Change it to:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_sleep=nonvs"

Save the file, then run:

sudo update-grub

and reboot.

I wonder why I didn't need to do this with 18.04 and it became necessary only since 18.10.


New Window Appears on Toolbar but GUI Doesn't Appear

If it makes a difference, it was an issue with using the application in a virtual machine. I tested it on a real installation and the windows appeared properly.


Installing line6 drivers using subversion

If you checked out from the repository without specifying a local working directory name i.e.

svn co https://svn.code.sf.net/p/line6linux/code/driver/trunk

then the default working directory name will be the same as the final URL component i.e. trunk, and you would therefore need to cd trunk to find the checked out source  and Makefile.

If you specified a local directory name for the checkout

svn co https://svn.code.sf.net/p/line6linux/code/driver/trunk somedir

then you would cd somedir instead. After that, you should just need to

make
sudo make install

There is extensive documentation for SVN in the 'SVN Red Book'.


Ubuntu 14.04 : My computer sees the wireless network, but won't connect to it, keeps asking for the WPA password

So, my issue was fixed. I'm not extremely sure how, but here is what I did:

sudo service network-manager restart

Maybe that will help others who have this problem, if that was the solution of course.


The storage is sold in units of 20GB. So you can just buy more 20GB units. To do so sign in and go to this URL:

https://one.ubuntu.com/services/add-storage/

And then click on the arrows to add as much space as you need.


How to configure programs to automatically reopen after a GUI reboot?

The answer to your question used to be gnome-session-save but it is dead right now.  Hopefully they will come back to life eventually, but for the time being there is gno saved session in gnome-session.  Xfce and Kde still have save sessions I believe.


Is it possible to use FM radio WITHOUT internet connection or special devices ?

No. Best option is to get a FM-radio tuner. There are USB versions of such tuners though most are TV tuners with an added FM radio tuner.

And gnomeradio is a piece of software for that:

Oh I know of 1 notebook with a 3.0 x FM antenna: Toshiba Satellite A305-S6863.


USA keyboard layout keeps getting added on login

This answer solved my problem. While I initially thought that that question dealt with an unrelated issue, it turns out that it actually is the same issue.

To summarize here, the solution is to choose the desired layout on the login screen. Then, the old layout will stop showing up and the keyboard layout indicator will be gone for good.


It's always good to open a terminal and issue the command from there. Failure will at the least reports some output.

Open a terminal and issue the command:

skype


Have you tried:

ifconfig -a

or:

sudo ifconfig -a

or, again:

sudo ifconfig eth0
sudo ifconfig eth1


Can I give a presentation including drawing with a pen in Ubuntu Touch

Yes it is possible,

I tested it with a Nexus 4. I logged in via the adb shell then I created a normal libertine cotnainer and installed libreoffice in it.
Then I started LibreOffice Impress via the Desktop Apps Skope by tapping to the icon.

In future this complicated way will become easier. You will not need to use a command line. :-)

Well it works, but it was very slow and very stiky. You should really use a Device with a higher performance and/or wait until this feature will become more stable.

I also heard, that there are awesome plans! It will be possible in future to use the Devices Screen for the presenter's view and the presentation itself will be shown at the external screen.


TensorBoard refuses to open -- VersionConflict grpcio>=1.24.3

I have since fixed the issue by changing my installed versions of TensorFlow

sudo pip3 install tensorflow==2.0.0 && sudo pip3 install tensorflow-gpu==2.0.0 && sudo pip3 install tensorboard==2.0.0


You are already running the open source driver probably. If you want to test the proprietary driver use this ppa.

Add it to your system with

sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install fglrx-installer

This will install the proprietary drivers in your system. Hope it works, any faults or doubts drop a comment.


Buffer I/O error, lost sync page write and blk_update_request I/O error on hibernate

It turns out that this issue is to do with the upgraded Kernel.  With the Kernel at version 4.4 hibernation works just fine, but if I upgrade to one of the newer ones then I get the I/O errors shown above.  Downgrading back to 4.4 resolves the issue.


Key combination to switch between an application's windows in all of viewports

Inspired by Pineau's answer, I found a dirty trick to get it done: keep Alt+` for switching between application windows in one viewport, and (for example) Alt+1 to switch between application windows on all viewports.

Minor cosmetic downside is that the responsiveness is a little less accurate, since the settings need a fraction of a second to change. In Practice however, you will hardly notice.

install xdotool:

sudo apt-get install xdotool

Copy the following scipt into an empty file and save it as switch.sh

#!/bin/bash

dconf write /org/compiz/profiles/unity/plugins/unityshell/alt-tab-bias-viewport false
sleep 0.2
xdotool keydown alt key 0x60
dconf write /org/compiz/profiles/unity/plugins/unityshell/alt-tab-bias-viewport true
sleep 1

set a key combination to run the script: System Preferences > Keyboard > Shortcuts > Custom Shortcuts. I choose Alt+1, since it is close to the other one.

Now you can use either Alt+1 to switch between all windows of (for example) gedit:

or Alt+` to switch between gedit windows of only the currect workspace:

note:

In the script, the key above the Tab is set to key 0x60. This might be different on other lauyouts. In case it won't work, run in a terminal xev, then press Return, then the key above tab. In the output, look for a string like (keysym 0x60, grave). The keysym value is the value you need in the (script-) line:

xdotool keydown alt key 0x60

The values of sleep 0.2 and sleep 1 make the script work fine on my system, but they might be subject to optimization for faster systems (reduce).

More options

Similarly, you can set a key combination to switch between all application windows on all viewports the script would then be:

#!/bin/bash

dconf write /org/compiz/profiles/unity/plugins/unityshell/alt-tab-bias-viewport false
sleep 0.2
xdotool keydown alt key 0xff09
dconf write /org/compiz/profiles/unity/plugins/unityshell/alt-tab-bias-viewport true
sleep 1

If you set for example Alt+Q for this, you have nice set of all options:

Alt+`  Switch between current application's windows on current viewport

Alt+1  Switch between current application's windows on all viewports

Alt+Tab  Switch between all application windows on current viewport

Alt+Q  Switch between all application windows on all viewports

Alt+Tab : Switch between all application windows on current viewport

Alt+Q: Switch between all application windows on all viewports


ubuntu 12.10 grub doesn't appear efi mode

Neither of the links work; I get a message that reads "El sistema esta experimentando un error, por favor intente entrar en unas horas." That seems to be a temporary error, though....

Even if the links worked, it's critical for debugging problems like this that we have information on your system. Saying that yours is similar to somebody else's just won't cut it; there can be subtle but critical differences between the two.

Your statement that "...Ubuntu is loaded but the grub does not appear" requires clarification. I suspect that what you mean is that the computer boots directly into Ubuntu without first presenting you with a GRUB menu, rendering it impossible for you to boot Windows. If so, then you need to reconfigure GRUB in one way or another. If I've misinterpreted, please elaborate.

I recommend that you run the Boot Info Script on your system and post a link to the RESULTS.txt file that it produces. This will provide detailed information on your partition layout, enabling further diagnosis. It's likely that this is a system-specific problem that might be better handled in a Web forum (such as Ubuntu Forums) than here.


This issue occurs because the VNC session you are using is unable to load the currently selected display manager.
You can resolve this by changing your xstartup file to use an alternative display manager which does not require graphics acceleration.
There are instructions on how to configure this available Here


Brightness wont go up or down and is stuck on max setting! Tried others solutions but still no fix! Please someone help!

Software solution
In the question and in comments OP has tried many different hardware solutions to no avail. This leaves software solutions which aren't as effective but better than nothing. This script can be adapted for all monitors:

#!/bin/bash

# NAME: alien
# PATH: /mnt/e/bin
# DESC: Set brightness of Alien Laptop
# DATE: Dec 9, 2017. Modified July 21, 2018.

# NOTE: Monitor name changes with driver used: nVidia = "eDP-1-1"
#                                             Nouveau = "eDP-1"
#                                               Intel = "eDP1"

MonitorName="eDP"
AllMonitors=`xrandr -q | grep -v disconnected | grep connected | awk '{print $1}'`
echo All Monitors: $AllMonitors
substr=ab
for s in $AllMonitors; do
    if case ${s} in *"${MonitorName}"*) true;; *) false;; esac; then
        FullMonitor=${s}
        printf %s\\n "'${s}' contains '${MonitorName}'"
    else
        printf %s\\n "'${s}' does not contain '${MonitorName}'"
    fi
done
echo Full Monitor: $FullMonitor

if [[ $# -ne 1 ]]; then
    xrandr --verbose | grep -A5 "^$FullMonitor" > /tmp/alien
    head -n1 /tmp/alien
    echo "$(tput setaf 6)" ; tail -n1 /tmp/alien ; echo "$(tput sgr0)"
    rm /tmp/alien
    echo 'One argument required for brightness level, e.g. "alien .63"'
    echo 'will set brightness level of Alien display to level .63 using xrandr'
    exit 1
fi

xrandr --output "$FullMonitor" --brightness "$1"

The script above was written for a three monitor system and addresses the laptop screen. Two other scripts (not listed here) are called "Sony" and "Toshiba" for two external HDMI monitors. The laptop can have Intel driver for i7-6700 HQ HD 530 graphics iGPU, nVidia GTX 970M GPU with different xrandr screen names depending on nVidia Proprietary Graphics driver or Nouveau Open Source driver.
Because the system has a total of 9 different xrandr screen names, three names for each screen, the script is flexible depending on how the machine has been booted.
To adapt this script to your needs:

Rename script, eg change alien to msi
Rename eDP, use xrandr to get list of all monitor names and select appropriate prefix. Enter prefix only into the script. It will find the -1 suffix automatically.
When calling pass parameter one for brightness level; .75 = 75%, .3 = 30%, etc.

Keep checking new kernels for hardware support
Use these commands to check if hardware is supported after a kernel update:
$ ls /sys/class/backlight
intel_backlight
$ cat /sys/class/backlight/intel_backlight/*brightness*
3000
3000
7500

The first 3000 is the actual brightness
The second 3000 is the last attempt brightness change
7500 is the maximum brightness level for your hardware

To attempt to change hardware brightness level use:
$ echo 2500 | sudo tee /sys/class/backlight/intel_backlight/brightness
2500

If hardware is supported you will see a change:
$ cat /sys/class/backlight/intel_backlight/*brightness*
2500
2500
7500


Is it possible to have different DPI configurations for two different screens?

It seems people are still struggling trying to work with several monitors and HiDPI displays.
A good workaround is described in arch wiki https://wiki.archlinux.org/index.php/HiDPI#Multiple_displays.
So, I have:

laptop asus ln303ux: 3200x1800,
external monitor:    1920x1200

Now I use Ubuntu 14.10 & GNOME Shell 3.12.2 that has pretty usable HiDPI support.
So I just use out-of-the-box support of HiDPI - scaling factor is 2 (it can be set up via GUI).
That means that on external monitor I get everything twice bigger than acceptable.
Thus, I use xrandr; but instead of downscaling laptop screen, I upscale external monitor screen:

xrandr --output HDMI1 --scale 2x2 --mode 1920x1200 --fb 3840x4200 --pos 0x0
xrandr --output eDP1 --scale 1x1 --pos 320x2400

So, one by one:

--output HDMI1 in my case is the external screen, eDP1 is the laptop screen.
--scale 2x2 - make everything on external screen twice smaller
--mode XxY - explicitly set the resolution for screen (not necessary if is already set)
--fb XxY - set size of a virtual screen (framebuffer) (important without this, you will be able to use only a fourth part of the screen). In my case one screen was on top of another, so I added up effective heights 2400+1800=4200. Also note, that maximum framebuffer size might be specified in xorg.conf - then you cannot exceed it (it is written in the first line of xrandr -q output).
--pos XxY - in my case I set absolute positioning of the screens, so my laptop screen is directly on the bottom of the external screen. The value Y here is double the external monitor height.

And this is it! Everything is as crisp as it could be.

FYI: to get the names of the screens and available resolutions, one can run xrandr --current.
More information on setting the resolution an be found here: https://wiki.ubuntu.com/X/Config/Resolution .

UPDATE - OPTION 2: one more interesting workaround for applications that support GTK3.
If I normally use only one application on the large screen (e.g. some IDE, like leksah), I do not resize the the screen, but run the application scaled to its original size

env GDK_SCALE=0.5 GDK_DPI_SCALE=0.5 CLUTTER_SCALE=0.5 appname


File Permission In www/html Directory For Security

Files that are served by Apache (i.e. requested via HTTP) don't need executable permissions to be run, they only need to be readable by Apache.

What I usually do is, set the group to www-data and the permissions to 640 for files and 1750 for directories, so no one else can read them besides the web server.


Install 32-bit gstreamer plugins on 64-bit

The libraries apt is refusing to install (such as libdvdread4) haven't been multi-arched yet. So, they can't have both amd64 and i386 versions of the same library co-installed.

There's not much you can do, except help us multi-arch more libraries.


Will Ubuntu prompt me for consensual 14.04.x download?

The standard updates are fine, and in my experience the updater software will tell you when there is a new release, and the option to install it or not.


unable to type in password at login screen after restart?

Instead of using GUI press Ctrl+Alt+F1 (if F1 key does not work try using other F# keys) at the log-in screen. This should bring CLi. You can always get back to GUI log-in page by pressing Ctrl+Alt+F7

You will be prompted for username and password. Try logging this way. After you logged in to start your GUI type:

startx -- :1

Your GUI will load up. At that point you can use your command prompt or other GUI tools to troubleshoot the issue.

It is possible that reading this links my help in troubleshooting your issue: Ubuntu gets stuck in a login loop or login loop ubuntu 12.04


What creates the file /var/run/reboot-required

The Debian Policy doesn't provide any guidance on when a package should use reboot-required, only that that's the mechanism to be used:

9.12. Signaling that a reboot is required
Programs can signal that a reboot is required by touching
/run/reboot-required. It is conventional to add the name of the
package(s) requiring the reboot to /run/reboot-required.pkgs.
Programs should not add a package name to /run/reboot-required.pkgs
if it is already present there.
The /run/reboot-required mechanism is used when a reboot is needed
to fully apply the changes introduced by package installation or
upgrade. Typically it is the postinst maintainer script that touches
/run/reboot-required, at the end of a successful configuration of
the package.
There are no guarantees provided by the /run/reboot-required
convention as to when or whether the requested reboot will occur.

So, I'd say any package maintainer can use it if they feel a reboot is required after the package is updated. Common examples include core libraries like glibc, which are used by so many things that rebooting is pretty much the only effective way to get everything to use the updated library.
One user checked the postinsts of a few packages and came up with varied list: https://askubuntu.com/a/731993/158442. Other examples can be found in the bug report asking for documentation on this mechanism to be included in the Debian Policy (#919507).


not able to browse internet through wifi, but working fine with ethernet card

You can access Internet at a time one card may be wireless (wifi) interface or ethernet.
card.

If you want through wireless interface (i.e through mobile station) that time you should create bridge between ethernet card(eth0) and wireless interface(ath0).

ifconfig ath0 0.0.0.0
ifconfig eth0 0.0.0.0
brctl addbr br0
brctl addif br0 eth0
brctl addif br0 ath0
ifconfig br0 up

Now your mobile will get IP address, you can access Internet successfully but your system (desktop) is not able to use Internet.
If you want then need to destroy bridge.

ifconfig br0 down
brctl delbr br0


How can I make "apt-get update" faster with a slow internet connection?

While I don't suffer from the same issue, I did once and I used Apt-Fast. Below is what the author claims it does with instructions how to install and use it. I haven't used this since 11.04 however I did notice a considerable difference in speed when I did.

Apt-fast is a simple command line utility that can make installation and upgrading of software in Ubuntu/Debian much faster.

Apt-fast make use of Axel app which accelerates HTTP/FTP downloads by using multiple sources for one file. Author claims that, apt-fast could make your installations and upgrades up to 26x faster!

Do the following in Terminal to install it.

sudo add-apt-repository ppa:tldm217/tahutek.net

As of April 2, 2012, apt-fast doesn't have a Precise repository. You have to edit your Software Sources as the author has not made a package for Precise. So you have to launch it from the terminal.

Go to the Other Software tab and click on

http://ppa.launchpad.net/tldm217/tahutek.net/ubuntu precise main.

Then click Edit.

Change the field that says "precise" to "oneiric" and click OK. Also do this on the line that says (source code).

Close Software Sources and put these lines in the terminal:

sudo apt-get update
sudo apt-get install apt-fast

Close and re-open terminal once again and try to use apt-fast instead of apt-get. You should see the difference.

This is an edit:  I came across What is apt-fast and should I use it? after I answered yours which maybe helpful.


Why can't I connect OpenVPN from Network Manager When I can Connect from CLI?

From the comments...

In older versions of Ubuntu (16.04 in this case), OpenVPN worked differently when run from CLI using .ovpn scripts, or if the .ovpn scripts were imported to NetworkManager and used there.

Recommend booting to a Ubuntu Live 19.04 DVD/USB and trying it there.

Update #1:

It works as it should in 19.04.


keep track of multiple terminals from shell script

Scripts execute commands in sequence, and wait until each command finishes. However, there is a way to allow the script to continue executing past a specific command - add & on the end of the script.

For instance:

!#/bin/bash
firefox
echo "Next line"

Will wait till firefox is closed.

!#/bin/bash
firefox &
echo "Next line"

Will execute echo command and allow keeping firefox open


(XPS13) reinstalling keyboard support from recovery mode

I found out that the reason the keyboard was sending return keystrokes was because I used the virtual keyboard on the login screen to enter my password and I had used the virtual return button to log in. There is apparently a bug in this which will continue sending return keystrokes even after the virtual keyboard has disappeared.

I logged in a second time, used the Ubuntu virtual keyboard to install the openssh-server and then ssh'd in from another computer to reinstall libinput. All good now, except that the touchpad still behaves strangely and I hope I'll never need WiFi from the recovery console because I wouldn't know how to set it up.


What is the difference between apt and apt-get?

They are very similar command line tools available in Trusty (14.04) and later.  apt-get and apt-cache's most commonly used commands are available in apt.
apt-get may be considered as lower-level and "back-end", and support other APT-based tools. apt is designed for end-users (human) and its output may be changed between versions.
Note from apt(8):
The `apt` command is meant to be pleasant for end users and does not need
       to be backward compatible like apt-get(8).

Take a look at this post for more information on the new tool:

http://mvogt.wordpress.com/2014/04/04/apt-1-0/

A synopsis of the above link (with corrections*):

The big news for this version is that we included a new “apt” binary that combines the most commonly used commands from apt-get and apt-cache. The commands are the same as their apt-get/apt-cache counterparts but with slightly different configuration options.

Currently the apt binary supports the following commands:

list: which is similar to dpkg list and can be used with flags like
--installed or --upgradable.
search: works just like apt-cache search but sorted alphabetically.
show: works like apt-cache show but hide some details that people are less likely to care about (like the hashes). The full record is still available via apt-cache show of course.
update: like the regular apt-get update with color output enabled, but apt update also shows the number of upgradeable packages (if any).
install,remove: adds progress output during the dpkg run.
upgrade: the same as apt-get upgrade --with-new-pkgs.*
full-upgrade: a more meaningful name for dist-upgrade.
edit-sources: edit sources.list using $EDITOR.
policy: works just like apt-cache policy

You can enable/disable the install progress [bar] via:
# echo 'Dpkg::Progress-Fancy "1";' > /etc/apt/apt.conf.d/99progressbar


Rotating a log file in my home directory on Ubuntu Server 14.04 LTS

As @bain mentioned, the package is called logrotate.  To rotate this file as you have mentioned, you could use the following configuration in /etc/logrotate.d/irc:

/home/irc/ircd.log {
    daily
    rotate 7
    compress
    missingok
    create 0644 irc irc
    su irc irc
}

A breakdown of the configuration options:

The daily option tells logrotate to process this file every day when it is run.
The rotate 7 option tells it to keep 7 copies.
The compress option tells it to gzip the old files.
missingok tells logrotate not to complain if it is missing.
create tells the mode, owner, and group to use when creating files.
su changes the user who runs the compression, etc, so you may not want to include it


'Grub Rescue' is the most irritating problem that makes me want to pull my hair out

If possible, remove the hard drive from the computer, connect it to another computer, and completely wipe the drive. Then put it back into the computer and try installing Lubuntu again.


deleted all the files in usr/bin typing in rm -rf *

Since you just installed today, do the installation again. While you can recover from this, it'll be a lot more work than redoing the installation.

To recover from the deletion of /usr/bin, you would need to reinstall all the packages that have files in that directory. You can use this command to list the affected packages:

cd /var/lib/dpkg/info
grep -l '^/usr/bin/' *.list | sed 's/\.list$//'

You'll then need to find some way of downloading the packages without relying on any of the deleted programs. Since you've deleted dpkg, the low-level package installation utility, you'll need to obtain it from somewhere first. Grab it from some other machine running the same release Ubuntu, or download the dpkg package on another machine and extract the programs from it. You'll need not just /usr/bin/dpkg but also all the other programs in that package, including update-alternatives and all the programs named /usr/bin/dpkg-*. Again, copying might be tricky with so many programs deleted, so you may need to reboot to a rescue CD/USB to do it.

Once you have the dpkg suite, download at least the dpkg and apt package somehow, perhaps on another machine or in a still-running web browser.

Then install apt manually with the command

dpkg -i /path/to/apt_0.8.16~exp12ubuntu10.2.deb

If you get errors about missing commands, reinstall the corresponding packages first. Then reinstall all the affected packages:

apt-get --reinstall install $(grep -l '^/usr/bin/' *.list | sed 's/\.list$//')

Again, in your situation, just do a complete reinstallation.


Add Global Menu to MATE 1.8.1 (ubuntuMATE)

You can try TopMenu, a global menu bar applet for MATE 1.8+.
You can find precompiled packages and instructions in Web Upd8 article.


How to remove warnings like `Unknown media type ...`

Backup the file that is causing the errors and update the systems mime database:

sudo mv -vi /usr/share/mime/packages/kde.xml /usr/share/mime/packages/kde.xml.bak
sudo update-mime-database /usr/share/mime

This should fix the warnings.


How do I solve VirtualBox error 0x80004005?

XP has noticed the hardware has changed and is asking you to re-register. This happens because the virtual hardware presented by VirtualBox to the Guest OS (in this case XP) has changed so XP believes it's been moved from one host to another.

Call Microsoft with your license key handy and they should just unlock it for you.


I'm afraid you severely damaged your site.

Analyzing your sed command:

sed -i "s|[\'REQUEST_URI\']|\$_SERVER[\'REQUEST_URI\']|g"

The command had the effect of replacing any character in the 'REQUST_I set (that is every single ', R, E, ...) with the string $_SERVER['REQUEST_URI'] in every file found by the find command.

This is not reversible, as any instance of $_SERVER['REQUEST_URI'] may now be corresponding to any of the characters in the 'REQUST_I set.

The only thing that would help a bit would be running a command to replace every instance of $_SERVER['REQUEST_URI'] with a single character in every file affected by the command, to improve the readability and to make repairing the files less painful.

For example to replace every instance of $_SERVER['REQUEST_URI'] with a dot (this will obviously have the effect of replacing also the legitimate instances of $_SERVER['REQUEST_URI']):

sed "s/\$_SERVER\['REQUEST_URI'\]/./g" file

Here's what I get if I run the command on your snippet:

<?php
       $sql =
       "..L.C. questions.question.title, questions.question.content, questions.question.date, questions.question.answered
       F.OM questions
       WH... questions.question.topic = $topic.D AND questions.question.answered .. N.LL
       O.D.. BY questions.question.date D..C
       L.M.. 5";

       $result = $conn->query($sql);

       if($result !== N.LL && $result->num.rows > 0)
       while($row = $result->fetch.assoc()) {
       echo "

" . $row[.question.title.] . "

" . $row[.question.content.] . "

    ";


Is it possible to cycle through workspaces in Unity (14.04+)?

Cycle through your viewports

With a small script, it is very well possible to browse through the workspaces (actually viewports):

forward:

(If the last viewport is reached, the script moves to the first one)
...or backward:

(If the first viewport is reached, the script moves to the last one)

The script

#!/usr/bin/env python3
import subprocess
import sys

move = sys.argv[1]

# get the needed info from wmctrl -d
wsdata = subprocess.check_output(["wmctrl", "-d"]).decode("utf-8").split()
# retrieve total size of workspace
ws = [int(n) for n in wsdata[3].split("x")]
# panel/launcher height/width
pans = [int(n) for n in wsdata[7].split(",")]
# work area
wa = [int(n) for n in wsdata[8].split("x")]
# x/y resolution
res_h = pans[0]+wa[0]; res_v = pans[1]+wa[1]
# current position in the spanning workspace
VP = [int(n) for n in wsdata[5].split(",")]

def last_h():
    # test if we are on the last viewport horizontally
    return VP[0]+res_h == ws[0]

def first_h():
    # test if we are on the first viewport horizontally
    return VP[0] == 0

def last_v():
    # test if we are on the last viewport vertically
    return VP[1]+res_v == ws[1]

def first_v():
    # test if we are on the first viewport vertically
    return VP[1] == 0

if move == "next":
    if last_h() == False:
        command = str(VP[0]+res_h)+","+str(VP[1])
    elif last_v() == True:
        command = "0,0"
    else:
        command = "0,"+str(VP[1]+res_v)

if move == "prev":
    if first_h() == False:
        command = str(VP[0]-res_h)+","+str(VP[1])
    elif first_v() == True:
        command = str(ws[0]-res_h)+","+str(ws[1]-res_v)
    else:
        command = str(ws[0]-res_h)+","+str(VP[1]-res_v)

subprocess.Popen(["wmctrl", "-o", command])

How to use

The script needs wmctrl:

sudo apt-get install wmctrl

Copy the script into an empty file, save it as through_viewports.py
Add two commands to two different shortcut keys:

python3 /path/to/through_viewports.py next

to go to the next viewport, and:

python3 /path/to/through_viewports.py prev

to go to the previous viewport

Open System Settings > Keyboard > Shortcuts > Custom Shortcuts. Click the + and add both commands to shortcuts you like.

That's it The script detects how your viewports are set up and cycles through them.

How it works, the concept

In Unity, viewports are arranged in one big matrix, which all together makes the single workspace, the Unity desktop exists of.

Using the command:

wmctrl -d

in the output, we can read all information we need to find out where we currently are in the matrix.

0  * DG: 5120x2400  VP: 0,0  WA: 65,24 1215x776  N/A

5120x2400 is the total size of all viewports (matrix)
0,0 is the x/y position of the current viewport in the matrix (top left, pixels)
from WA: 65,24 1215x776 we can derive the screen's resolution (65,24 are the width/height of the Launcher/panel, 1215x776 is the remaining area)

Once we have the correct information, the script calculates the target position in the matrix and sets it with the command:

wmctrl -o x,y


Dell D6000 DisplayLink dock blanks screens

Regarding the monitors connected to the D6000 going blank after a while, the following fix worked for me.

Edit the following line in: /etc/pulse/default.pa

### Automatically suspend sinks/sources that become idle for too long
# load-module module-suspend-on-idle

I've also read about and changed the following line in /etc/default/grub.

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.autosuspend=-1"


Have you looked to see what the Kernel is saying about the device. Plug the device into your computer and run the command dmesg. May shed some light on the situation. You should see references to sdx at the end of the output.

Edit to reflect OP's comment below...

Fire up a terminal. Stick the card in and then run dmesg look at the last few lines of output you should see references to sdx (x being another letter.)

As an example this is what I get:-

[67680.024208] sd 4:0:0:0: [sdb] 7778304 512-byte logical blocks: (3.98 GB/3.70 GiB)
[67680.026448] sd 4:0:0:0: [sdb] No Caching mode page found
[67680.026453] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[67680.029934] sd 4:0:0:0: [sdb] No Caching mode page found
[67680.029939] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[67680.031738]  sdb: sdb1
[67820.022977] sdb: detected capacity change from 3982491648 to 0
[67825.064523] sd 4:0:0:0: [sdb] 7778304 512-byte logical blocks: (3.98 GB/3.70 GiB)
[67825.066735] sd 4:0:0:0: [sdb] No Caching mode page found
[67825.066740] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[67825.069400] sd 4:0:0:0: [sdb] No Caching mode page found
[67825.069405] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[67825.071265]  sdb: sdb1

[67825.445884] FAT-fs (sdb1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.

I can see my card is detected and assigned as sdb with a FAT partition as sdb1.

Edit 2...

Have you tried to force a mount?

Create mount point. sudo mkdir /media/mysdcard
try a force mount. sudo mount /dev/sdc1 /media/mysdcard -o force

You may need to specify the filesystem type with the -t flag. I don't know what filesystem Android uses. I guess it may be an ext? (Turns out the sdcard is vfat) In any case add the -t filesytemtype flag immediately after mount. As in sudo mount -t vfat /dev/sdc1 /media/mysdcard -o force

Have a look at this article https://help.ubuntu.com/community/Mount/USB

If it works grab all the data you can off the card.


problem installin vala 0.15.0 Gobobject not found

0.15.0 isn't just old, it's an unstable development release.  There is no reason for anyone to be using it.  0.22.0 is out, and there aren't any dependencies on newer software which should cause problems (IIRC our only real dependency is on glib >= 2.18 and I don't think that is any different than vala-0.15), so you should probably be using it.

If, for some reason, you need an older version of Vala then you should use a stable release.  If you can't build it post a complete log.  Also, running the unit tests aren't a requirement for installation.  If the problem only manifests itself when trying to run the unit tests, don't run them.  Nobody is going to bother backporting fixes to 0.15 or 0.16, so there isn't really much of a point.


nuvola player installation problems 13.10

Packages for Ubuntu 13.10 (Saucy Salamander) are available only in the Nuvola Player Unstable Builds PPA. I haven't tested any version of Nuvola Player on Ubuntu 13.10, so I don't dare to put "stable" label on them.

sudo add-apt-repository ppa:nuvola-player-builders/unstable
sudo apt-get update
sudo apt-get install nuvolaplayer


Bring up a terminal window with Ctrl+Alt+T and run unity.  This will reload the desktop settings.


Downloading ubuntu 12.04 LTS on MacBook Pro OSX

Use Chrome or Firefox to download. Safari tries to open files it downloads. You don't open the file that you download. You need to burn it to a DVD and then boot from that.


How to display opened windows in task bar in xfce ubuntu desktop environment?

You are looking for the Window Buttons plugin. Right-click the panel and select Panel > Add New Items, select the Window Buttons plugin and click on Add.
It will get added to the end of the panel.
To re-position it, right-click the panel, select Panel > Panel Preferences > Items tab, and use the arrow key buttons to move it around the panel to its desired location.


Why does my server only uses 3GB of memory

You are using 20951 of 24153. The applications are not requesting any more than 3092 so the kernel is using the rest for cache and buffers. As your applications need more memory, the kernel will reduce the cache to accommodate the new application requirements.

Tweaking the MySQL and Apache configuration for optimal performance depends on the application. In some cases like static web sites, a large filesystem cache is great. A dynamic site however with heavy database interaction would benefit from a few changes to the default MySQL configuration.

Percona has a nice tool to get you started with the MySQL config. http://tools.percona.com/wizard Once the basics are in, you can tweak further for the specifics of your application.

The Apache configuration depends on how much traffic and the size of the requests. Without knowing anything it's hard to recommend beyond the defaults.


I cannot install Ubuntu Server 12.04 LTS because it cannot mount the CD drive

Found the problem. Apparently, Ubuntu 12.04 needs a SATA connection to the CD Drive. I got my spare, which HAD a SATA connection. It worked like a charm. My server is a few (more like 6) years old. That probably was why.


Slave steals IP meant for bonded interface

There was a static configuration in /etc/dhcpcd.conf.  Not sure how that got there since I've always used static on this box.  I removed the offending lines from that file as well as removing the dhcpcd5 package all together and everything works fine now.


Microphone not working at all on a Toshiba sattelite p505 s8980

I've had the same problem it's been driving me crazy.

Here's what worked for me edit the alsa options

If I run alsamixer I don't see any mic channels. (Press F4 for capture)

SCREEN SHOT REMOVED

sudo nano /etc/modprobe.d/alsa-base.conf

add the following line at the end

options snd-hda-intel model=laptop

Another post said restart alsa with sudo alsa force-reload. This does not work. Restart the laptop completely.

After restarting run alsamixeragain. This time F4 yields

SCREEN SHOT REMOVED

Notice that Mic B is selected for capture. Change that to Mic F

SCREEN SHOT REMOVED

That's it now the regular sound control should show mic input.


For rsync the -p option means to preserve permissions and does not take an argument. Therefore your command cannot be parsed correctly and you get an error.

If you want to change the SSH port on which rsync should connect, use the command as follows.

rsync -avru --exclude-from='/home/me/exclude-me.txt' -e 'ssh -p 2222' \
/home/me/ \
assistant@assistant.local:/home/assistant/


Installing 13.04 from USB causes a reboot hafway through

Since it is a HP and Windows 7 is usually installed in BIOS mode even if motherboard also is UEFI, you have used all 4 primary partitions.
Most users with HP backup the HP-Tools partition as it is small and also can be redownloaded from HP. That gives you an available primary partition to use as an extended partition which can hold many logical partitions to use for Linux.

Also make sure you have not hibernated Windows.

Best to use Windows to shrink the Windows main install as the HP-Tools will not give enough space for installing Ubuntu. And reboot Windows so it can run its chkdsk and make its repairs due to its new size. Then you can install into the free space automatically or use manual partitioning to create your own partitions.

Other issues that probably do not apply.
Issues that only sometimes cause problems are RAID often from Intel SRT or Ultrabook type systems. Users who have tried to use Windows to create new partitions and drive is converted to dynamic partitions which do not work with Linux. Or a drive that was gpt and Windows converts back to MBR(msdos) but leaves gpt backup data on drive creating confusion on which partition type drive really is.


How to adjust Brave browser's address bar to increase its size?

In Brave, use the Hamburger menu top right and select Settings.
In Settings > Appearance select Use wide address bar.


How can I make spellchecking work for additionally installed languages in Firefox and Evolution?

To install the spellcheck:

sudo apt-get update
sudo apt-get install aspell-et myspell-et

There is no reason why this would confuse Gnome Settings.


Still apache page running after configuring nginx?

Then just stop apache service

sudo service apache2 stop

and remove it from autostart with

sudo update-rc.d -f  apache2 remove

Not sure if that is, what you wanted...

Also to list current processes listening on port 80 or 8000:

lsof -i :80

or

lsof -i :8000


The image can be found here:

/usr/share/lubuntu/images/logout-banner.png

while the important labeling can be found here:

/usr/share/lubuntu/openbox/menu.xml

Reference:

Change word of "Logout Lubuntu Session"


From a performance point of view, I'd just like to say that CouchDB perhaps isn't the fastest solution when compared to something more mature like SQLite. A gwibber comparison puts SQLite as just 10 times faster.

Given that a RSS reader does a lot more SELECT than INSERT, this is something you need to be conscious of because it's going to effect your application's responsiveness.

In terms of your code, comparing it to the "official" Vala+Couch sample, you're not passing in the connection details so I'm wondering if there's an issue with the auto-detect mechanism. Couch is started on a different port each time it runs but you can get its current port through dbus:

dbus-send --session --print-reply --dest=org.desktopcouch.CouchDB / org.desktopcouch.CouchDB.getPortmethod return sender=:1.231 -> dest=:1.230 reply_serial=2

I don't know the Vala for that but manually finding out might help you get the initial connection done.


Why does `journalctl --list-boots` only show the current boot?

Reported as a bug that's an undocumented feature
There is a bug report filed on this topic. Because rsyslog already maintains multiple boot journals in /var/log/syslog and syslog.1, .2.gz, .3.gz... syslog.7.gz the developers felt keeping extra journalctl logs would waste disk space.
The bug report states on January 3, 2018 that for new installs rsyslog will no longer be the default and that journalctl will keep multiple boot data logs.
Create multiple boot logs without reinstalling Ubuntu
Most of us won't do a new install so to enable multiple journalctl boot logs use:
sudo mkdir -p /var/log/journal
sudo systemd-tmpfiles --create --prefix /var/log/journal
Cannot set file attribute for '/var/log/journal', value=0x00800000, mask=0x00800000: Operation not supported

According to this github report the warning message on attributes can be ignored.
Interesting new flag s instead of the familiar x (executable bit) in the file permissions of the newly created directory:
$ ll /var/log/journal
total 8
drwxr-sr-x+  2 root systemd-journal 4096 Feb  2 18:18 ./
drwxrwxr-x  15 root syslog          4096 Feb  2 18:18 ../

Update 3 weeks later
$ journalctl --list-boots
-15 58a9e56135564cd8a52d547b19e76bf5 Fri 2018-02-02 18:34:35 MST—Fri 2018-02-02 23:07:14 M
-14 3514e056440341b1b6e5f03d109681bc Sat 2018-02-03 06:05:12 MST—Sat 2018-02-03 08:07:44 M
-13 0d1a32dc275348589f5ecdc72180c018 Sat 2018-02-03 08:08:05 MST—Sat 2018-02-03 08:08:34 M
-12 74159b593f3a401589ee6bd78e31684b Sat 2018-02-03 08:08:51 MST—Sun 2018-02-04 08:32:09 M
-11 4b394a9aad584ab2bfabe3b77eeed78f Sun 2018-02-04 08:32:26 MST—Mon 2018-02-05 16:54:02 M
-10 8e461ed2593c4fd896ca3b71eb3c0fba Mon 2018-02-05 16:54:34 MST—Tue 2018-02-06 03:54:30 M
 -9 ec7ba0e4dfe241c0b9c978d278fcca6d Tue 2018-02-06 03:54:47 MST—Tue 2018-02-06 16:25:02 M
 -8 b5c110267c214c38b63d0a367197d118 Tue 2018-02-06 16:25:19 MST—Thu 2018-02-08 16:49:03 M
 -7 75c3b117ac6a4de984dc3ced15edb7f8 Thu 2018-02-08 16:49:22 MST—Fri 2018-02-09 03:51:09 M
 -6 7338bd1007bc42dda5c8667eeefe1a59 Fri 2018-02-09 03:51:26 MST—Fri 2018-02-09 16:55:52 M
 -5 4b6cd0121327454ca3db035c7ed42df6 Fri 2018-02-09 16:56:09 MST—Sat 2018-02-10 07:55:14 M
 -4 0d56207f9ec0405ca3a3fd638334de2f Sat 2018-02-10 07:55:32 MST—Mon 2018-02-12 22:16:05 M
 -3 0f230cc546fd4aec8f5233e0074ab3e1 Tue 2018-02-13 03:57:20 MST—Wed 2018-02-14 22:58:56 M
 -2 c0d2c0141dd840cbab75d3c2254f8781 Wed 2018-02-14 22:59:13 MST—Sat 2018-02-17 22:46:14 M
 -1 aafb2573a6374e019a7165cb8eee74a0 Sun 2018-02-18 06:02:03 MST—Mon 2018-02-19 04:16:36 M
  0 8462f1969c6f4d61973e7e245014b846 Mon 2018-02-19 04:16:53 MST—Wed 2018-02-21 04:07:07 M

lines 1-16/16 (END)


I used PM2 and it worked well.
I used node to install: npm install pm2 -g.

Start and add a process for process management list:
pm2 start app.js.
Show the list of applications under process management:
pm2 ls.
Stop and delete a process from the list:
pm2 delete app.

Great and working like a charm...


Unable to download torrent in Transmission after updating firewall

Your port 51413 appears closed because you didn't allow incoming connections, you only allowed outgoing connections. The guide you followed is wrong in this point.

Delete the rules related to port 51413. To do that run

sudo ufw status numbered

and then delete the four related rules with

sudo ufw delete #

Replace # with the numbers you got before, you will have to run this command four times to get rid of all of them.

Now add a new rule which allows incoming connections with

sudo ufw allow 51413

To apply the changes reload the firewall rules with

sudo ufw reload

or

sudo ufw disable
sudo ufw enable

Remind that this port (51413) needs to be forwarded in your router, if the port is not forwarded in the router, incoming connections will get denied in your router before they reach your computer and the port will still appear as closed.

The Bittorrent-network is a peer-to-peer network and lives from connectivity. If a client on the network does not allow incoming connections, this client can only connect to clients which allow incoming connections. If not even a single client on the network allows incoming connections, no client would be able to connect to other clients, the network become useless.

You would still be able to download torrents if you don't allow incoming connections, but you can't connect to other peers which also deny incoming connections. Thus, the number of peers you can connect to is limited and this reduces download speed or, in the worst case, you can't download at all.

I think it is a common problem with bittorrents, many people don't know to configure their firewall and router correctly.

How to forward a port in the router is a topic which is not in the scope of askubuntu. You will have to refer to the manual of your router. For some knowledge about this topic take a look at https://portforward.com/ .

To learn more about the usage of ufw take a look at:

http://manpages.ubuntu.com/manpages/precise/man8/ufw.8.html
https://help.ubuntu.com/community/UFW

Following the guide you used you have a firewall which is very restrictive, you set the defaults to deny all incoming and all outgoing connections. You will have to add rules to allow connections for each application which needs Internet-access and uses ports which are not defined in your rules yet. Remind that when you install a new application and you wonder why the application does not have access to the Internet.


I'm sorry, perhaps I missed something.

Inspect your curl command in the shell. Cut out the grep, and run it. When I do that I can see the whole return. I get back, hundreds of times

LOCKED

which I think indicates that website is blocking your effort to scrape it. Heck, just browse this:

http://www.artemiosv.info/21.php?p1=1;p2=2;p3=3;p4=4

It returns a page that simply says "LOCKED"

Concerning the grep question, grep will pick lines that have a character pattern. It does not sub-select strings inside there, that is what a tool like sed is for.  I think grep is giving you exactly what you ask for. You say it worked in a test case, but I cannot imagine how.

Why not take the simple route of running the web scrape and saving the files in your PC, then do the grep/sed/awk magic on them.  That's the only way to be sure of what you are actually getting when you retrieve stuff.  And it is a much more likely way you will get what you need from grep or sed.  Pipes are handy once you know what you are doing and what you have.  I suspect here neither condition holds.


Is it worth upgrading Ubuntu 10.04 to 12.04?

You can use Ubuntu 10.04 until April 2013. There will always be bugs early on after release, so many will prefer to wait a while before upgrading. When Apport (crash message) appears, that doesn't mean there's a serious error. It simply enables you to easily file bugs so that issues can be fixed. Most of the time, these messages doesn't really cause any problems.

There are benefits from using 12.04, such as the new Unity shell which is very nice when you get to know it. But there's nothing wrong with sticking with 10.04 and upgrade when you feel comfortable with it. It will not nag about upgrades. When there are updates for 10.04, you'll get a button that you can click to upgrade to 12.04 instead, but that's entirely optional and it's the same dialog that would appear in any case, so it's not disturbing.


compiz --replace kills and replaces the current running compiz with a new process, that's why the screen flashes. It doesn't gives the command prompt back because it runs in foreground. If you have problems with compiz, run compiz --replace & so it goes background and you get the prompt back.


Support for Thunderbolt connection devices in Linux?

The best information I've been able to find so far was this proposal for a talk at the upcoming Linux Plumbers Conference by a member of Intel’s LAN Access Division (LAD):

  While there is no real immediate need for added software, LAD will be supplying initial software for peer-to-peer use in Linux and other OSes. LAD will also be working on enablement code for Open Source OSes so that others will be able to use that code. LAD may also supply other use case but initially only peer-to-peer will be done. LAD has not come up with all the use cases that the Open Source community and other are going to come up with for this technology.

The conference is scheduled for September 9th and I'm sure whatever he presents will be covered by typical Linux media, so I guess we'll know then.


Ubuntu 20.04.1 installation fails to boot on dual-booted laptop with Windows 10

Oldfred has provided an answer using the boot-repair summary. My computer was using Intel RST and RAID which meant that Ubuntu could not boot. I turned this off and Ubuntu loads just fine.


How to Fix /home/braedon/Public/VideoE…/DaVinci_Resolve_14.1_Linux

The file properties dialogue didn't display the full path, that's why you see VideoE… in that path. As a workaround, try dragging the file into the terminal, the full path, quoted if necessary, will be pasted instead.


absolute paths of lines in a file matching a pattern

If you're looking for header files that are contained, directly or indirectly, in the current directory--and assuming they all have .h suffixes an no other files are named that way--you can just search for files whose names end in .h:

find "$PWD" -name '*.h' >file.txt

You can write "$(pwd)" in place of "$PWD" if you like. If you had literally used "${pwd)", as shown in your question, then that won't work, because you cannot close an opening { with a ). But you were on the right track, because using . would just give you relative paths instead of absolute ones.

The reason name "#include" doesn't work is that -name specifies a name or pattern to be matched by filenames. When you include a header file in C, you do use the #include directive, but this is not part of the name.

On the other hand, if you only want to find header files that are used in your program, or you want to find header files that are contained outside the program's directory tree (which I presume to be the current directory), then you may need to examine the contents of files.

You might be able to obtain the information from a file like Makefile or CMakeLists.txt, if you're using such a system. Otherwise, or if that turns out not to give you what you need, then you'll want to look into what features your compiler provides to do this. If you're using gcc or clang, that's the -M and -MM options. The difference is that -MM doesn't list system headers. The format this shows is, for each filename.c file passed to the compiler:

filename.o: filename.c headers...

where headers... is a list of paths to header files, separated either by spaces or by a space followed by a backslash followed by a newline, depending on how long the paths are.

The output is shown this way because its main purpose it to specify dependencies for building each translation unit of a program or library. The syntax emitted can be used in a makefile. Based on your description, it sounds like this isn't the syntax you want. You can likely process the output into the format you need. (For example, if none of the headers have whitespace characters in them and you're okay with duplicates, you could pipe the output to a command like grep -oP '\S+\.h(?:\s|$)'.)

Because I don't know quite what header files you actually need to list--and that you may have to experiment to find that out for yourself--I've refrained from covering that aspect of the matter in detail. Once you figure out exactly what headers you need and how they should be figured out, whatever text processing remains will likely be the simpler part.

gcc and clang also support an -H option, which you might try, but I am guessing it will tend to give much more output than you want. See How to tell where a header file is included from?; man gcc; and the GCC reference manual, especially section 3.12, for more information.


How can I print the output of pv each on a new line as it changes?

The problem is that pv will do no output if stderr is not a terminal, so add -f. You also need to move stderr to the pipe:

pv -f largefiles 2>&1 >newlargefiles | stdbuf -oL tr '\r' '\n'

Depending on your usage, you may not need the stdbuf -oL, as noted by @kos.


What causes hibernation image to swap file not getting loaded?

EDIT: broke again... below didn't work
Solved by using fix from this question:
How to resume Ubuntu 18.04 after hibernate?
Resume:
After installing with swap partition instead of a swap file I hibernated without issues until the 2nd hibernation and everything broke again. This time I got a pre log error:
"PM: image not found"
And a post hibernation log error:
"Inconsistent memory map" and "image mismatch"
I found several topics pointing to issues with ACPI and graphic card drivers. Ended up putting "nomodeset" in my grub configuration and this works. Its probably a workaround and not a fix but it works for me. I don't have the time to find the driver / module breaking this.


How to install Google Chrome version 88 for ubuntu?

There has been a similar question asked here and has several answers, but many of them seem outdated.
This site mentioned in one of the answers still works, but it doesn't happen to have version 88, only 86 and then 90.
However, this Google search (also mentioned in one of the answers) can find mirrors of Google Chrome repository that hopefully still have old versions. Using this search, I found that version 88 is available here. However, it's not clear what a site is this, so better verify your download.
If you don't necessary need actual Chrome (with all Google add-ons), you can apparently download any version of Chromium from their build archive, but it seems that the process of finding a particular version is not very straightforward and it requires you to know an exact version number (like "88.x.y.z"). I did a search on this archive for you and seems that Chromium version 88 can be found here - however, I don't know which of the various files present there are actually needed, is this only "chrome-linux.zip" or something more...
I also found that official Debian repository for Chromium still has version 88. (I'm using Debian repo, as in Ubuntu Chromium is now installed via snap, which means older versions are not available).


system-config-kickstart has no installation candidate in Ubuntu 20.04 desktop

The package was removed after 19.10 because Python 2 deprecation, but you can still get and install it manually:
mkdir -p ~/Downloads/sck

cd ~/Downloads/sck

wget http://old-releases.ubuntu.com/ubuntu/pool/universe/p/pygtk/python-gtk2_2.24.0-6_amd64.deb
wget http://old-releases.ubuntu.com/ubuntu/pool/universe/p/pygtk/python-glade2_2.24.0-6_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/s/system-config-kickstart/system-config-kickstart_2.5.20-0ubuntu25_all.deb

sudo apt-get install ./*.deb

and enjoy.


How to install newer versions of the Linux kernel?

Warning.

This can break your system. The  NVIDIA and ATI/AMD drivers and the broadcom wireless will most likely not work on this yet.

I would advise against it but if things get messed up you should be able to fix it by booting an old kernel and removing this one. Something like this ...

Boot from CD
mount -o bind /dev  /dev
mount -o bind /proc  /proc
chroot
apt-get install
update-grub

From comment by Tomas an easier method:

By entering GRUB through holding shift during boot you can enter the "Previous versions" of Linux. There you can select your old kernel, which is by default not removed.

  Now if you still want it ...

Download the three .DEB files with the name starting with linux from here: http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.4-precise/

Example for i386 (take the 2 with amd64 in the name for 64-bit and pae in the name for i386 with 4+Gb memory; check uname -a if you are unsure!):

linux-headers-3.4.0-030400_3.4.0-030400.201205210521_all.deb
linux-image-3.4.0-030400-generic_3.4.0-030400.201205210521_i386.deb
linux-headers-3.4.0-030400-generic_3.4.0-030400.201205210521_i386.deb

  Install all 3 packages ...

Example for i386

sudo dpkg -i linux-headers-3.4.0-030400_3.4.0-030400.201205210521_all.deb
sudo dpkg -i linux-headers-3.4.0-030400-generic_3.4.0-030400.201205210521_i386.deb
sudo dpkg -i linux-image-3.4.0-030400-generic_3.4.0-030400.201205210521_i386.deb

  Reboot your system ...

sudo reboot

  Test it ...

uname -r

This should show a kernel with 3.4 in the name.

  Now for the good news ...

"This release includes several Btrfs updates: metadata blocks bigger than 4KB,
much better metadata performance,
better error handling and
better recovery tools.
a new X32 ABI which allows to run in 64 bit mode with 32 bit pointers;
several updates to the GPU drivers: early modesetting of Nvidia Geforce 600 'Kepler', support of AMD RadeonHD 7xxx and AMD Trinity APU series, and support of Intel Medfield graphics;
support of x86 cpu driver autoprobing, a device-mapper target that stores cryptographic hashes of blocks to check for intrusions, another target to use external read-only devices as origin source of a thin provisioned LVM volume,
several perf improvements such as GTK2 report GUI and
a new 'Yama' security module."
You can help test official 3.4 support in 12.04 by following these instructions: http://www.theorangenotebook.com/2012/06/call-for-testing-1210-kernel-on-1204.html


ModuleNotFoundError: No module named 'distutils.util' after upgrading to Ubuntu 20.04

I solved this by creating a new virtual environment running Python 3.8.


How to fix the ubuntu splash loading bar showing up on the desktop view?

Short term fix

This is the Plymouth splash screen. As a short term fix you can disable it by editing the file /etc/default/grub with sudo powers and searching for this line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

Remove the splash parameter so it looks like this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet"

NOTE: You may have other options besides quite splash. Only remove the splash option.

Save the file and exit your editor. Then use:

 sudo update-grub

On the next reboot instead of the purple splash screen with moving dots you'll have a plain black screen instead.

Long term fix

From the terminal use:

$ systemctl list-units --all plymouth-quit-wait.service
UNIT                       LOAD   ACTIVE   SUB  DESCRIPTION
plymouth-quit-wait.service loaded inactive dead Hold until boot process finishes up

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.

1 loaded units listed.
To show all installed unit files use 'systemctl list-unit-files'.

Above is the the normal output. Compare yours and report any differences in your question.

Next step is to look for error messages using:

$ journalctl -b-1 | grep -i plymouth
Apr 03 05:36:13 alien systemd[1]: Starting Show Plymouth Boot Screen...
Apr 03 05:36:14 alien systemd[1]: Started Show Plymouth Boot Screen.
Apr 03 05:36:14 alien systemd[1]: Started Forward Password Requests to Plymouth Directory Watch.
Apr 03 05:36:14 alien systemd[1]: Received SIGRTMIN+20 from PID 389 (plymouthd).
Apr 03 05:36:15 alien systemd[1]: Starting Tell Plymouth To Write Out Runtime Data...
Apr 03 05:36:15 alien systemd[1]: Started Tell Plymouth To Write Out Runtime Data.
Apr 03 05:36:15 alien systemd[1]: Received SIGRTMIN+21 from PID 389 (plymouthd).
Apr 03 05:39:32 alien systemd[1]: Starting Show Plymouth Reboot Screen...
Apr 03 05:39:33 alien systemd[1]: Received SIGRTMIN+20 from PID 20980 (plymouthd).
Apr 03 05:39:33 alien systemd[1]: Started Show Plymouth Reboot Screen.
Apr 03 05:39:34 alien systemd[1]: Stopped Forward Password Requests to Plymouth Directory Watch.

Once again the above is normal output.


Why does this awk script that runs on CentOS not run on Ubuntu?

As noted in the The GNU Awk User’s Guide

In many awk implementations, including gawk, the keyword function may
be abbreviated func. (c.e.) However, POSIX only specifies the use of
the keyword function.

So the error is possibly because the implementation of awk on your Ubuntu system is mawk, or that something (such as a POSIXLY_CORRECT environment variable) is affecting how gawk behaves on your system.
Ubuntu used to ship with mawk as the default awk - but as far as I know, all currently supported versions use gawk by default. If you installed mawk via the packaqge management system, you should be able to use the update-alternatives mechanism to query/set the default ex.
update-alternatives --query awk

sudo update-alternatives --config awk


Ubuntu asks for Wifi password during startup even though it remembers it

Network Manager saves the passwords in your keyring, which doesn't get unlocked until you login. You can stop it from connecting before you login by unchecking "Available to other users" in the connection settings.


You would not notice any difference unless you ran out of RAM. At that point, there would be a monumental slowdown no matter if you used SSD or HDD. (Unless you have one of those fancy PCI-SSD things that are new from Intel.) However, if you plan on hibernating your computer, then there would be a slightly faster performance increase on the SSD.

When editing /etc/fstab, remember to mount and partition correctly. Backup your windows partition when resizing with gparted.

Note: Hibernation is disabled by default, as it is not compatible with many computers.


How to hide machine name from displaying in terminal session screen

Yes. Open ~/.bashrc file from terminal with:

gedit ~/.bashrc

Find this line (in my case is somewhere at line 60):

PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '

and replace it with:

PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '

As you can see, the most important thing is to delete \h (which stands for hostname) from PS1 if you want to hide machine name from displaying in terminal.

Save the file and close it. Restart the terminal, or just type:

. ~/.bashrc


Play on Linux is broken for Ubuntu 12.10 (64bit)

Open your terminal and paste this code. this will sort out your problem.

wget -q "http://deb.playonlinux.com/public.gpg" -O- | sudo apt-key add - sudo wget http://deb.playonlinux.com/playonlinux_natty.list -O /etc/apt/sources.list.d/playonlinux.list sudo apt-get update sudo apt-get install playonlinux

Hope that helps.


Cant mark minecaft as executeable in xubuntu 14.04

It's very easy. First, open a Terminal and navigate to the directory that Minecraft.jar is in by typing cd /home/yourusername/Desktop if it's on your Desktop. Then type chmod +x Minecraft.jar. You may have to change the Minecraft.jar part if you have changed the file name.


Why can't I access hw:1,0 until gstreamer-properties is run once?

I'd guess it initializes some mixer controls your devices.

Try running amixer --card 0 and 1 before and after, and compare the outputs.


How do I change fonts and adjust their size?

Ubuntu 18.04 and later versions
The latest Ubuntu uses GNOME Shell. You can change the fonts using the "GNOME Tweaks" (gnome-tweak-tool) program.
Install the program using Ubuntu Software:

And change the font and font size.

13.04 - 17.04
For Unity interface users, customisation of fonts can be done using unity-tweak-tool

For 12.04:
For Unity interface users, they have their own tweak-tool. Customisation of Fonts in 12.04 can be done through myunity


How do I take a screenshot of more than my desktop?

I use shutter:

sudo apt-get install shutter

you can then select:

Desktop -> Capture all workspaces
Selection
window, context menu, etc.


find out the location of where a process was executed

So you got the process id, you can then look around the /proc/ virtual file system. Everything is there. For e.g.

/proc/23124/cwd - the current directory of process 23124
/proc/23124/cmdline - the full command line of the process.


Wifi stopped working on Acer Aspire 3680 using 11.10

I traced the issue to the SmartLink proprietary modem driver. It basically broke my ability to sign onto a WiFi network. Disabling it immediately restored wifi.


No there isn't.  It doesn't exist.  The assumption is that if you're editing the sudoers file that you understand the rammifications of the thing.  The requisite is that all people that understand those rammifications actually know how to use vi.


How to launch a new instance of Google Chrome from the command line?

This is a known bug. A workaround posted there is to pass the argument --user-data-dir=/tmp (with a temporary or empty directory) to start a new session.


my windows phone is not getting detected on ubuntu 14.04, how can i make it happen?

Try installing mtp-tools and mtpfs.

In terminal (ctrl+alt+t enter

sudo apt-get install mtp-tools mtpfs

hit enter, reboot after install and try again. Your phone must be unlocked to gain access to the file system.

Hope this helps, good Luck!

[edit]
If it does not help, there is a more complex solution to this problem (create an udev rule) here:
How to connect Nokia Lumia 520 to Ubuntu 12.04

You won't need to add the repository they are speaking of, since mtp support is already present in 14.04 (was not in 12.04)
[/edit]


WACOM Tablet will only work if plugged in USB at boot time

This should do the trick

here is a quick script that allows you to plug and unplug a wacom tablet from your system without restarting the computer

#!/bin/bash
WACOM=`lsusb | grep -i wacom | awk '{print $7}'`
 if [[ $WACOM = "Wacom" ]]; then
    echo" you will have to enter your password " \n
    sudo modprobe -r wacom;
    sudo modprobe -a wacom;
 else
    echo " no wacom was found check usb" \n
  fi
  exit


Brightness function keys not working in 12.04.3 LTS?

You're on the right track. Try this instead:

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


Cannot install docker on Ubuntu 20.04 LTS

I had some similar errors that were a result of my VPN interfering with docker creating network interfaces. Turning off my VPN made it work.


Kerio supports Linux and MacOS as well as Windows, and is web-based, so your company made the right choice to enable you to go Linux. It gives you a number of choices, and I can think of three Outlook replacements which provide the functionality you seek:

Evolution
Thunderbird plus Lightning
Kontact with its Kmail and Korganizer

Also, you need not use Adobe Reader, as there are many apps which will read and display PDF files. Linux also has PDF editing apps available which will give you power beyond that of Adobe's Reader.


How can I change permissions of a folder, including its enclosed files and subdirectories?

From the screenshot it seems like the chmod command worked well. As you wrote chmod -R ug+rw it gave a read/write permission to the user and group of the recursive folders.

If you want to give everybody a read/write permission you should add 'a' to your command so that it will be chmod -R uga+rw.


Ubuntu Studio 20.10: Audacity 2.4.2 failing to record with Behringer UMC404HD interface

On UbuntuStudio, it's possible to record on Audacity using Ardour.
1- You need to install jack and studio controls and use studio controls to enable jack and make sure there is a Pulse Jack Bridge. This means that all outputs and inputs will be trapped by the jack server and the only option available on the system will be Jack sink (for the output) and Jack source (for the input).

2- The, the jack will be an available option on Audacity, but it really doesn't matter because all audio traffic will be redirected to the Pulse Jack Bridge.

I always use the jack server when recording audio. I hope this helps you to find the problem. I can tell you that I recorded an album using that interface and had no problem at all using UbuntuStudio.


Thank heavens I could recover all my files except two of them using a Windows system and Winrar. The problem was bad sectors. I could extract my files individually. I found that both Winrar and Tar don't extract the rest of an archive when they face a bad sector. I couldn't extract my files one by one by Tar but Winrar could do the job.


How can I set up a password for the 'rm' command?

There's no easy way to set up such a password on the rm command itself, not without a lot of code hacking that'll probably break things like apt-get installing packages and removing files, and making you have to enter the password a thousand times, or potentially disrupting access to the command to people who would need it (like you, to delete your own files).  You can sort of do this by having multiple user accounts and multiple access permission sets, and restricting access to different sections of data, such as your home directory so they can't get to it.

(The other option is individual user accounts for each users, and then Access Control Lists, as is detailed in the other answer that was posted by Videonauth)

Here's the core problem - you're letting your friends use your system.  This has numerous security implications - the concept of "anyone with physical access to the box is going to be able to control the system and do any tasks" is an IT Security Mantra, which is why you don't 'share' physical systems access except with trusted authorized personnel.

The only truly sane way to do this is to not give your friends access to your computer, and give them a 'dedicated "Guest" system' that they can use, that you don't really care about the files on as much.  This is the most 'secure' way to keep your files safe.

Of course, if that's not an option, then your only really safe option is to configure multiple user accounts, one for each user, with different home folders, and do not allow them access to your own home directory or access to any other user's home directories.  And then keep everything you don't want them touching in your home directory, and don't give them sudo access, the root password, or share your password with them.

This is how you'd do this:

Let's say my name is "Foo" and I want user "Bar", a friend, to use my system but not access my files.  The first step is to deny access to anyone but me to my home directory.  This is to permit other users to not delete your files, but to also prevent other users from snooping around in your home directory and seeing what types of stuff you've got in your home directory:

chmod 750 /home/Foo

The second step is to create a user account for "Bar" (do NOT type what's in parentheses below, it's for information purposes only).  This way, we can make sure he has his own separate set of access rights:

sudo adduser --create-home --user-group --shell /bin/bash Bar
sudo passwd Bar
(set a temporary password - you will not see characters as you type though)

The third step is to then restrict their home directory too so nobody can pry into their files either.  This is just making things equal.

sudo chmod 750 /home/Bar

Wash your hands, rinse them off well, then repeat these steps for however many users you have on the system.  They won't be able to access your files, and since you're not going to give them administrator privileges, they can't delete your files without attempting to sudo to do so - since you don't permit this, they can't touch your stuff.  And they won't be able to see your files either, without becoming superuser, which won't happen here.

ALWAYS REMEMBER THIS: By giving someone physical access to the machine, or access in general, you are going to put your files and data at risk.  This is a widely-accepted fact in the IT Security world, and one that continues to hold true.  Giving your friends access to your computer will always put your data at risk, so either give them their own system to mess around with, or just don't give them access to your machine.

Just a note on disk encryption

While disk encryption works well to protect your data from a third party, there's limitations.

If the system is on, the disk is already decrypted, so you're at risk.
Some systems have broken disk encryption approaches.  For example, some Acer systems use your password to only authorize the encryption/decryption and use hard-coded passwords, or use weak encryption that is easily cracked.
There are always methods to break into the 'keys', or try to extract them from memory just after a system is turned off but before the RAM data is 'gone' or deteriorated.  (I will not go in depth on these, but these risks do exist).
Physical access to the machine, whether the system is encrypted or not, will always put your data at risk.  Don't give physical access (or remote network access) to people you don't want to potentially give full access to your system to.

While Disk Encryption doesn't solve these problems, it puts extra layers of headaches for a threat actor.  Someone who is a bad guy might give up if it's encrypted, or they may torture you (queue obligatory XKCD Security comic strip).

Therefore, if your system is encrypted, but you're letting other users use it, either they have a password to decrypt, or you're leaving your laptop decrypted so they can SSH in or have physical access.  In both these cases, it's bad.

That said, if your system is not encrypted, then this section has no relevance for you.


Users that aren't sudoers can't write SD images

If your son is using Etcher, there is no way to prevent privilege escalation because Etcher always tries to escalate privileges when trying to write, even if it doesn't have to.

If he is using dd, you can simply provide user access to the device using a udev rule.

If you want to limit it to a specific SD card, first run the following command with the sdcard inserted:

udevadm info -a /dev/mmcblk0 | grep cid

and note down the value in quotes.

Now create the file /etc/udev/rules.d/50-mmc-uaccess.rules with the following contents:

ACTION=="add", SUBSYSTEM=="block", KERNEL=="mmcblk*", ATTRS{cid}=="[card's cid]", TAG+="uaccess"

Replace [card's cid] with the value you noted down.

If you want to provide access to every SD card, just omit the ATTRS... part:

ACTION=="add", SUBSYSTEM=="block", KERNEL=="mmcblk*", TAG+="uaccess"

Now you can dd to it without sudo.


What could be a reason for `.bash_profile` and `.bashrc` not to execute the exports?

When you log in graphically in Ubuntu, .bash_profile will not be read, but .profile will (sourced by sh). So if you put those exports in .profile, then log in again, the environment variables should be available.

Also see http://mywiki.wooledge.org/DotFiles and https://help.ubuntu.com/community/EnvironmentVariables


PulseAudio streaming over network not working

Looks like after a reboot in both machines, and installing paprefs in Ubuntu it worked.


If i Install Ubuntu on an External Drive using Wubi, does it do anything to my C: Drive?

That's your solution. You must install Ubuntu with Windows. Before you installed Ubuntu instead Windows.
http://www.ubuntu.com/download/desktop/install-ubuntu-with-windows


After many trials, a simple solution worked for me:

reboot the system;
enter BIOS setup;
go to "Boot sequence";
create a new boot option with path EFI\ubuntu\grubx64.efi;
move this new option to first place;
save and exit.


Could not install node.js on ubuntu14.04

I think you can lost package and You run command:

LPB_Tandn_IT:~ tannetto$ apt-get install nodejs-legacy

and nodejs worked again!
and If not worked, You can create symlink:

Doing a symlink solves the issue: ln -s /usr/sbin/nodejs /usr/sbin/node.


Have more than one mysql version installed at a time

There are problems here in attempting to do what you are asking and keeping your package manager happy.

Off the top, I see two choices here:

compile/install from scratch to an entirely different directory hierarchy
If I recall, there is a way to install packages using a different base root directory.  Do that and then manually make the necessary changes.

Either way, there could be some effort involved.


How can I make a shortcut to raise an application's window if it exists?

The method in drizzle's answer will work, but has a few downsides

It has a delay; when pushing the Super key, you'd have to wait about a second to make the numbers appear.
The order of the items in the launcher might be changing, depending on the applications you run. The number of Chrome might be different then.

Alternative option

You could simply do with the command:

wmctrl -a chrome

which will raise the first found window with "chrome" in its name. That would however also raise the window I am writing in now (a firefox window, named: "Shortcut to open current Google Chrome...")

The use of the window's pid will prevent this. In my opinion, it is therefore more elegant to put the command:

wmctrl -ia "$(wmctrl -lp | grep "$(pgrep chrome)" | tail -1 | awk '{ print $1 }')"

under a shortcut key (Alt+1 will work), given the fact that you'd need to have wmctrl installed then:

sudo apt-get install wmctrl

How to add the command to a shortcut

Install wmctrl

sudo apt-get install wmctrl

create a small script (open an empty file, paste the script below in it)

#!/bin/bash
wmctrl -ia "$(wmctrl -lp | grep "$(pgrep chrome)" | tail -1 | awk '{ print $1 }')"

Save it as raise_chrome.sh
Add the script to a shortcut; choose: System Settings > "Keyboard" > "Shortcuts" > "Custom Shortcuts". Click the "+" and add the command:

/bin/bash /path/to/raise_chrome.sh

to (e.g.) the shortcut Alt+1.

N.B. Use an absolute path, not e.g. ~

Explanation

The command is in fact a "conversion" of this one, and the explanation is similar:

In the section:

"$(wmctrl -lp | grep "$(pgrep chrome)" | tail -1 | awk '{ print $1 }')"

the command:

wmctrl -lp

lists all windows, including their pid and window- id. The result is piped to

grep "$(pgrep chrome)"

which filters (lists) all occurrences of Chrome windows.

Then,

tail -1

will give us the last item in the list, which is the latest created window (since wmctrl lists windows chronologically).

awk '{ print $1 }'

finally, will give us the first string in the line (from the output of wmctrl), which is the window- id.

The command:

wmctrl -ia <window_id>

Will then raise the last created window of Chrome

Note

No need to say that you can replace chrome in the command by any other application (process name), and place them under separate key combinations.

EDIT

use the application as an argument

Since you mention  Sublime Text, Terminal and Chrome, you might want to use multiple shortcuts, and run the script with the application as an argument.

To do so

Use the script with slight difference:

#!/bin/bash
app=$1
wmctrl -ia "$(wmctrl -lp | grep "$(pgrep "$app")" | tail -1 | awk '{ print $1 }')"

and run it subsequently with the commands under the shortcut keys:

sh /home/jacob/Bureaublad/raise.sh sublime_text
sh /home/jacob/Bureaublad/raise.sh gnome-terminal

and

sh /home/jacob/Bureaublad/raise.sh chrome


unity-control-center Could not find settings panel "printers"

I installed this:
sudo apt install system-config-printer-common system-config-printer-gnome

And then Printers came back.


By default ls colors in green executable files. If you do ls -l you get the access flags and the executable files have the 'x' flag(s):
-rwxrwxr-x 1 me me 0 Jun 14 01:20 foo-exec
-rw-rw-r-- 1 me me 0 Jun 14 01:20 foo-nonexec

Instructions to install Gimp plugins on Linux and OSX usually mention that the files should have the executable bit set (chmod +x <file>).
The executable flag is preserved by the ZIP format, so if the file was executable when it was put in the ZIP then unzipping restores the flag and it is set automatically. By contrast there is no provision for such flags in the HTTP protocol so when you download a file it loses its executable status in the process and you have to restore it on the downloaded file.


Fn keys do not work while playing games in full screen

You can give a try to this option. You'll get a lot of configuration to set your own Shortcut Key for Sound and Media.
Follow these steps:

Open Keyboard from System Settings (Search in dash)

Chose Shortcuts tab

Go to Sound and Media you will get a bunch of options.

I am attaching a screenshot which is my configuration. I changed to Sound Keys to Shift++, Shift+-, Shift+) since I don't have multimedia keyboard and it works fine for me.

(source: akamaihd.net)
Changing Shortcut Keys would help you somewhat! Reply if something goes wrong..


Can a Network Share tab be added to Nemo in Ubuntu 16.04

sudo add-apt-repository ppa:webupd8team/nemo
sudo apt-get update
sudo apt-get install nemo nemo-fileroller

sudo apt-get install nemo-share
    thenreboot`.


File doesn't open using fopen() function in C

this statement

if((fp = fopen(fname, "w")) != NULL) {

should be:

if((fp = fopen(fname, "w")) == NULL) {

I.E. the posted code is checking for the success condition and calling it an error

on a related note:

this statement:

free(fp);

is NOT how to close a file

rather use:

fclose( fp );

also,

df

tells disk space usage

To display the information about files use:

ls -al

Strongly suggest making extensive use of the man pages for any functions you want to use.


How to stop an application from automatically starting

Open the launcher, launch the program "Startup Applications", untick the box of the program that should not open automatically.


How to make a bootable pendrive in command-line?

You can use the dd utility.

First unmount your usb-drive and then get the device name with:

lsblk

Then create the bootable usb with:

sudo dd bs=4M if=/path/to/your.iso of=/dev/xxx && sync

Change /dev/xxx to your usb-drive device name.


Upgrading to Ubuntu 20.04 LTS solved it.


How to connect to my own WiFi using Broadcom STA drivers?

Solved. Linux sux at wireless drivers, 'cause a lot of them has a limit of 11 channels out of 13 available. Moreover, even the network working in 40MHz mode, is ivisible, untill the first channel is under 5. 20MHz mode works from channel 1 to 11.

What's more amazing, is that my network, working on channel 5 now is recognised by Ubuntu as channel 7...

Question to drivers programmers and all that stuff: are you insane to make it different than in router that works on same type of kernel and is fully compatibile with e.g. Windows? -.-


How do I restore Boot GUI and Login of Ubuntu 13.10 to the original?

Set Lightdm as default Desktop Manager:

sudo dpkg-reconfigure lightdm

Uninstall Xubuntu:

How to remove xubuntu-desktop?


If you have no extensions installed, try removing your ~/.LibreOffice and ~/.OpenOffice folders as well. If that doesn't work try reinstalling.

Btw, check in synaptic and ensure that all the libreoffice packages are installed - I have a gut feeling that only the core got installed somehow.


One possible solution is to install my rEFInd boot manager, along with an EFI filesystem driver (provided with rEFInd) for whatever filesystem holds your Linux kernel (probably ext4fs). You'll need to install the driver manually in OS X, but it's not difficult -- it's just one file that needs to be copied. Once this is set up, rEFInd should detect your Linux kernel(s) and enable you to boot them directly, bypassing GRUB.


If you cannot change the drives back on the original controller and you do not have a backup of your files - which you should have - then R-Studio might help you here.

R-Studio

But if you can change back to the old controller - and you love your data - then this would be easier and more reliable than using a software to fix arrays ...

Good Luck!


You can erase a  partition using Disk Utility. Boot to Mac OS X, start up Disk Utility, select your harddrive, click Partitioning, click the partition and then click the - . If you want, you can now extend other partitions to use the freed up space by dragging their handles. Then click Apply and you are done.


Which Compression Format will give the least size

I just did a test with the supported formats on File Roller (the default archive manager, ak. Archive Manager) and this result is based on the selected .pdf and as you can see it's sorted by Size:

As you can see the Compression Format that won it was: .xz