How do I turn off Caps Lock (the lock, not the key) by command line?

I don't know of any command line tool for that in Ubuntu. (For Num Lock, there is numlockx .) Here's a one-liner that you can copy-paste into a terminal window:

python -c 'from ctypes import *; X11 = cdll.LoadLibrary("libX11.so.6"); display = X11.XOpenDisplay(None); X11.XkbLockModifiers(display, c_uint(0x0100), c_uint(2), c_uint(0)); X11.XCloseDisplay(display)'

Here it is again in a more expanded form. We use the Python ctypes library to call C functions from the X library directly. The function XkbLockModifiers changes the state of the keyboard locks, on the core keyboard (XkbUseCoreKbd = 0x0100), affecting Caps Lock (2), setting it to 0 (off).

#!/usr/bin/env python
from ctypes import *
X11 = cdll.LoadLibrary("libX11.so.6")
display = X11.XOpenDisplay(None)
X11.XkbLockModifiers(display, c_uint(0x0100), c_uint(2), c_uint(0))
X11.XCloseDisplay(display)

If you have a stuck modifier, change 2 to the mask of the modifiers you want to turn off. The modifiers are 1=Shift, 2=Lock (Caps Lock), 4=Control, 8=Mod1, 16=Mod2, 32=Mod3, 64=Mod4, 128=Mod5. Run xmodmap -pm to see what Mod1 through Mod5 correspond to. For example, to turn off all modifiers, call X11.XkbLockModifiers(display, c_uint(0x0100), c_uint(255), c_uint(0)). To turn on Num Lock which is on Mod2 and at the same time turn off Caps Lock, call X11.XkbLockModifiers(display, c_uint(0x0100), c_uint(2 | 16), c_uint(16)).

Here's a C version if you want to make a small binary instead of invoking Python. Compile with gcc -O -Wall -o caps_lock_off caps_lock_off.c -lX11, with the packages build-essentials and libx11-dev installed.

#include <stdio.h>
#include <X11/X.h>
#include <X11/XKBlib.h>
int main()
{
    Display *display = XOpenDisplay(NULL);
    if (display == NULL) {
        fprintf(stderr, "Couldn't open display\n");
        return 2;
    }
    Bool sent = XkbLockModifiers(display, XkbUseCoreKbd, LockMask, 0);
    if (!sent) {
        fprintf(stderr, "Couldn't send LatchLockState\n");
        return 1;
    }
#ifdef REPORT_STATE
    XkbStateRec xkb_state;
    Status status = XkbGetState(display, XkbUseCoreKbd, &xkb_state);
    if (status) {
        fprintf(stderr, "XkbGetState returned %d\n", status);
        return 1;
    }
    printf("state.group=%02x\n", xkb_state.group);
    printf("state.locked_group=%02x\n", xkb_state.locked_group);
    printf("state.base_group=%02x\n", xkb_state.base_group);
    printf("state.latched_group=%02x\n", xkb_state.latched_group);
    printf("state.mods=%02x\n", xkb_state.mods);
    printf("state.base_mods=%02x\n", xkb_state.base_mods);
    printf("state.latched_mods=%02x\n", xkb_state.latched_mods);
    printf("state.locked_mods=%02x\n", xkb_state.locked_mods);
    printf("state.compat_state=%02x\n", xkb_state.compat_state);
    printf("state.grab_mods=%02x\n", xkb_state.grab_mods);
    printf("state.compat_grab_mods=%02x\n", xkb_state.compat_grab_mods);
    printf("state.lookup_mods=%02x\n", xkb_state.lookup_mods);
    printf("state.compat_lookup_mods=%02x\n", xkb_state.compat_lookup_mods);
    printf("state.ptr_buttons=%02x\n", xkb_state.ptr_buttons);
#endif
    int err = XCloseDisplay(display);
    if (err) {
        fprintf(stderr, "XCloseDisplay returned %d\n", err);
        return 1;
    }
    return 0;
}

Also possibly of interest is a way to temporarily ignore Caps Lock:

xkbset nullify lock

After this, Caps Lock will effectively be permanently off, until you reenable it with xkbset nullify -lock.


Totally new to Ubuntu. Need help with nVidia drivers

As you are using very new GPU hardware, it is recommended to also use the latest stable drivers.

Install the latest stable NVIDIA drivers supporting 980Ti from the Proprietary GPU drivers PPA.

Open a terminal and execute :

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-352
sudo reboot


Ubuntu bootx64.efi not detect grub.cfg file on NTFS partition

When GRUB loads grub.cfg from the EFI partition, it sets your EFI partition as the root for GRUB. In order to load another grub.cfg from another partition, you would have to change GRUB's root so it knows where to look for the second config.

Also, loading the ntfs module may be required. So, your menu entry would look something like this:

menuentry 'Windows' {
  insmod part_gpt
  insmod ntfs
  set root='hd1,gpt2' #This is where you tell grub where to start searching for the new config file
  configfile ${root}/path/to/grug2.cfg
}

If the ntfs module cannot be loaded, copy it from Ubuntu's /boot/grub/x86_64-efi/ntfs.mod to /boot/efi/boot/grub.

Or you could hard-code it a bit more and make it more simple with something like this:

menuentry 'Windows' {
  insmod part_gpt
  insmod ntfs
  configfile (hd1,gpt2)/path/to/grub2.cfg
}

Note, this is not tested, but if you have any issues let me know and I'd be glad to help.


You can use CompizConfig to do this. (sudo apt-get install compizconfig-settings-manager in a terminal to install if it isn't on your computer already)

To open, type "CompizConfig" into your Dash, or ccsm in the terminal.

Once it's open, scroll to the "Expo" option, which can be found in the Desktop section (I assume this is in the default plugins but cannot remember for certain)

Click on Expo, and then on the Bindings tab, look at the top option (Expo key). Click on the right, where it says "<Super>s". Then either uncheck the "Enabled" box to disable it entirely, or click "Grab key combination" and enter a different combo to change it to something else. Click OK to accept your settings and you should be good to go.

Hope this helps!


How do I move my LVM 524GB root partition to a new smaller 500GB SSD - and make a backup prior to the move onto an external HDD?

After learning more about LVM2, I see that the above was a nontrivial question. Shrinking a root LV needs to be done from a live-cd, and anything else can be done on a running system.

But the best discovery I made is that between these two programs, one can do all the work inside a graphical user interface.

to install KDE use

sudo apt-get install kvpm

to install Partition Manager use

sudo apt-get install partitionmanager

And for doing an LV backup onto a different hard drive use the mirror option LVM offers.


How to Install python-node in Ubuntu 18.04

Node.js does not depend on Python. To install the node snap package open the terminal and type:

sudo snap install node --classic --channel 11/stable

python-node is a Node.js script runner for Python. To install python-node open the terminal and type:

sudo apt install python3-pip
python3 -m pip install --user python-node

Both Node.js and Python can run scripts interactively in a REPL. A read–eval–print loop (REPL), also termed an interactive top level or language shell, is a simple, interactive computer programming environment that takes single user inputs (i.e. single expressions), evaluates them, and returns the result to the user. Installing IPython (python3-ipython) allows the user to run blocks of code and scripts interactively in a more user-friendly way.


Preserving timestamps when extracting .tgz logs

This cannot be done with GNU tar. However there is a lesser known utility star, developed by Jörg Schilling, which will accomplish exactly what you are after. I will demonstrate how this works.

First we can examine a single file within a test tgz archive and demonstrate its timestamp, which I have highlighted below to make the terminal output perfectly clear:

andrew@ilium$ tar -tv --full-time -f test.tgz mp3enc31/readme.txt
-rw-r--r-- sir/inel        937 1998-11-06 00:28:41 mp3enc31/readme.txt
                               ^^^^^^^^^^

As you have found when you extract this file in the customary manner with tar the access time (and the change time) is altered. Again I have altered the terminal output to easily show this:

andrew@ilium~$ tar -xf test.tgz mp3enc31/readme.txt
andrew@ilium~$ stat mp3enc31/readme.txt
  File: readme.txt
  Size: 937         Blocks: 8          IO Block: 4096   regular file
Device: 801h/2049d  Inode: 56885505    Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 1000/  andrew)   Gid: (  100/   users)
Access: 2019-02-23 17:13:55.385500219 +1100     <--------------------
Modify: 1998-11-06 00:28:41.000000000 +1100
Change: 2019-02-23 17:13:55.385500219 +1100     <--------------------
 Birth: -
andrew@ilium~$

However if we use the star utility as sudo, (note that sudo is required for the ctime modification) you will see that all access times are preserved:

andrew@ilium~$ sudo star -xza -ctime < test.tgz mp3enc31/readme.txt
star: 62 blocks + 0 bytes (total of 634880 bytes = 620.00k).
andrew@ilium~$ stat mp3enc31/readme.txt
  File: readme.txt
  Size: 937         Blocks: 8          IO Block: 4096   regular file
Device: 801h/2049d  Inode: 59377688    Links: 1
Access: (0644/-rw-r--r--)  Uid: (30076/ UNKNOWN)   Gid: (30000/ UNKNOWN)
Access: 1998-11-06 00:28:41.000000000 +1100     <--------------------
Modify: 1998-11-06 00:28:41.000000000 +1100
Change: 1998-11-06 00:28:41.000000000 +1100     <--------------------
 Birth: -
andrew@ilium~$

The star man pages advise some caution with the -ctime option as it can confuse cron, the news system and even slow the system clock. So just be a little careful!

References:

man pages for star: Documentation for all of the options used above and demonstration of the many other options available.


This sounds like a levels problem.  You can check the levels in a few places.  Try the settings for your window manager.  If that doesn't help, try pavucontrol and if that still doesn't work, go to the terminal and try alsamixer


The name of the ubuntu 4 screens split window

What you are looking for is the workspace switcher, you can enable it in the system settings >> appearance >> behavior.

Then you can install unity-tweak-tool to configure them in workspace settings

sudo apt install unity-tweak-tool


Invoking command stored in a variable in zsh

You have two options:

Use an array instead of a string (recommended)

cmd=(ls -l)
$cmd

Split the string into words

cmd='ls -l'
$=cmd

Source: What is word splitting? Why is it important in shell programming?


update-grub not working -- No medium found

Solution from this comment on launchpad bug report:
Add a global_filter = [ "r|/dev/sda|", "r|/dev/sdb|" ] to the file /etc/lvm/lvm.conf :
 143         # Example
 144         # Accept every block device:
 145         # filter = [ "a|.*|" ]
 146         # Reject the cdrom drive:
 147         # filter = [ "r|/dev/cdrom|" ]
 148         # Work with just loopback devices, e.g. for testing:
 149         # filter = [ "a|loop|", "r|.*|" ]
 150         # Accept all loop devices and ide drives except hdc:
 151         # filter = [ "a|loop|", "r|/dev/hdc|", "a|/dev/ide|", "r|.*|" ]
 152         # Use anchors to be very specific:
 153         # filter = [ "a|^/dev/hda8$|", "r|.*|" ]
 154         #
 155         # This configuration option has an automatic default value.
 156         # filter = [ "a|.*|" ]
 157         global_filter = [ "r|/dev/sda|", "r|/dev/sdb|" ]

Run sudo update-grub before filter:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
GRUB-Konfigurationsdatei wird erstellt …
  /dev/sda: open failed: No medium found
  /dev/sda: open failed: No medium found
  .
  .
  .
Linux-Abbild gefunden: /boot/vmlinuz-5.4.0-52-generic
initrd-Abbild gefunden: /boot/initrd.img-5.4.0-52-generic
Linux-Abbild gefunden: /boot/vmlinuz-5.4.0-48-generic
initrd-Abbild gefunden: /boot/initrd.img-5.4.0-48-generic
  /dev/sda: open failed: No medium found
  .
  .
  .
Startmenüeintrag für UEFI-Firmware-Einstellungen wird hinzugefügt erledigt

Run sudo update-grub after filter:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
GRUB-Konfigurationsdatei wird erstellt …
Linux-Abbild gefunden: /boot/vmlinuz-5.4.0-52-generic
initrd-Abbild gefunden: /boot/initrd.img-5.4.0-52-generic
Linux-Abbild gefunden: /boot/vmlinuz-5.4.0-48-generic
initrd-Abbild gefunden: /boot/initrd.img-5.4.0-48-generic
Startmenüeintrag für UEFI-Firmware-Einstellungen wird hinzugefügt erledigt


How can I show all file types contained in a directory?

Although od -c will indeed show the contents of a file, it is not a good way to get its file type. While some files will contain a header with the file type, not all will. A better way is the command file:

$ echo "hello" > foo.txt
$ file foo.txt
foo.txt: ASCII text

So, to get a list of all file types in a directory, you can do:

for file in dir/*; do file "$file" | cut -d: -f 2; done | sort -u

Example output:

 PNG image data, 1500 x 500, 8-bit/color RGBA, non-interlaced
 ASCII text
 directory
 GIF image data, version 89a, 22 x 22
 ELF 64-bit LSB  executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=becf821e4d814fdb69306d0b3f686eb06992f5e5, stripped

Explanation

for file in dir/*; do ... done; : iterate through everything in dir (dir is just an example, you should change this to the name of the actual directory you want to search through), saving each item in turn as $file
file "$file" :  run file on each of the items found.
cut -d: -f 2 : print only the second field (fields defined by :)
sed 's/^ //; s/ +/ /g' : remove spaces from the beginning of the line and convert consecutive spaces into a single space.
sort -u : remove duplicate file types


Boot Issue - Constant Prompt to log in [18.04]

Clearing the cache with apt-get clear made it all work, thankfully.


Fortinet SSL VPN Client and Ubuntu 12.04

You probably have the Ubuntu 64 bit version (at least it was my case). If so, just install the following package:

sudo apt-get install libgtk2.0-0:i386 xterm


Cannot run Ubuntu 12.04.4 live or install Ubuntu

Could you try Ubuntu 14.04?  The B43 error you mention is a wifi error and could be solved by missing firmware.  I think it should be fixed in 14.04.

Also, maybe your Mother's laptop has a rootkit, have you scanned for those?


Lubuntu VM - how to make external monitor on left side of primary monitor

Found the answer. Well, for me, I was running lubuntu as a virtual machine and my host OS was windows 8 so I just went into the host OS display options and changed the monitor display settings from there and it took effect in the VM as well.


gnome: How to set lv3:rwin_switch xkb option in tweak tools

Perhaps adding a udev rule to run the same command when keyboard commands may solve the problem.

First connect your external keyboard, and do lsusb to find the hardware ID. It would look something like

Bus 002 Device 002: ID 04f2:0402 Chicony Electronics Co., Ltd Genius LuxeMate i200 Keyboar. The id is 04f2:0402.
Then we add a UDEV rule. To edit the file, do sudo nano /etc/udev/rules.d/00-usb-keyboards.rules, fill the text file with something like

ACTION=="add", ATTRS{idVendor}=="YOUR_VENDOR(04f2 for me)", ATTRS{idProduct}=="YOUR_PRODUCT(0402 for me)", RUN+="/usr/local/bin/kbd_udev", OWNER="USERNAME"

Note that you should change the USERNAME field.
And with this we tell udev to run the script whenever the device with matching vendor and product ID is connected.
Now we get to the script file /usr/local/bin/kbd_udev, do sudo nano /usr/local/bin/kbd_udev and fill it in with the script below

#!/bin/bash
export DISPLAY=:0
su YOURUSERNAME -c "setxkbmap -layout us -variant altgr-intl -option '' -option caps:escape -option altwin:swap_alt_win lv3:rwin_switch" &> /tmp/kbd_temp

Again, make sure to change YOURUSERNAME with your username.
After writing the script, you need to make it executable. To do so..

sudo chmod 755 /usr/local/bin/kbd_udev

Finally, tell udev to reload it's rules, run udevadm control --reload-rules
Optional, but you can test to see if the command worked, by looking in the /tmp/ directory. Do cat /tmp/kbd_temp, if there are any errors, you should be able to see them.


To run gcp or any program requiring dbus from a text session, you can use the command dbus-launch, as in the following example:

dbus-launch gcp -r dir1 dir2


You need downgrade your libuuid1 version from 2.27.1-6ubuntu3.1 to 2.27.1-6ubuntu3.

You can use apt-get to do a downgrade, refer to this answer.

sudo apt-get install <package-name>=<package-version-number> OR
sudo apt-get -t=<target release> install <package-name>

If you are using synaptic package manager, you can also just simply select the package (in your case, search and select libuuid1), and go to menu Package > Force Version.. to choose the version you would like to install, then click Apply.


You're probably missing the file below when you installed Ubuntu.

/boot/grub/core.img

So you need to use chroot to have it fixed. Take a look at this site


Diskspace status bar missing after ubuntu 13.04 update

Unfortunately you cannot, because makers of Nautilus (now called "Files") removed it along with many other usefull features. I miss this feature too. Only thing lef to do is to look for another file manager.


Nvidia graphics drivers are not working on persistent drives

The video driver needs to load before the persistence file and that is not possible.

Nvidia drivers DO work with a Full install to USB, Nvidia is now smart enough to not load the drivers on a computer that does not have an Nvidia card.

You need a bigger drive for a Full install, at least 8GB.

Step by step instructions are here: How to keep files on usb after rebooting?

If all you need is to add nomodeset to your boot, edit grub.cfg, syslinux.cfg or txt.cfg similar thus:

menuentry "Ubuntu persistent" {
    set gfxpayload=keep
    linux   /casper/vmlinuz  file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash nomodeset persistent ---
    initrd  /casper/initrd.lz
}

Just add the word nomodeset leave the rest of the text as you found it.


genuine emergency / challenge - no image

Use a live boot USB drive to boot the computer, then you can mount the hard drive’s file system and either 1) try to fix your boot/graphics settings, or 2) recover your data before performing a full reinstall. It’s your call but I wouldn’t spend too much time trying to resolve it, a reinstall will often be the most effective option, especially if you don’t really know what you’re doing.


Ubuntu 16.04 - Portuguese on system76 (US) layout

Possibly you have XIM enabled as input method, and run into bug #1573755. If so, try to open Language Support, change to "IBus" as input method, and relogin.

Edit:

Since the above idea didn't work, you may want to check which is your currently selected keyboard layout by running these commands:

gsettings get org.gnome.desktop.input-sources sources
gsettings get org.gnome.desktop.input-sources current


macvlan support is not currently implemented in netplan.
 You can track the progress of this feature at https://bugs.launchpad.net/netplan/+bug/1664847.

In the meantime, you can still configure a macvlan interface using ifupdown, you just need to install the ifupdown package from the Ubuntu archive.  ifupdown and netplan can coexist on a system provided you do not try to use both of them to manage the same interface.


YouTube videos are not working in Ubuntu 18.04

Your flashplayer might be the problem although chrome comes pre-installed with flash player.

Try reinstalling flash plugin by ,

sudo apt-get install --reinstall flashplugin-installer.


Should I upgrade my kernel from 3.16 to 4.**?

What additional changes/risks I would have to handle?

There is hardly any risk. I might even claim there is no risk.

the new kernel is placed next to the old kernels as a separate booting option. It does not replace the currently active kernel.
you pick the new kernel in Grub to boot from it.

does it boot? keep using it.
doet is not boot? pick the older kernel and keep using that.

If it boots correctly at some point in time you could decide to delete the old kernel. But that is not mandatory and keeping more than one kernel to use those as a fallback is a sane decision.

The only problem you can run into is a too small boot partition. But even then it does not change the current active kernel so you can always stop, reboot, pick the kernel that did work before you started and continue to use Ubuntu.

  Would you suggest me to do so?

If I was still on 14.04 I would install the new kernel. Not even for it to be the active kernel. But to get the experience of installing kernels. So to see what happens, how it works, where a problem might occur. How to fix something.


why browser show an empty screen when i start PHP test-script in Ubuntu 16.04?

SOLVED Browser can disply output with following style:

<?  // should be <?php, but it works anyway because
    $server     = $_SESSION['database_host'];
    $datenbank  = $_SESSION['database_name'];
    $username   = $_SESSION['database_user'];
    $passwort   = $_SESSION['database_user_pw'];
    $mySQL  =  new mysqli($server,$username,$passwort,$datenbank);
    if ($mySQL->connect_errno)
    {
        echo "Failed to connect to MySQL: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error;
    }
    else
    {
    $sql = "SELECT count(fldID) count from tblPerson";
    // echo"$sql<br>";
    if (!$result = $mySQL->query($sql))
    {
        echo "query \"$sql\" failed because $mySQL->error";
        exit;
    }

    if (! $result->num_rows) exit;

    $actor = $result->fetch_assoc();
    $nbr =  $actor['count'];
    echo "nuber is: ".$nbr." persons";

    }
?>


Ubuntu can't find the correct max resolution with Samsung SyncMaster SA300

I believe your trouble is your "virtual screen" size. I was getting the same message when trying to setup dual monitors.  The solution I found was changing the "virtual screen" to a larger size.

To do so I had to modify /etc/X11/xorg.conf
sudo leafpad /etc/X11/xorg.conf

Mine orignally looked like this

Section "Screen"
    Identifier  "Default Screen"
    DefaultDepth    24
EndSection

Section "Module"
    Load    "glx"
EndSection

I added the below to modify the virtual screen size

SubSection "Display"
    Virtual 3840 1920
EndSubSection

See the screenshot below and note that the "maximum" is now increased.

In the end my xorg.conf ended up looking something like

Section "Screen"
    Identifier  "Default Screen"
    DefaultDepth    24
    SubSection "Display"
        Virtual 3840 1920
    EndSubSection
EndSection

Section "Module"
    Load    "glx"
EndSection

Hopefully you can just change the "3840 1920" to "1920 1080".

Of course you should backup your xorg.conf before making changes. I know I had to restore it about 20 times till I figured it out.

Further explanation is on this site


How to open aMSN that has been minimised to the tray?

Any (well almost any) application that in previous versions minimised to the system tray notification area will still appear in the system-tray area of Gnome-Shell.  The location though is not immediately obvious - it is in the bottom-right of the screen.

Move your mouse to the bottom-right to reveal this area - its an auto-hidden like panel.  Just click on any of the apps in the system-tray to make them reappear.

As you have pointed out aMsn when minimised seemingly disappears - this happens in both Gnome-Shell and Unity.

To stop this magical disappearing trick you can edit the file /home/your_username/.amsn/[your_email]/config.xml, search for use_tray and change the value from 1 to 0

This still doesnt allow aMsn to minimise to the correct area in the shell - but aMsn does appear as an open window when you click the Activities menu.

Note in Unity - this trick allows aMsn to remain as an icon in the Launcher.

If you are not adverse to installing PPAs, then instead of the above you could install the classic-systray extension

sudo add-apt-repository ppa:webupd8team/gnome3
sudo apt-get update
sudo apt-get install gnome-shell-classic-systray

Logout and login and enable the classic-tray extension in gnome-tweak-tool.

Logout and login again.  This time, aMsn when it minimises, appears in the top-bar as shown.


Removing all traces of sh files installed by scm_breeze fixed the problem.

It was (I didn't found where) adding an alias to exec_scmb_expand_args.


Where is "Applications > System Tools > File Types Editor" in 10.10?

You can get the File Types Editor in currently supported releases of Ubuntu by installing the package called "assogiate". (You can use the Ubuntu Software Center for this.)

Alternatively, you can right-click on a .url file and use Open With... to select the application you want, and check the box indicating that you want .url files to always be opened with that application.


Ubuntu 16.04 install ElasticSearch 5.x, failed to start

I had the same issue and I saw that the group of my elasticsearch.yml file was not right. You can check it by using:

ubuntu@mymachine:~$ sudo ls -al /etc/elasticsearch/
total 24
drwxr-x---  3 root elasticsearch 4096 Dec 19 10:58 .
drwxr-xr-x 94 root root          4096 Dec 19 10:58 ..
-rw-rw----  1 root elasticsearch 3069 Dec  6 12:39 elasticsearch.yml
-rw-rw----  1 root elasticsearch 2862 Dec  6 12:39 jvm.options
-rw-rw----  1 root elasticsearch 3992 Dec  6 12:39 log4j2.properties
drwxr-x---  2 root elasticsearch 4096 Dec  6 12:39 scripts

It can be that the elasticsearch.yml is in the root group.

-rw-rw----  1 root root   3069 Dec  6 12:39 elasticsearch.yml

When I changed the group I was able to start elasticsearch again.

$ sudo chgrp elasticsearch /etc/elasticsearch/elasticsearch.yml


Program Tulip doesn't start after installing trough Software Center

I had the same problem - Lubuntu 15.10 and Tulip doesn't start. Assuming your default Tulip installation is in /usr/bin/Tulip, you can check for missing dependencies using ldd /usr/bin/Tulip.

When libbfd-2.25-system.so is missing, install the binutils package using sudo apt-get install binutils. The package provides libbfd-2.25.1-system.so. Afterwards create a symbolic link with sudo ln -s /usr/lib/libbfd-2.25.1-system.so /usr/lib/libbfd-2.25-system.so.

When you check Tulip again with ldd, the missing dependency should be gone and Tulip starts! At least that worked for me.


How do I create a password protected archive in 20.04

So why does Archive Manager have a menu item "New Archive" when it has no function?

It has a function. After filling the dialog, you get a new empty Archive Manager window, ready to add files to. The archive will be written only once you add files, either by dragging from the file manager or by using the + button.

In Files you can select a bunch of files and on the right-click menu there is an option to copy them into a new archive. But you cannot give the archive a password!

Indeed, you cannot create a password protected archive from right-clicking selected files in nautilus. To create a password protected archive, you need the "New Archive" dialog. Under "Other options", you can enter a password if the archive type you create supports that.
When Archive Manager is open, the dialog will be displayed as soon as you add files. If an archive is open, you can use the menu item "New Archive" to create a new archive with a password.


How to alter BIOS in VAIO to allow for new battery?

Boot Windows via Live CD/Pre-Installation Environment/Recovery Environment and run the executable from there. Don't try something different, this may cause damage to your notebook. Also you should only use original spare parts. There were too many exploding notebook batteries in the news in the recent years.


15.04, Wireless randomly have long delay

Try setting your preamble to short in your router settings. This will reduce the time for a faster response.


The nvidia-persistenced utility is used to enable persistent software state in the NVIDIA driver. When persistence mode is enabled, the daemon prevents the driver from releasing device state when the device is not in use. This can improve the startup time of new clients in this scenario.

  The daemon does not require root privileges to run, and may safely be run as an unprivileged user, given that its runtime directory, /var/run/nvidia-persistenced, is created for and owned by that user prior to starting the daemon. nvidia-persistenced also requires read and write access to the NVIDIA character device files. If the permissions of the device files have been altered through any of the NVreg_DeviceFileUID, NVreg_DeviceFile_GID, or NVreg_DeviceFileMode NVIDIA kernel module options, nvidia-persistenced will need to run as a suitable user.

So this group is created to handle specific permissions for this daemon. E. g. /var/run/nvidia-persistenced is owned by nvidia-persistenced.

Source

And this user and group is not specific to the PPA. It is created for Nvidia drivers installed from Ubuntu repositories as well.


Internal CD drive will not play reliably when connected via USB

As codlord has stated, this is due to power constraints defined by the USB bus.
A little bit about power over USB:

USB ports output a maximum of 5 volts of direct current (5V DC)
USB ports on some notebooks (most notably Toshiba and Fujitsu devices) have a maximum output of 3.3 volts when running on battery
USB 1.0 and 2.0 can deliver "up to" 500 mA (0.5A) of current
USB 3.x can deliver "up to" 900 mA (0.9A) of current

With these limits in mind, let's do some math:

Version
Volts @ Amps
Watts

USB 1.0
5V @ 0.5A
2.5 Watts

USB 2.0
5V @ 0.5A
2.5 Watts

USB 3.x
5V @ 0.9A
4.5 Watts

Note: The notebooks that cut USB power to 3.3V when on battery are not part of the above chart. It is also important to state that not all manufacturers stick to these limits. Some USB ports will supply a smaller number of amps in an effort to reduce total power consumption and/or thermal conductivity issues.
Now let's look at the typical optical drive for notebooks. Yours identifies as being from Innostor Technology Corporation, which is sometimes branded as "LiteOn". A quick search online shows that many of their notebook optical drives have the following power profiles:

State
Power Consumption

Connected / Idle
0.3 Watts (± 10% depending on brand & model)

Reading (CD/DVD)
2.5 ~ 3.0 Watts

Writing (CD/DVD)
2.75 ~ 4.0 Watts

Reading (Blu-ray)
3.0 ~ 4.0 Watts

Writing (Blu-ray)
4.5 ~ 6.3 Watts

So, with all this said, connecting the device and having it announce itself to a computer requires almost no power. Once the disc starts spinning, though, the device will demand more power. If the motor that spins the media is consuming the bulk of the energy from the port, then there will not be enough remaining for the laser or its actuator carriage. It is for this reason, as codlord mentioned, that a lot of external optical drives will have two USB cables; one for just power, and the other for both data and power.
This answer is probably overkill ...


PHP5-FPM (PHP 5.5) won't install - can't install libsystemd-daemon0

From this moment, the solution should very easy, just do:

apt-get update
apt-get upgrade

Since it seems that adding another PPAs is too complicated, I have merged all necessary packages into the main repository, so this should not happen anymore.

Edit: JFTR the php5-fpm no longer depends on any systemd component, so it can be installed without the hassle of pulling libsystemd-daemon0.


Open your Network Manager and use the Security tab.

Enable 802.1x Security and select Protected EAP (PEAP)


how to make a full backup of ubuntu server for another computer?

Clonezilla is a reliable tool which does exactly what you want to do.
Download Clonezilla Live and create a bootable DVD or USB media.

Boot from the media and clone the content of the system installation.
I created presentations which explain how you have to do everything :

Create a backup using Clonezilla |
Restore a backup using Clonezilla


Stuck in linux boot menu and cannot install Win

You must be enabled USB Booting on your BIOS settings. You can try F1 - F12 buttons at startup. Then a window should appear that showing all drives. You can install Windows by choosing your drive.


Automate OS installation and associated packages

Use Ubuntu Customization Kit (UCK) to create your own customized Live CD/DVD/USB.  Then you can use that CD, DVD, or USB to install your own customized Ubuntu onto other machines.

sudo apt-get install syslinux-utils libfribidi-bin uck

(I've also included a couple of important required packages in the above command).

Here is the UCK Launchpad Page: https://launchpad.net/uck

After you install the uck package, there are a two bugs you should apply fixes for:

https://bugs.launchpad.net/uck/+bug/1245981

https://bugs.launchpad.net/uck/+bug/1435019

After installation, launch the UCK GUI from the Unity Dash.  Select your language preferences, and then select the "Run Console Application" option, so you can install your required software (LAMP, Skype, IDEs, filezilla etc.) using apt-get and make necessary configurations.

(Note that the final compressed iso may not be greater than 4GB, but you should have plenty of space to install all the software you need).


Dell XPS 15 7590: No Bluetooth with Killer AX1650 adapter in Ubunti 18.04.2

OK, so this seems to have gotten fixed but I'm not sure how.  I installed some more apps, played around with the tweak tool but what I think what actually fixed it was turning on Livepatch. Once I did, it offered some updates.  When I did a reboot due to an error I got when video player crashed, Bluetooth was working and labeled "On".  I wish I could have exactly retrace what I did but I wasn't actually trying to fix issue.  I hope someone can actually make a real contribution for this issue.  Best regards.


It works with previous versions. (I can clearly remember I have done this before)
However, in newer versions of Ubuntu (say 13.10), "now" is no longer a legal value. We should use "0" instead. So now your alias becomes:

alias shutdown='sudo shutdown -h 0'


Unable to use laptop display since attaching monitor

I think this can be solved by using the Fn+F5 command or maybe yours may be Alt+Comman+F5 since it's a Mac. Hope this helps.


After deploying services I get incorrect public address

Judging by the names of your nodes, you're using mDNS so I'd recommend renaming your node 'node-001185e677fe' into 'node-001185e677fe.local'.


Partitioning of Ubuntu 10.04 server on KVM?

Looks good to me.

Some remarks...

The 8.0 Gb root is more than we use on our servers.
Zimbra uses MySQL. MySQL by default stores it databases in /etc/ so that might be a caveat. From the specifications I assume they store it in /opt/zimbra so that might be taken care of by them.


How do I list what is current kernel version for LTS HWE?

You can search for linux-image-generic-hwe on Launchpad, like this.
Here you can see the linux-image-generic-hwe-20.04 branch has a 5.4.0 kernel, while the  linux-image-generic-hwe-20.04-edge branch has a 5.8.0 kernel.
You can also consult the "Ubuntu to mainline kernel mapping table". Here, the latest HWE branch is named "focal linux-hwe-5.8", so I think the Launchpad info is a bit more accurate regarding package names.
As I understand it, the HWE branch will generally follow the latest official Ubuntu release, so as of now it will be kernel 5.8 from Groovy, and as of spring 2021 it will be Hirsute. I also believe the HWE branch is released with point releases, using the following schedule:

20.04.1: HWE is 5.4 - HWE-edge is 5.8 (Groovy)
20.04.2: HWE is 5.8 - HWE-edge is 5.X (Hirsute)
20.04.3: HWE is 5.X - HWE-edge is 5.Y (...) Etc.


PlayOnLinux have their own repository for Ubuntu 12.04 Precise. It has the latest released version. As noted on their Download page:

Copy & Paste the following line-by-line in a terminal.

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


I don't know why it was purple to begin with, but I installed GNOME Color Chooser and was able to override the setting by changing global colors -> Entry Fields -> normal -> Background to #ffffff.


How are packages actually installed via apt-get install?

The advantages of a package management system such as apt, yum, pacman, emerge, etc include:

It's easy to query what version of a package is installed or available.
It's easy to remove a package entirely, making sure all its files are gone.
It's easy to verify the integrity of the packages files, so you can see if it's been corrupted or tampered with.
It's easy to upgrade a package by installing the new version and removing all the old versions files. This will make sure not to leave any lingering files from the old package around to confuse or break things.
It's easy to see what packages require or provide things that other packages provide or require, so you can be sure to have the needed items for the package to function correctly.
It's easy to install or remove groups of packages.
In many cases it's possible to downgrade back to a previous version of a package, for example when a new version has a bug.

Although it is for Fedora, see also:

https://fedoraproject.org/wiki/Package_management_system

Installing from source may have advantages

You can customize the binaries (enable / disable options)
More up to date package then is available in the repositories
Sometimes necessary for bug fixes

But the disadvantages are that you will have to then manually update the package when a new version is available and you will often loose support.

IMO if you wish to compile all or most of your packages, I would advise Gentoo.


All of these deal with arithmetic, but in different ways and the variable is created via different means. Some of these are specific to bash shells, while others aren't.

$((...)) is called arithmetic expansion, which is typical of the bash and ksh shells. This allows doing simple integer arithmetic, no floating point stuff though. The result of the expression replaces the expression, as in echo $((1+1)) would become echo 2
((...)) is referred to as arithmetic evaluation and can be used as part of if ((...)); then or while ((...)) ; do statements. Arithmetic expansion $((..)) substitutes the output of the operation and can be used to assign variables as in i=$((i+1)) but cannot be used in conditional statements.
$[...]  is the old syntax for arithmetic expansion which is deprecated. See also. This was likely kept so that old bash scripts don't break. This didn't work in ksh93, so my guess is that this syntax is bash-specific. NOTE: spaces are very important here; don't confuse $[1+1] with stuff like [ $a -eq $b ]. The [ with spaces is known as the test command, and you typically see it in decision-making parts. It is very different in behavior and purpose.
let is a bash and ksh keyword which allows for variable creation with simple arithmetic evaluation. If you try to assign a string there like let a="hello world" you'll get a syntax error. Works in bash and ksh93.
$(...) is command substitution, where you literally take the output of a command and assign to a variable. Your command here is expr, which takes positional arguments, like expr arg1 arg2 arg3, so spaces are important. It's sort of like a small command-line calculator for integer arithmetic, plus some true/false and regex type of stuff. This is a shell-neutral command.

It's also worth noting that arithmetic expansion and command substitution are specified by POSIX standard, while let and $[...] aren't.


This is a nice idea. I don't know if there is a GUI way to do this (most probably, no), but you can use, for example, the following script at start up to make Ubuntu change to the top left workspace with the middle one:

#!/bin/bash

#check if xdotool is installed
if [ ! -n "$(dpkg -s xdotool 2>/dev/null | grep 'Status: install ok installed')" ]; then
    echo -e "The package 'xdotool' must to be installed before to run $(basename $0)\nUse 'sudo apt-get install xdotool' command in terminal to install it."
    exit
fi

xdotool key Ctrl+Alt+Right
xdotool key Ctrl+Alt+Down


Enable middle mouse button emulation on Gnome login (Ubuntu)

The thing worked for me is the below script

/home/user/mouse.sh

#!/bin/bash

    pointer1="Logitech USB Receiver Mouse"
    id1=$(xinput | awk -F= "/$pointer1.*pointer/ {print \$2}" | cut -f1)
    xinput set-prop "${id1}" "libinput Middle Emulation Enabled" 1

some of the Output of xinput

$ xinput
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ ETPS/2 Elantech Touchpad                  id=11   [slave  pointer  (2)]
⎜   ↳ Logitech USB Receiver Consumer Control    id=16   [slave  pointer  (2)]
⎜   ↳ Logitech USB Receiver Mouse               id=18   [slave  pointer  (2)]

and added the command /bin/bash /home/user/mouse.sh in Startup Applications Preferences..


How can I completely erase all data on a (micro) SD card?

Your guessing about dd is right. You can wipe the SD card out by the following command (let's assume, that your SD card is /dev/sdd):

Do not interrupt this command or it could possibly brick the SD card.

$ sudo dd if=/dev/zero of=/dev/sdd bs=8192

Note: If this command does not complete successfully and you have to abort it, then most likely it is recoverable with disk partition recovery programs covered in other posts.

It can take some time depending on size and speed of SD card. If you are convinced, that CIA would like to recover your files, then overwrite the SD card with urandom instead of zero:

$ sudo dd if=/dev/urandom of=/dev/sdd bs=8192

dd command from above examples will erase whole SD card, leaving it without any partitions, even with no partition table. So you will need to recreate partition on SD card. You can do this by any partitioning tool like cfdisk, parted (my recommendation) or gparted.

And one more thing: be extremely careful when calling dd command. A typo in of= argument value can cause disaster.


Xfce4 Panel Launcher Menu as Desktop icon

Before you log in, there is a button right next to the password prompt which allows you to select it on-screen.

Once you are in, the best way to switch is to log back out then make the other selection.

They cannot run at the same time on the same console.

I do know that when I use VNC to open a second console I can get the xfce desktop.

Each console will have only a single environment.

So perhaps you could create an icon that launches VNC into your own machine.


Allow outgoing connections only to specific domain/IP

do you try to filter outgiong traffic?

If you wand to control user access from you intranet to internet sites you must use SQUID proxy server, not firewall.


There should be no need to install a boot loader manually.  When you run the Ubuntu installation, choose to install it along side Windows and you should be fine.


The value (time in millisecs) sets how long you may wait between two clicks and compiz would still recognize them as double-clicks.

Example: value=500ms If you click/wait 450ms/click again, you performed a double click. If you waited 550ms instead, compiz would interpret your interaction as two separate clicks.


Is UbuntuUpdates.org a trustworthy source for downloads

I can't vouch for the quality or security of UbuntuUpdates.org itself, though it's been around for a while and is somewhat widely used.

However, as far as the .deb package download links at least on that page you linked to go -- I am talking about the "32-bit deb package" and "64-bit deb package" links -- as muru says those are links to content at http://security.ubuntu.com/ubuntu/, which is an official Ubuntu software source.

So you should be fine, at least with what you're doing right now.

With all that said, if the machine you're installing software on has an Internet connection, that makes it easy to automatically retrieve and install whatever packages you need. You can use apt/apt-get, aptitude, the Software Center, Synaptic, or whatever other such utility you like.

I only checked that one page on UbuntuUpdates.org, so I cannot be sure it only links to packages in official Ubuntu software sources. I suspect it does. If it does--or for any package in an official Ubuntu software source--installing from your Ubuntu system with a package management tool should work just fine. If it doesn't, and you get no obvious error message other than that no such package was found,  then I recommend you examine two possibilities:

Is the necessary repository component enabled? See also the "Components" section of the "Repositories" article and, for example, How do I enable the “Universe” repository? (especially this answer).
Is the Ubuntu release you're using still supported? The software sources for end-of-life Ubuntu releases are (eventually) moved to the old-releases server. See How to install software or upgrade from an old unsupported release?, and also Releases for information on what stage each release is in. If you are using an old, unsupported release of Ubuntu, I strongly urge you to upgrade, because those releases no longer receive fixes for newly discovered security vulnerabilities; it is risky to use them.


Check cat /etc/resolv.conf for nameserver addresses. If it says 127.0.0.1 or 127.0.0.53, then you probably have DNS leaks. You should see the IP address of your VPN DNS, and 127.0.0.1/127.0.0.53 (which probably point to your router at 192.168.0.1/192.168.1.1).

The router is probably set to 8.8.8.8/8.8.4.4 or 208.67.222.222/208.67.220.220 for its DNS routers, and you'll have a DNS leak.

If you can SSH into your server and get a GUI you can check http://dnsleak.com or http://dnsleaktest.com to check for DNS leaks.

Note: this may not apply to a "split tunnel VPN setup", I don't know.

Update #1:

The user is running with openvpn-system-resolved, so most of my answer doesn't apply.


music cant play and says "need to install plugins"

As dodohjk suggested, install Ubuntu Restricted Extras like this

sudo apt-get install ubuntu-restricted-extras

Please read about them before installing

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


Can I install Ubuntu Desktop 12.10 on laptop Samsung NP300E5X-S01AE?

Well, if it really had a motherboard hardware problem, then it seems unlikely that its failure had anything to do with your installation of ubuntu. My suggestion would be to boot into ubuntu via a livecd or a liveusb. This way you can see how ubuntu works without actually going through the full install. You will be able to see if are any hardware compatibility issues and such. It will boot slower and may run slower from CD/USB than a harddrive install will, but it will give you an idea of what a full install will look like.

Also, are you sure you should use a 64bit version? 32bit works on 64s but not vice versa (as far as I know...)

Good luck!


None of my canon printers work with Ubuntu 13.10

Please read the wiki regarding printers in Ubuntu. If you follow Canon you will see it has a specific PPA you can use to install a lot of Canon printer models.

But still I myself would suggest to anyone asking me to opt for a HP. HP has a very good track record with Linux.

More information about how to use a PPA here: Personal Package Archives.


Your issue is not related to the installation of booksim - it's simply a matter of understanding the relationships between the locations of the files

src
├── allocators
├── arbiters
├── booksim
├── examples
│   ├── anynet
│   └── mesh88_lat
├── networks
├── power
└── routers

So from the src directory, you need to run

./booksim examples/mesh88_lat


How to group icons based on category on the desktop?

I haven't seen any such utility for Unity or Gnome based desktop yet. But KDE4 has this feature.

See the screenshot below:

Go to this page for more screenshot. You can use that applet to categorize icons on desktop.


Strictly speaking, a disk can use MBR or GPT, but not both. That said, there's an ugly and dangerous hack, known as a hybrid MBR, which is most often used on Macs, that enables a GPT disk to include MBR pointers to three of its partitions for the benefit of GPT-unaware OSes. There's very little or no reason to use a hybrid MBR except on Macs that are dual-booting with Windows 7 or earlier, or with other non-GPT/non-EFI OSes. A hybrid MBR would provide NO benefit for your specific case.

Be aware that boot mode (EFI/UEFI vs. BIOS/CSM/legacy) and partition table type (GPT vs. MBR) are not necessarily linked. Windows ties the two together, and older OSes understand neither EFI nor GPT, but other than that, you're usually free to mix and match. You can install Ubuntu in BIOS mode to a GPT disk, for instance. That said, using GPT for EFI-mode booting and MBR for BIOS-mode booting will minimize the risk of running into problems, but it's often possible to cross those boundaries if doing so is necessary. Thus, if you want to have a USB drive that's bootable under either BIOS or EFI, you can, in principle, use either MBR or GPT on it. You'll have to be sure to install both BIOS-mode and EFI-mode boot loaders, but the partition table can be either type. This type of configuration can be tricky to set up, though, and offhand, I don't know of any site that provides step-by-step instructions for configuring it. There are about a million special cases that can create problems for specific computers or for computers configured in particular ways (Secure Boot issues, firmware that's finicky about partition tables, 32- vs. 64-bit systems, etc.). Thus, depending on your needs, it might be better to plan on creating two or more bootable USB drives. Yes, that's more hassle to carry around and keep them straight -- but that hassle may be less than the hassle involved in navigating the mine field of quirks involved in creating a truly universal boot medium.


Adding git repositories to python 3 interpreter

There is a python library used to interact with Git repositories

It can be used in Fetching Remote Git Repo with Python, e.g..

There's also the old fashioned way

cd /path/to/git/repo
python3 my_favorite.py

But I think you will find Git to be Python version independent, and that possibly you want to associate Python code, files and extensions with Python 3.4 rather than 2.7, and that would be via mime.types

How is it determined which application is to open a file of specific mime-type?

How to change the default application for a given type of file in Ubuntu Linux

For example, I use Idlex as an IDE.  I've added text/x-python=idlex3.desktop to the ~/.local/share/applications/mimeapps.list file.  Now, double clicking on a Python file opens that file in the IDE to be looked at, edited, and/or run.


You can try to remove the file as superuser.

So, open a terminal pressing ctrl+alt+t and move the working directory to Desktop position:

cd Desktop

Now you can run the following command that will delete selected file as superuser :

sudo rm -f <filename>

where parameter <filename> is the name (or the path) of file that you want delete.
The option -f tell to the command to ignore possible errors and force the deletion.

If you want to delete a directory you can use the following command that will delete the directory and all its content (-r means recursive, "go deep"):

sudo rm -rf <directory>

Note: unless you want to bypass all errors during deletion, don't use -f option. Be careful when you use the above command because, if you use it in the wrong way, you could delete important files and directories ignoring any errors that could arise. Those files cannot be recovered easily.
For example you mustn't use this command on your root directory.

If you want more information about rm command with this:

man rm

The above command will show you the reference manual of rm command.

I hope this could help you.


How to make backspace work in Google Chrome

Update:

With the update to 35.0 backspace now works again by default in Chrome/Chromium.

Original post:

Looks as if there is an extension for this available on the Chrome Webstore:

Backspace As Back/Forward for Linux


I don't have this issue with "sleep" (I think you mean suspend), I have the same issue with suspend and the led too because it suspends the laptop by default. I didn't fix it, I do not know how but I made sure it never happens again

settings ->  power manager -> on ac -> when laptop lid is closed: do nothing

settings ->  power manager -> Extended-> set monitor sleep mode: standby

I  think that will solve all your problems, well until a real solution pops up. I've read solutions that recommend downgrading the kernel, that's something I'm not willing to try, even if it would work.


Is there any Ubuntu 16.04 derivative which support by default proprietary AMD graphics driver?

No. It's because fglrx doesn't support Xorg 1.18, which is what comes with Ubuntu 16.04 (thanks Wilf). AMD isn't planning on upgrading it to work, and Canonical doesn't want to have to maintain a driver for the next five years by itself.

If you have a supported card, try the AMD GPU-PRO driver beta.

Otherwise, you have to downgrade to 15.10 or settle for open source drivers.


Fortunately, I solved my problem using this info.


Kubuntu 16.04 Konqueror always use new Window when I click on a folder

I've found the answer at the end of this post:

https://www.linuxquestions.org/questions/linux-newbie-8/konqueror-opens-multiple-times-282593/page2.html

So i let the question here since it make more chance to everybody
to found the answer!

bye bye


You don't have a C compiler installed. Install the package build-essential, that will install a C compiler and some other thing you usually need to build programs written in C.


How to set the different default character encoding of `gnome-terminal` from the system default locale?

Method one: set appropriate variables. For example (try running this from the shell):

LANG=C /usr/bin/gnome-terminal

(depending which locale settings you need you may want to set other variables, type "locale" to see the complete list)

If it works, you can wrap it as shell script (just save such line as sth like "myterm", make it executable and puth somewhere in the PATH) and just use "myterm" to spawn new terminals.

Method two: you can use similar trick inside gnome-terminal configuration. Enter profile preferences (Edit/Profile Preferences), click [x] Run a custom command instead of my shell, and use sth like

/path/to/mybash

as your custom command. /path/to/mybash should be executable and contain

export LANG=C
exec bash

(or sth similar) Note that this is "per-profile", so if you use multiple terminal profiles, you may need to repeat it.

PS If you need multiple encodings, just create multiple profiles and use appropriate one whenever you need. Note that you can use

gnome-terminal --window-with-profile=ProfileName

to spawn specific profile from the shell (or from desktop icon or from toolbar icon or ...)


How can one call programs that are not "rooted" in the operating system

Then I suggest you to use:

/opt/lampp/bin/php ./politicianupdate.php

If is ok, then check with ls -l /usr/bin/php if is a symbolic link. If yes, and if you would like, remove it then create a new one to /opt/lampp/bin/php:

ln -sf /opt/lampp/bin/php /usr/bin/php


Getting ACPI Error and COMRESET failed (error=-32) during boot

I had the same issue, and identified the faulty drive using lssci, as per advice from oldfred. It was the only drive not showing up in the list. In my case, it turned out to be an external HD connected via eSATA.


How can I find the currently playing song in Banshee?

Under the "Playback" menu, there is an item named "Jump to Playing Song".  Its key-combination is Control+J.


I you are submitting it as a for-purchase app, you will get packaging assistance from Canonical staff.  Just submit what you have through the MyApps portal, even if it's just a tarball, and that will get you started.


Ubuntu (Desktop + Server) 16.04: adding Ethernet network (LAN)

You will need to statically assign IP addresses for both machines.

PC: 192.168.10.1    255.255.255.0

Server: 192.168.10.2    255.255.255.0

For headles Ubuntu server network config you will need to edit /etc/network/interfaces
Useful article here
Example config for server:

# The primary network interface
auto enp4s0
iface enp4s0 inet static
address 192.168.10.2
netmask 255.255.255.0
network 192.168.10.0
broadcast 192.168.10.255

You won't have internet with this configuration because routing would need to be configured through your PC.

Also, not likely but there could be a need for a crossover cable because you're going device to device though most modern NICs handle this automatically.

Note: you could limit the address range with CIDR 192.168.10.0/30 only allowing the two devices.


I need help installing Ubuntu on a Laptop

First step, install Windows 10 on the entire disk - it is not necessary to make partitions because you can claim free space with Ubuntu installer if previously you did not make one partition.
When installing Ubuntu just select free space where it will reside and the installer will make necessary partitions for you. It's not that hard, trial and error.


Can't create or delete Files in Ubuntu except in Ubuntu partition

Solution via windows boot
I'm guessing you have a windows dual boot?
Windows hard locks any and all NTFS partitions on your computer's hard drives before shutdown/reboot/hibernate. it's annoying and allows windows to boot a couple milliseconds faster.
if those milliseconds aren't imperative to your survival once booted up in windows open up a admin CMD :

Win
CMD
shift-Enter

then type : powercfg -h off
enter, reboot into ubuntu. then you should be free to create/delete/modify windows documents and files.
Solution on ubuntu-only
If you HAD a windows dual-boot and booting windows is no longer an option, then follow this guide : starting from : "Have Linux Remove the Hiberfile.sys File"
cheers! :)


How to Read HD when only booting to Bios with dual-boot Windows 10 and 15.10?

The main errors from your boot repair are:

Invalid MBR Signature found.
ERROR: asr: reading /dev/sda[Input/output error]

So it looks like your SSD is broken.  HDDs die a horrible death like cancer: slowly they get worse and worse, until they finally die whereas SSDs die a quick and painful death like a heart attack: they just die suddenly.

You have just one (very small) chance that the SSD got loose from its bay while you were flying: open up the HDD bay, remove the SSD, re-insert it and try again.  If that doesn't help, return the laptop to the store and get it repaired under warranty.


'echo $SHELL' returns 'fish' when I'm using 'zsh'

SHELL always (well, if not set manually) expands to the login shell (defined in /etc/passwd) of the user, not necessarily the shell user currently using.

You can cross check with:

grep -Po '^username:.*:\K[^:]+$' /etc/passwd

Replace username with your real username.

If you want to change your login shell, modify /etc/passwd or better use chsh:

chsh -s /path/to/shell username


Do I need gnome on my PC with 12.04LTS to install gtk themes?

Technically, GTK themes only require... GTK. However, "themes" are designed for specific environments, and you might get a partial result if you do not have GNOME installed. On Ubuntu 12.04, you have basic GNOME, which allows you to install and configure GTK themes. You may need the gnome-tweak-tool.


How to restore backup configurations of deja-dup

The configuration of deja-dup is stored in ~/.gconf/apps/deja-dup/%gconf.xml (thats a hidden directory in your home directory). I am certain that this file got backed up too.


Lubuntu is the best version to start with as it is going to be the lightest on resources.

But, that laptop is going to run slow. You might want to look at a light weight distro such as tinycore or slitaz.


Mark Hold doesn't hold when apt-get dist-upgrade

Kernel updates are a bit special, as they have their version in the package name and you can therefore have multiple versions installed at the same time. So actually when you update your kernel, you install a new, different kernel package. Some time later the old kernel package can be removed. It's not an in-place upgrade like for most other packages.

This is achieved by having metapackages (basically an empty package that just has dependencies, no actual files) which always depend on the latest real kernel version package. In your case, that would be linux-image-aws.

During a kernel update, this metapackage is getting updated to a version which has different dependencies. That way the package manager is told to additionally newly install the latest real kernel package.

So knowing this all and that apt-mark hold prevents a package from getting updated, you can see that apt-mark hold linux-image-4.15.0-1007-aws will not prevent you from getting kernel updates, as that specific real kernel version package will not be updated. The metapackage linux-image-aws will be updated instead, causing a new kernel package to be installed.

Therefore you would have to instead run:

sudo apt-mark hold linux-image-aws

However, be advised that ignoring kernel updates (or updates to any other package) can make your system vulnerable to known security issues which would already be fixed in the latest version. You should keep your systems up to date and secure.


Could it be related to no activity on the keyboard or mouse and the system locking the screen for security like in this Q&A: Brightness & Lock


ufw allow 60000:65000/tcp for FTP port 820

With FTP the client connects to the server on the listen_port, i.e. listen_port is used as destination port for data from the client. Data transfers, i.e. directory listings and file transfers, are  done using separate TCP connections and the behavior differs between the classic active mode and the today commonly used passive mode.

In active mode the server is connecting to the client from the ftp_data_port. This means:  The connection gets initiated on the server side (contrary to the control connection) and ftp_data_port is the source port at the server side and destination port from the perspective of the client.

But since active mode does not play well with clients behind NAT (i.e. most systems at home or small office) passive mode is preferred today and most clients use it by default. In this mode not the server is connecting to the client but the client is connecting to the server. The destination port is dynamically assigned and the server tells the client in response to the PASV or PORT command which port to use. Due to how TCP works it is not enough to have a single port for all data connections to the same client and thus ftp_data_port will not be used for this. Instead a port in the range given by pasv_min_port and pasv_max_port will be used and if these parameters are not given an ephemeral port will be used.


Limit the size of a directory by deleting old files

I was in a very similar situation. I have a big LVM partition holding 2 directories:

Videos (live streams recorded) can use 88% of the partition
Pictures (pictures sent by the cameras when detecting motion) can use 7% of the partition (as pictures are much lighter, I can still keep older pictures than videos)

The remaining 5% is a security margin so that the partition never gets full. Note I am talking in percentages instead of fixed gigabytes because the size of my LVM partition changes if I replace or add a hard drive.

So here is the script (I added many comments so it's easily understandable):

#!/bin/bash
#Usage = sh limit-directory-size.sh /media/computer/mypartition 88 120 ("/media/computer/mypartition" = the directory to be limited / "88"=the percentage of the total partition this directory is allowed to use / "120"=the number of files to be deleted every time the script loops (while $Directory_Percentage > $Max_Directory_Percentage)

#Directory to limit
Watched_Directory=$1
echo "Directory to limit="$Watched_Directory

#Percentage of partition this directory is allowed to use
Max_Directory_Percentage=$2
echo "Percentage of partition this directory is allowed to use="$Max_Directory_Percentage

#Current size of this directory
Directory_Size=$( du -sk "$Watched_Directory" | cut -f1 )
echo "Current size of this directory="$Directory_Size

#Total space of the partition = Used+Available
Disk_Size=$(( $(df $Watched_Directory | tail -n 1 | awk '{print $3}')+$(df $Watched_Directory | tail -n 1 | awk '{print $4}') ))
echo "Total space of the partition="$Disk_Size

#Curent percentage used by the directory
Directory_Percentage=$(echo "scale=2;100*$Directory_Size/$Disk_Size+0.5" | bc | awk '{printf("%d\n",$1 + 0.5)}')
echo "Curent percentage used by the directory="$Directory_Percentage

#number of files to be deleted every time the script loops (can be set to "1" if you want to be very accurate but the script is slower)
Number_Files_Deleted_Each_Loop=$3
echo "number of files to be deleted every time the script loops="$Number_Files_Deleted_Each_Loop

#While the current percentage is higher than allowed percentage, we delete the oldest files
while [ $Directory_Percentage -gt $Max_Directory_Percentage ] ; do
    #we delete the files
    find $Watched_Directory -type f -printf "%T@ %p\n" | sort -nr | tail -$Number_Files_Deleted_Each_Loop | cut -d' ' -f 2- | xargs rm
    #we delete the empty directories
    find $Watched_Directory -type d -empty -delete
    #we re-calculate $Directory_Percentage
    Directory_Size=$( du -sk "$Watched_Directory" | cut -f1 )
    Directory_Percentage=$(echo "scale=2;100*$Directory_Size/$Disk_Size+0.5" | bc | awk '{printf("%d\n",$1 + 0.5)}')
done

Then you call it every 15 minutes with a crontab entry

*/15 * * * * sh /home/computer/limit-directory-size.sh /media/computer/mypartition/videos 88 120

Hope it helps!


so this device needs hplip 1.6 and no plug-in needed; so 17.10 ubuntu should be fine;

to use hplip, if you open a terminal (hold down three keys: control and alt and t all at once ..); then type hp-setup and hplip should find the device and set it up; hopefully that process will offer you a test print; another icon is likely to appear in your PRINTERS folder; see what it calls the printer driver for that;

if this does not work, type hp-check for hplip to check if all the support programmes that it needs to run; are installed; you can copy what it gives you and edit the above answer; to include the results; if IT GIVES YOU AN ERROR


Usb Wifi adapter stopped working after forceful shutdown

I solved it by uninstalling 8188eu driver by dkms and removing it from the kernel source tree , then adding it and installing it again. Probabbly it got corrupted due to the forceful shutdown.


Ubuntu 13.04 Geary - how to run in the background?

First:

sudo apt-get install alltray

Then:

alltray geary

You may allso add this command to the list of apps loaded at startup.


Unable to add windows 10 to grub after repairing Windows 10 boot

All I had to do was to convert the windows from mbr to gpt using this link
[https://www.maketecheasier.com/convert-legacy-bios-uefi-windows10/]1
and then run update-grub. I did not loose any of my files or setup in the main windows to partition, but my recovery partition WinRE is damaged.


Integrated webcam not detected after update to 14.04

I know that a long time passed since you posted.

with lspci get:

00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)

The solution was to activate the webcam with the keys: fn + CAM  in my case f10.

I hope this helps. Regards.


How to disable a certain version of kernel from autoremoving?

You should mark the kernels you want as hold using apt-mark.

sudo apt-mark hold kernel-version

For example:

sudo apt-mark hold linux-headers-4.4.0-77-generic

From man apt-mark:

  hold is used to mark a package as held back, which will prevent the
      package from being automatically installed, upgraded or removed.


How to redirect all pages of particular sub-domain to another sub-domain using Apache?

I think the syntax should be:

RewriteEngine on
Redirect / http://git.toto.org


You can set CONCURRENCY_LEVEL variable for that.

Run the command this way

CONCURRENCY_LEVEL=8 fakeroot debian/rules binary-headers binary-generic

This variable is set to the number of CPUs automatically.


Can't compile on Ubuntu 14.04 with gcc 4.8

I found the problem.  There was an old, corrupt installation of gcc-4.8, which doesn't get replaced when build-essential is installed.  I used

sudo apt-get remove gcc-4.8
sudo apt-get remove --purge
sudo apt-get auto-remove
sudo apt-get install build-essential

Now the test runs fine.


How to upgrade Atom from webupd8team/atom to the offical packagecloud.io/AtomEditor/atom

The answer is atom installed from sources other than webupd8team/atom does not have permission to access ~/.atom/compile-cache. sudo apt purge atom doesn't delete that folder. So atom gets denied when trying to access files in that folder.

By open the web console using Shift + Ctrl + i you can see what error is occurring behind the scene.

The solution is easy. First, delete ~/.atom/compile-cache. Then purge atom, fresh install atom from the source of your choice. Remember to remove the outdated ppa afterwards.

More info please refer to the thread Problem with starting up atom


Using bash's recursive globbing:

shopt -s globstar
cd /var/www/html
for d in **/lib/config
do
    echo rm -r "$d"
    echo ln -s /var/www/html2/"$d" "$d"
done

Run with echo to check, run without it to actually do the linking.


I have to wonder if this might be an X/Y problem. What problem are you trying to solve? You can certainly have two USB sticks in a computer, boot from one, and save data onto the other. By default, you should see the non-boot USB below Computer on the left hand side of the Files windows.

For your second question, I doubt that something like this is possible, and again I don't understand why you would want to do this.


In the future, you should use pv to get a running progress bar.

sudo apt-get install pv

With pv installed, let's assume you want to clone a 20GB drive, /dev/foo, to another drive (20GB or larger!), /dev/baz:

sudo dd if=/dev/foo bs=4M | pv -s 20G | sudo dd of=/dev/baz bs=4M

Important bits to notice: the bs=4M argument sets the blocksize for dd operations to 4MB, which drastically improves the speed of the whole thing.  And the -s 20G argument tells pv how big this operation is expected to be, so it can give you an ETA as well as a current speed.

I love pv so hard it should probably be illegal.

Note that while doing it this way is intuitive and nice and neat from left to right ordering, piping to and from STDOUT can incur a performance penalty if you're talking about really fast data streams. The following syntax is faster, if you're looking at moving several hundred MB/sec:

pv -s 20G < /dev/foo > /dev/baz

The -s 20G is optional, if you actually know how big (or about how big) the stream will be, it allows pv to give you a time estimate for completion. Without that, pv will try to figure out how large the dataset is if possible (for instance, it knows how big a file is) but if it can't (eg with a block device, not a file), it just tells you the rate of transfer without guessing how long things will take.


Regaining Ubuntu Partition From Windows 7 which is inside LOGICAL PARTITION

From the Wubi FAQ

How do I manually uninstall Wubi?

Remove C:\ubuntu and C:\wubildr*

In Windows XP you need to edit C:\boot.ini and delete the Ubuntu/Wubi line. Alternatively you can modify the boot menu via Control Panel > System > Advanced > Startup and Recovery and pressing "Edit". For Windows 98 you have to edit C:\config.sys and remove the Wubi block. For Windows Vista/7, you can use the built-in bcdedit command or install EasyBCD to edit the boot menu. To use bcdedit, run cmd.exe as an administrator, then enter bcdedit to show all boot entries, note the {GUID} specified for the Ubuntu entry, and then remove it: bcdedit /delete {GUID}

To remove Wubi from the add/remove list, delete the registry key: HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\Wubi

An easy method of removing this registry key is to paste the following text into a plain editor such as Notepad, close and save the file as something like removeWubiKey.reg (you may wish to go to Folder Options > View and disable the "Hide file extensions for known file types" option to check that the .reg extension has been applied correctly). Then you can perform the rest automatically by opening the file in the normal Windows manner, or choosing the "Merge" option from the right click context menu. Note: The formatting is rather strict, so copy the text exactly for best results. You may need to be logged in as the administrator to delete the key, depending on the version of Windows you are using. User Account Control in Vista may also ask for permission, in the typical fashion.

REGEDIT4

[-HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Wubi]

After deleting the registry key, Ubuntu may still appear in the program list. If this is the case, you may be asked if you would like to remove the item from the list.


disabling peaq_wmi has helped me, you can find out how to do it here Touchpad gestures and holding keys does not work


How to fix "The package might be corrupted or you are not allowed to open the file"

I recommend simply double-clicking on the debian package you downloaded. It should open the "Software" app, which will let you install the package.

However, sometimes that fails silently due to a missing dependency. In that case:

Open a terminal window and go to the download directory, for example

cd ~/Downloads

Run:

sudo dpkg -i teamviewer_12.0.85001_i386.deb

Or whatever the name of your debian package is. From the terminal, you'll see any errors. If there's a missing dependency, you can usually fix it with:

sudo apt-get install -f


Yea I also have this problem, not sure what has caused it but I'll try to find some explanation. You're not alone!

Edit:

Ok well, do you happen to have nitrogen installed to manage your backgrounds (such as if you wanted a wallpaper for dual screens?) In any case I was using nitrogen and it seems the desktop would freeze because I needed to initialize nitrogen and reset the wallpaper. Basically I just opened terminal and entered $nitrogen & and it worked. I'll go test it some more.

Final Edit:
I just tested this and it works even if I shutdown/log out etc. However, if you don't have nitrogen installed then this probably isn't your problem but this might help someone.


Run google-chrome-stable from the terminal


Boot partition where is WIndows installed before Ubuntu

I have two hard disks in my desktop machine, booting Windows 10 and Ubuntu respectively. I think I made sure to install Windows first, then Ubuntu second. I'm using EFI boot, though. Are you using legacy BIOS or EFI/UEFI?


How to fix Ubuntu 14.04 LTS login screen hangs with "logging in..."

Looks like pam_kwallet.so is missing.
PAM is the authentication module used by lightdm and it wants to load kwallet (I guess that's a KDE keyring) but the library is gone.

If you have access (somehow), try to install the package containing the pam_kwalet.so, or try to configure PAM so that it would not look for this file.

Automatically: try running pam-auth-update and disable KDE wallet (kwallet).

Manually: PAM configuration is in /etc/pam.conf and /etc/pam.d/* -- so grep those for kwallet, (re)move configuration referring to kwallet and retry.

Once you are finished with upgrade then you may want to return the pam-kwallet config, just make sure you have pam_kwallet.so installed.

Looks like Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/lightdm/+bug/1309535


Intel HD4000 and yet only OpenGL 3.0 (ubuntu 12.04)

Because OpenGL 4.x is not yet implemented in Mesa 9.2 as far as I know. I read an article (german) some days ago that 3.3 is planned for Mesa 10.0 and an OpenGL 4.0 implementation is also in the works.

See also this document: http://cgit.freedesktop.org/mesa/mesa/tree/docs/GL3.txt


How to isolate a process so that it can only see one network interface?

There is a unix saying everything is a file. If your program gets filesystem access, it can at least see all devices (if access rights are set so, which they probably are).

The easy solution could be virtualization, like using KVM or User Mode Linux.


I have tried to add subtitles to mp4 video but no luck

If you're trying to add hard subtitles to your video, you should be able to just do this:

ffmpeg -i Overdrive.mp4 -vf subtitles=Overdrive.srt Overdrive_hardsubs.mp4


Dual Boot / Grub 2 issues (Ubuntu/Windows)

After a hard shutdown you often have to make repairs. With Windows is it chkdsk, but with Linux and ext formats it is fsck,

From liveDVD/Flash so everything is unmounted,swap off if necessary, change example shown with partition sdb1 to your partition(s)
e2fsck is used to check the ext2/ext3/ext4 family of file systems. -p trys fixes where response not required

sudo e2fsck -C0 -p -f -v /dev/sdb1

if errors: -y auto answers yes for fixes needing response, also see man e2fsck

sudo e2fsck -f -y -v /dev/sdb1

You may need to run both on sdb1, sdb3 & sdb5.


Ubuntu 13.04 - When maximized, Window title blocks the maximize, minimize, and close buttons

This shouldn't happen. It looks like a bug, the buttons stay visible when I'm hovering them. Do they re-appear if you hover out of the title bar and come back over the buttons?
Maybe you should open a bug for Unity on Launchpad.

Edit: Another possibility is that the window is not really maximised, and your title bar goes in fact behind the Unity panel, but it doesn't seem to be the fact here (you have the "un-maximize" icon, not the "maximize" one).


How do I get a persistent mount between boots?

I think the options field (the 4th) is missing, it should be something like this:

UUID=4be9f4bd-5666-4c21-8715-5d2a866fd840 /media/Raid5    ext4  auto  0   0


Do donations go to Canonical or to the Ubuntu Foundation?

From http://en.wikipedia.org/wiki/Ubuntu_Foundation

  The Ubuntu Foundation is a purpose trust founded by Mark Shuttleworth and Canonical Ltd. to ensure the long-term maintenance of the Ubuntu Linux distribution independently of the  commercial activities of Canonical Ltd. Its initial funding commitment is $10M. Its current advisory board is made up of chairman Mark Shuttleworth, founder of Canonical Ltd., and representatives of the Ubuntu Community Council and the Ubuntu Technical Board.

  Although it was originally announced that the Ubuntu Foundation would employ core members of the Ubuntu community[2] as of 2008, the Foundation remains dormant. Mark Shuttleworth describes it as an "emergency fund" in the event that Canonical's involvement in the Ubuntu project ends.

I think you'll need to contact Canonical's legal staff for a full answer of how the money is managed and allocated in relation to Ubuntu, and to ask for that clarification to be included on the donation page of the site as well. However, given the dormancy of Ubuntu Foundation, one can infer that the money is handled by Canonical and is allocated to activities pertinent to Ubuntu.


Use UNetBootin application instead of Rufus, and it works.


Is this behavior already possible?

Everything is possible in linux. You will need some basic knowledge about the Xserver, some time and a system to test on, since you are messing with your X and you certainly need the browser running if you need help :-)

In my opinion there are three possible solutions:

Multimonitor-setups use Xinerama. The simplest solution i can think of is to add a third virtual screen to your configuration and simply move the windows there using xdotool. There are some downsides to this solution but it would not require the effort of having to move windows between different Xservers which in general is not possible.
Since it is not possible to move windows between different Xservers, we need a kind of proxy like xmove or Xpra to do this for us. I think the windows then live in a separate Xfvb session to hide the windows. You can attach  and detach to the session.
Regardless of what method you are using, you need an event when the monitor gets unplugged. The event should get triggered when the screen is disconnected and also when reconnected. You can daemonize the script to watch for the event.

I would prefer the solution using Xpra for various reasons. I can only give you some hints of how to do it. The solutions are not complete but should get you started.

Xinerama Solution

Setup

The Xinerama setup has to get extended to have a static configuration:
See https://help.ubuntu.com/community/XineramaHowTo

see also fake third screen and Xdummy

get affected windows

We can use xdotool to search for windows. Afterwards we can check their position and move them. I am assuming two monitors with 1920x1080 configuration. The following will move all windows from the right to the left xinerama screen.

while read xwindowid; do
    eval $(xdotool getwindowgeometry --shell "$xwindowid")
    if (( X > 1920 && X <= (1920 * 2))); then
        xdotool windowmove --relative $WINDOW -1920 y
    fi
done <<< "$(xdotool search --screen 0 '.*')"

You can now move all the windows from your laptop screen (screen0) to a third (virtual) screen if a monitor gets attached. At the same time you can move any window that is stored on the third screen to the first screen.

XPRA solution

In order to use Xpra for moving the windows, all windows have to get managed by Xpra prior. You have to start the whole desktop using Xpra on system startup. Two times one is your main desktop where you work and the other is mainly a virtual desktop.

xpra start-desktop :99
xpra start-desktop :1 --exit-with-children −−attach

Now you can have Windows for the disconnected screen running in a separate xpra session and attach/detach from it when the monitor switches.

xpra attach :99
xpra detatch :99

There is also a dicontinued gnome shell extension that could be useful if you want to manually move a window from the hidden :99 to the normal :0 between started xpra displays.

The event

You can watch for the disconnect/reconnect of a specific display
maybe watch for changed dimensions of your xinerama using xwininfo to have it independent of the un-plugged monitor if you want i.e. to extend your setup to 3 monitors and unplug an arbitrary device. Note that this will only work for the xpra solution.

xwininfo -display :0 -root | grep -e "-geometry"

-geometry 5760x2160+0+0


Show window for transfering and extracting files in KDE Plasma 5

KDE Frameworks 5 and Plasma 5 notifications

As default the plasma 5 desktop is showing copy progress in the task buttons and in the notifications:

Task manager setting: "Show progress and status information in task buttons"

Notification Settings: "Track file transfer and other jobs"

If both (task button progress & notification transfer) settings are disabled the traditional file transfer window will be shown:

Plasma setting changes may need to restart the plasmashell - logout and login.

KDE Forums: Dolphin not showing native file transfer dialog - https://forum.kde.org/viewtopic.php?f=224&t=135264


You might be asking the wrong question. You're thinking about what you can do to prevent future attacks, but the risks to you from this one appear from your description to be far from over.

From your description, it seems your system was broken into by an actual person (not just some automated process), who did whatever they wanted to your system. They may have installed rootkits or made any other nasty, subtle changes.

You have to wipe your disk and reinstall. In this particular situation, it's especially impossible to predict all the changes that may have been made to your system. There's debate about whether or not this is always necessary after malware infection, but here, you really cannot predict what has happened because a real person directly controlled your computer. There's no question about it: the first thing to do is wipe your disk and reinstall from trusted media.

If you continue to use this system without wiping the disk and reinstalling, you put your own information security, as well as that of any other users and anyone who relies on you to keep any electronic data in confidence.

If you don't have fully current backups, you should of course documents first, preferably by booting from a live CD/DVD/USB (don't create it from a file on this computer) and accessing them that way.

Before wiping and reinstalling:

Don't log in to any online services from the compromised system. (Or, if you have already, then at least no more.)
Avoid using the system at all. Don't keep it running.

After wiping, and during the reinstallation and afterwards:

Don't use the same password. Your password shouldn't be stored on your computer in cleartext, but (1) it could have been captured by software installed by the intruder (for example, with a keylogger), and (2) your password hashes could have been dumped and might successfully be cracked, especially these days with cheap cloud computing and multi-GPU password crackers.
Change all your passwords for any online services you've accessed from this computer in the recent past (even somewhat before the attack). And if there's any chance your password for an online service was stored in your browser or elsewhere on your computer, make sure to change it even if you hadn't logged in to it for a long time before the attack. Passwords stored in web browsers are trivially easy for anyone with control over your system to access.
If you store credit card or other such data on your computer--especially if it's saved in a web browser or in a client application--or if you've accessed such personal financial information recently through your computer, you should be alert for the possibility of attempts at identity theft. In this case, you should read your credit card and bank statements carefully. Needless to say, as covered by the previous point, you should change any passwords for online banking if you've used the on this computer.


find: paths must precede expression: `.'find: possible unquoted pattern after predicate `-exec'?

Is /abc/abc/ an existing directory? Where are the files to be searched? The "paths must preceed.. " message is a crypto-mesage. Decoded it means that the first (or first several) parameter to find is not a directory tree for find to traverse. Since the rest of the parameters are "find expressions", that's what it complains about.
The command you're -execing needs to be terminated by a semicolon (;). But, since a semicolon would terminate (the parsing of) the find command,  -exec's semicolon must be escaped with a backslash (\). thus

-exec ...command... \;

Welcome to the world of `find` magic. Re-read `man find`.

Your sed expression is wrong. It should be:
 sed -e 's/domain1\.it/domain2\.com/'

The backslash (\) simply flips the "special handling" flag on the next character, so domain1\it matches "domain1it", not "domain1.it". "\i" isn't special, so it's treated like "i".


Does "Software Updater" only update software installed using apt, or also software installed using snap?

Software Updater only updates installed apt packages. Installed snap packages are automatically updated separately in the background. You can also update snap packages from the terminal with the following command:

sudo snap refresh

The sudo snap refresh command  updates the specified snaps, or all snaps in the system if none are specified. The results of sudo snap refresh will list the snaps that were refreshed by that command.

Since snap packages are standalone packages that are bundled with everything necessary to install each snap package, it is possible to install a snap package alongside an apt package of the same application and use either or both of them, as well as being possible to mix and match apt and snap packages freely. This is a great convenience when you need to install the latest version of an application. In fact some snap packages such as the node snap (Node.js) are available in multiple versions and you can even install multiple versions of the same software and select which version to use each time you run the software.

If there are multiple versions of the same application installed it can get confusing if they both have the same icon in the Dash, however you can also run any snap package from the terminal with this command:

snap run snap-package-name

If there is a snap package named snap-package-name installed the above command with run it, but it will not run the apt package of the same application.


Options:

Safest - remove all the PPAs that are erroring

Use either ppa-purge or Software & Updates

Risky - launch Software & Updates > Other Software > clicking on the erroring PPAs > Edit... > change Distribution to one that the PPA has packages for. You could search for the PPA in Google to find the Launchpad page to check which Ubuntu version the PPA has packages for

Note that this is much more risky because the PPA creator didn't at all test installing to 18.04, you could potentially break your system (which you run the risk of doing anyway with PPAs - they're not packages tested with normal Ubuntu quality processes to work on Ubuntu and with Ubuntu updates)


How access openssh-server with external IP address from outside the Local Area Network

My mistake was not setting the ports in the ssh_config, sshd_config and router to the same number. Earlier, I changed the port numbers. I mixed up the config files for the server and the client. Now all ports in all config files and in the router have the same number. Now I can access the server from the client using the external IP address.


wget script, but pipe it to bash only if SHA256 of script matches one-liner

So you want to download and run http://example.com/install.sh.

For now I assume that you have its SHA256 hash stored locally in a file called my-sha256.txt. The file contains only the hash itself and a Unix-style linebreak character, so its size must be exactly 65 bytes. You can create it by simply running this:

sha256sum ORIGINAL_FILE.SH | grep -Eo '^\w+' > my-sha256.txt

How you distribute this hash file from your development machine to the client is not part of this answer (yet, you might clarify your question and ask me to update this part based on your detailed specifications).

The actual command your client has to run to download, verify, and on success execute the script could look like this:

t=$(mktemp) && wget 'http://example.com/install.sh' -qO "$t" && if sha256sum "$t" | grep -Eo '^\w+' | cmp -s my-sha256.txt ; then bash "$t" ; else echo FAIL ; fi ; rm "$t"

Slightly shortened and ugly version without whitespace:

t=$(mktemp)&&wget 'http://example.com/install.sh' -qO"$t"&&if sha256sum "$t"|grep -Eo '^\w+'|cmp -s my-sha256.txt;then bash "$t";else echo FAIL;fi;rm "$t"

Placed on multiple lines for readability:

t=$(mktemp) &&
wget 'http://example.com/install.sh' -qO "$t" &&
if sha256sum "$t" | grep -Eo '^\w+' | cmp -s my-sha256.txt
    then bash "$t"
    else echo FAIL
fi
rm "$t"

If you want to directly provide the hash inside the command as string instead of reading from a file, simply use one of my original command versions above and replace the occurrence of my-sha256.txt with <(echo YOUR_HASH), inserting your real hash instead of the "YOUR_HASH" placeholder of course.

Explanation:

The script/one-liner first creates a temporary file using mktemp (uses the system's temp folder /tmp).
Then it uses wget to download your installation script from the specified URL and save it in the temp file.
Now we calculate its hash sum, filter only the hash value from the output of sha256sum and compare that to what we have stored in out my-sha256.txt.
If both hashes equal, we will invoke bash with our temporary script file as argument, else we echo FAIL or you could output a custom error message.
In the end we clean up by deleting our temporary file in both cases.

However, coming back to the problem of securely distributing the hash to verify the original script, this solution above will not help you much, as it solves one problem by creating another one of the same kind.

What you actually should do is to create a GPG key pair (and publish your public key to a keyserver), sign your script with it and offer the compressed signed binary for download. Then let the client verify and decrypt the script using gpg again and run it on success.


Why is it not possible to burn a multisession DVD using brasero?

When burning it there is an option called Leave the disc open to add other files later

Click on Properties And the following Windows will appear:

Other users have reported that turning on DAO in Edit > Modules > growisofs > Settings also helped.

Lastly it also depends on the DVD Recorded you are using. Some models have been known to create this problem. Changing the unit helped.


RAID disk size is less than display in SSA on HP Proliant DL380 Gen10

This problem was solved.
As follows, to be exact HP ProLiant DL380 Gen10 supports Ubuntu 16.04.3 (HWE Kernel 4.10).
http://h17007.www1.hpe.com/us/en/enterprise/servers/supportmatrix/exceptions/ubuntu_exceptions.aspx
After re-installing it, disk is recognized correctly.


Creating and configuring an Ubuntu .vdi image

There are lots of internet pages that offer different Ubuntu images in different configurations. The two top google hits are:

VirtualBox Images
VirtualBoxes

But there are lots more. Note that you can also use vmdk (VMWare) images and import them to VirtualBox. VMPlanet is the leading site for VMWare images.


gnome-terminal - open new window instead of finding the existing one

Use the Middle-Button on your mouse when you're clicking on the icon. This will open a new instance of that application in gnome.

But I suggest you to make a shortcut for yourself for Terminal because you're going to put your hands on the keyboard anyway. I use Super + Enter since I use terminal too much!

You can also change the /usr/share/applications/org.gnome.Terminal.desktop and change the gnome-terminal exec commands to gnome-terminal --window.


How can I fix my UEFI boot menu after installing Ubuntu?

The extra Ubuntu entries probably aren't related to your problem, but I could be wrong. Certainly I've heard of weirder EFI problems. Thus, you might as well address it. To do so, first type sudo efibootmgr in Ubuntu. This should produce a list like this:

BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000,0002,0003,0001
Boot0000* rEFInd Boot Manager
Boot0001* fedora
Boot0002* rEFInd (via PreLoader)
Boot0003* ubuntu

These entries are from one of my systems, and of course yours will be different -- it will probably have a large number of ubuntu entries. Take note of the BootOrder list -- it identifies the order in which entries are tried. Chances are one of your ubuntu entries will be first on that list, or at least very early on it. You can delete all of the other ubuntu entries with efibootmgr, as in:

sudo efibootmgr -b 0003 -B

That command deletes entry Boot0003 (which is the only ubuntu entry in my example).

Once that's done, try again to boot a USB flash drive. If you can't do it, try using the Boot From EFI File option shown in your screen shot; that may enable you to select a file on your USB flash drive.

It's also conceivable that there's a setting in your firmware that's disabling USB flash drive access. On one of my computers, for instance, there's an option to do a quick USB initialization that prepares USB keyboards but not USB storage devices. If that option is enabled, it becomes impossible to boot from a USB flash drive. Thus, such options must be set to do a full USB initialization at boot time. (Check your USB flash drive's access lights as you boot; if they don't flash, chances are the firmware is not initializing the device.)

If all this fails, it's conceivable that installing rEFInd will help; in theory, it should produce a list of bootable USB devices. This will only work if the USB devices are initialized, though.


Please try to install Libre office downloaded from website. Follow the README files in directories for install. It works very well on my Lucid Desktop and automatically integrates with OS GUI.


What happened to the 'suspend' and 'shut down' commands?

Support for panel indicators thru Hud has been removed, may come back down the road, may not.

https://bugs.launchpad.net/hud/+bug/1165420


I would recommend to remove local extension installation by
rm /home/joha/.config/inkscape/extensions/latextext.py

Then you have two options:

to use preinstalled LaTeX (pdflatex) (Inkscape, Extensions → Mathematics → LaTeX (pdflatex)) with already installed Inkscape from PPA
you need to install dependencies and previous version of Inkscape:
sudo apt-get install texlive pstoedit

to use preinstalled LaTeX extension (Inkscape, Extensions → Render → LaTeX)
you need to install dependencies and previous version of Inkscape:
sudo apt-get install texlive pstoedit
sudo apt-get install ppa-purge
sudo ppa-purge ppa:inkscape.dev/stable

.


Find a file beginning with a string but having a specific extension

You can use find, searching recursively from the current directory:

find . -type f -name 'start*.ext' -exec mv -i {} foobar.txt \;

Assuming the file name starts with start and has an extension .ext, renaming the file to foobar.txt. Replace these to meet your need.

Searching non-recursively:

find . -maxdepth 1 -type f -name 'start*.ext' -exec mv -i {} foobar.txt \;

Note that, to rename a bunch of files to specific patterns, the approach will be a different; The above procedure is for finding-renaming a single file to something fixed as you have mentioned in the question.

As you want to just rename the file, you can use rename (prename) too:

rename -n 's/^start.*?\.ext$/foobar.txt/' *.*

-n will do the dry-running, to perform the actual action remove -n:

rename 's/^start.*?\.ext$/foobar.txt/' *.*


How to access an encrypted NTFS partition?

i fear kaspersky kryptostorage is not compatible with linux and uses an proprietary format.

You have to try with xp  and the original software. In the future i would the opensource + cross platform truecrypt.


Custom trackpad mapping doesn't work for all applications

I found out how to solve the problem: Read this if you're having the same issue.

At least it worked for me, since my trackpad is a Synaptics. This changes the direction from the driver level, which is before the X mapping. Be sure to reset the button map to the original, or you'll get "normal scrolling" in most applications, since it would be being inverted twice.