Configuring Lubuntu to run a script when LXDE starts

Assuming you're using Lubuntu 13.10, edit ~/.config/lxsession/Lubuntu/autostart. Add the appropriate command on a separate line to the end of the existing file. If such a file doesn't exist, create it with Leafpad or nano.

By the way, are you sure about xinput disable 14? Based on man xinput, it appears that xinput --disable 14 may be correct.

--enable device
           Enable the device.  This  call  is  equivalent  to  xinput
           --set-prop device "Device Enabled" 1

--disable device
           Disable  the  device.  This  call  is equivalent to xinput
           --set-prop device "Device Enabled" 0

Edit: I asked about -- here.


When a host has DHCPCD installed on it, it can cause the interface to still get an extra DHCP IP on the interface even though it is set to Static IP.
In the /etc/dhcpcd.conf file add denyinterfaces <interface name> towards the bottom of the file.
Example:
denyinterfaces eth0

This will cause the DHCPCD to stop sending extra IPs to the interface.
Hope this helps!


I did a package search on the Ubuntu repository site and found many locations for the krb5 packages.

I don't know why the "standard" repositories didn't contain them, but I just added a repository, did an update, and now they are installable.


How to solve the problem "package is broken or not fully installed"?


Directory bookmarks for open/save files in Matlab

On my Matlab version there is a drop-down list called "Current Directory:" in the "Matlab Toolbar". It saves recent directories.

Also, in the editor, you can type cd and press the up button to get the relevant history.


Ubuntu 16.04 LTS - Poor battery life on Intel HD Graphic

Don't know what graphics driver you have installed. I was facing similar problem as yours and i tumbled on to your post while searching for solution. Anyways, this is how i solved my problem:

I had the latest nvidia drivers(367) installed from Graphics driver PPA as i occasionally do gaming(DotA 2) on my system. I downgraded the drivers to 361(proprietary tested ones) from ubuntu repos and the problem was solved.
Now i am getting 11w/h with chrome running where as before i was getting 23w/h on intel card. Thats less than half.

Btw, i had to find your post from history but i know the pain. :) Hope it helps.


"About This Computer" and System Settings/Details do not open

Have you added the Guest Additions in the VirtualBox VM? You should have that option when the VM is running, the Devices menu should allow you the option of installing the Guest Additions from its ISO. That should prove beneficial to the Guest VM. Have found that a requirement if you want proper behaviour from the machine.


Rsync-ing highly compressible files - am I missing something here?

man rsync

From description:

"It is famous for its delta-transfer algorithm, which reduces the amount of data sent over the network by sending only the differences between the source files and the existing files in the destination."

So the speed you got indicated more or less how quick rsync could confirm that the file was already transferred or confirm and transfer the changed/missing parts.


I know this is a rather general question and can have a lot of answers, but I have found one that need to be documented, so here it is.

Both the Google Talk plugin for Firefox as well the Flash plugin tried to get the sound board for themselves, those selfish annoyers. I solve it by quitting Firefox (and Chrome as well, maybe it is causing problems too after all) and then restarting pulseaudio. It worked flawlessly.

Of course, there may be other applications locking the sound hardware. To discover them, do what I did:

$ lsof /dev/snd/by-path/<whatever is in this directory>

And then grep the name of the listed process from ps aux.

Your problem can be very different, for sure, but you may want to try this solution.


You've run the commands the wrong way around. apt-get update should be first (it updates your computer's list of what software is available) and then apt-get upgrade (upgrades the packages installed).

In short, just run sudo apt-get upgrade again, or open Update Manager.

Edit I've just noticed that I'm not using this PPA, I'm using the daily-builds version ppa:banshee-team/banshee-daily. There is an inherently higher chance that there'll be a significant bug one day but it has worked for me so far:

sudo add-apt-repository ppa:banshee-team/banshee-daily
sudo apt-get update
sudo apt-get upgrade

Or you can stick with the release PPA and wait for somebody to fix the libmono-upnp-cil-dev dependency issue (that fossfreedom points out).


How to use 'set | grep' in script correctly in order to obtain a value of DBUS_SESSION_BUS_ADDRESS variable?

I post this answer to my own question to close it.

Thanks to help of muru and the answer to this question I figured out how to obtain the DBUS_SESSION_BUS_ADDRESS variable in the form of DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-N1wmwpEVBj which is suitable for my purpose (using this I don't even need to save the variable to the file):

PID=$(pgrep gnome-session)
export $(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$PID/environ)

Using code from the mentioned answer ends up in obtaining just unix:abstract=/tmp/dbus-N1wmwpEVBj part of the DBUS_SESSION_BUS_ADDRESS variable. It does not work for me.


Run .bashrc commands without opening a terminal

If I remember correctly, the ~/.profile file gets loaded upon login. Just make your ajustment there.


Problems with KWallet after resuming from suspend

Go into System Settings -> Account Details -> KDE Wallet. Make sure the Wallet isn't set up to close automatically.

Then System Settings -> Network Connections. You need to have "System Connection" + "Connect Automatically" enabled for each of your connections Wireless & Wired in order for your connection to return automatically.


You can use HTML5 websockets with the latest stable Nginx installed, to easily install it use the repositories:

sudo add-apt-repository ppa:nginx/stable
sudo apt-get update
sudo apt-get install nginx

Remember, you have to remove your old nginx, nginx-common and nginx-full packages before installing the new version.

I've already tested proxying websockets ( using socket.io ) on Nginx 1.4.1 and it works fine.


Swap errors in logs with encrypted home, 17.10 Artful Aardvark

I was having similar errors while starting up Ubuntu 17.10 on my laptop, and I noticed that the swapfile wasn't being used. It turns out the installer made an incorrect entry for the encrypted swapfile in the /etc/crypttab file.

cryptswap1 /target/swapfile /dev/urandom swap,offset=1024,cipher=aes-xts-plain64

The /target part is the path at which the Ubuntu installer mounts the target filesystem where installation will be done, and should only be used when booting from the installer media. Somehow this got left over on the installed configuration. I removed that part and rebooted, and now I don't see the cryptography error, and the swapfile is being mounted and used.

This is what my /etc/crypttab looks like now:

cryptswap1 /swapfile /dev/urandom swap,offset=1024,cipher=aes-xts-plain64

Hope that helps.


After install of kubuntu-full, no longer have access to Unity login

You need to install unity-greeter if it is missing.

and edit /etc/lightdm/lightdm.conf change greeter-session=lightdm-kde-greeter to greeter-session=unity-greeter and probably restart lightdm with sudo service lightdm restart or reboot


You can use this (rather long) one-liner, replacing PATTERN with your search pattern (case insensitive unless you remove the -i option after grep):

find / -iname "*.tar.gz" -exec bash -c 'result=$(set -o pipefail ; echo "{}" ; tar -tf {} | grep -i "PATTERN" | sed "s/^/    /") ; test $? -eq 0 && printf "$result\n"' \;

If you don't want to search your whole computer but just a specific directory (recursively), you may specify that as first argument after find instead of the /. The .tar.gz suffix for archives to process is case insensitive as well unless you replace the -iname after find with name.

The output might look somehow like this (searching in /usr/share/doc for the pattern default):

/usr/share/doc/openjdk-8-jre-headless/test-amd64/failed_tests-hotspot.tar.gz
    test/langtools/JTwork/tools/javac/lambda/methodReferenceExecution/MethodReferenceTestInnerDefault.jtr
    test/langtools/JTwork/tools/javac/lambda/methodReferenceExecution/MethodReferenceTestSuperDefault.jtr
    test/langtools/JTwork/tools/javac/lambda/methodReferenceExecution/MethodReferenceTestVarArgsSuperDefault.jtr
    test/langtools/JTwork/tools/javac/lambdaShapes/org/openjdk/tests/vm/DefaultMethodsTest.jtr
/usr/share/doc/apg/php.tar.gz
    ./themes/default.php

You see the archive path in one line followed by all content entries matching the pattern, each in a separate line indented by 4 spaces.

This can be also put in a script (e.g. archive-search, don't forget to make it executable with chmod +x FILENAME):

#!/bin/bash
# Usage:   archive-search PATTERN DIRECTORY

find "$2" -iname "*.tar.gz" -exec bash -c '
        result=$(
                set -o pipefail
                echo "{}"
                tar -tf {} | grep -i "$0" | sed "s/^/    /"
        )
        test $? -eq 0 && printf "$result\n"
' "$1" \;

or in a Bash function (e.g. archive-search, append to your ~/.bashrc if you want to have it available in every new Bash session):

archive-search () {
    # Usage:   archive-search PATTERN DIRECTORY

    find "$2" -iname "*.tar.gz" -exec bash -c '
            result=$(
                    set -o pipefail
                    echo "{}"
                    tar -tf {} | grep -i "$0" | sed "s/^/    /"
            )
            test $? -eq 0 && printf "$result\n"
    ' "$1" \;
}

Both the script and the function take search pattern and directory as command-line arguments, like this:

archive-search "default" /usr/share/doc


You need to install the 455 version of Nvidia drivers.
Run in a terminal
sudo apt purge 'nvidia.*'
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt install nvidia-driver-455

Reboot and disable Secure Boot in BIOS.


Help to (a) reinstall the OSCAR application & (b) verify the FILES directory tree

For OSCAR installation you can use its deb-package from official repository:

sudo add-apt-repository universe
sudo apt-get install oscar

And then execute OSCAR in the terminal to use it.


Pen tablet/ MousePen doesn't work in Ubuntu

This might not be the correct procedure but I managed to get it to work. I'll post it and you can do it if you're feeling adventurous.

There are two ways I did this but I can't guarantee that they will work for you simply because I still consider myself a newbie and I did this by following other people's guides.

WARNING: This includes compiling a custom kernel.Make sure to have at least one or more older kernels installed just in case something goes wrong!

First (easy) way:

Download the kernel source from The Linux Kernel Archives. Just click on the "Latest stable kernel" button.
Extract the archive: open the terminal and navigate to where you downloaded the kernel and run this command: tar -xvJf linux-"KernelVersion".tar.xz (replace "KernelVersion" with the version number of the downloaded kernel).
This will create a new folder usually named linux-"KernelVersion" (again, this is the version number of the downloaded kernel). Enter that folder, then navigate to drivers > hid. You should now be in /path/to/download/linux-"KernelVersion"/drivers/hid.
Edit the hid-ids.h file with your favourite text editor: gedit hid-ids.h or nano hid-ids.h or kate hid-ids.h
In  the text editor, navigate to the line that says (should be around line 520-530):

  #define USB_DEVICE_ID_KYE_MOUSEPEN_I608X  0x5011

Edit the line so it looks like this:

  #define USB_DEVICE_ID_KYE_MOUSEPEN_I608X  0x501a

Save and exit. Now it's time to compile the kernel.

You can find many guides for compiling the kernel online, so I think it would be better to refer you to one than to write the guide myself. I found this article most helpful. Read the article carefully and be careful about the configuration.

With this fix, everything worked perfectly, the only thing bugging me was that xinput now listed several Genius MousePen i608X devices.

Second (hard) way:

This way is harder in the sense that you will have to edit few more files. This is the way described in the patch you mention.

Follow steps 1 - 3 from the first way.
Edit the hid-core.c file like this:

Navigate to the chunk of code that looks like this:
    { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_GENIUS_GILA_GAMING_MOUSE) },
    { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_GENIUS_MANTICORE) },
    { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_GENIUS_GX_IMPERATOR) },
    { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_ERGO_525V) },
    { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_I405X) },
    { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_MOUSEPEN_I608X) },
    { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_M610X) },

And change it to this:
    { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_GENIUS_GILA_GAMING_MOUSE) },
    { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_GENIUS_MANTICORE) },
    { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_GENIUS_GX_IMPERATOR) },
    { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_ERGO_525V) },
    { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_I405X) },
    { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_MOUSEPEN_I608X) },
    { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_MOUSEPEN_I608X_2) }, //add this
    { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_M610X) },

Edit the hid-ids.h similarly to the first way, but instead of editing that one line, add this line after it:

  #define USB_DEVICE_ID_KYE_MOUSEPEN_I608X_2 0x501A

Edit the hid-kye.c file like this:

Find this chunk of code:

/*
 * See EasyPen M610X description, device and HID report descriptors at
 * http://sf.net/apps/mediawiki/digimend/?title=KYE_EasyPen_M610X
 */

and before it, add this:

/* Original MousePen i608X report descriptor size */
#define MOUSEPEN_I608X_2_RDESC_ORIG_SIZE  482

/* Fixed MousePen i608X report descriptor */
static __u8 mousepen_i608x_2_rdesc_fixed[] = {
  0x06, 0x00, 0xFF, /*  Usage Page (FF00h),             */
  0x09, 0x01,       /*  Usage (01h),                    */
  0xA1, 0x01,       /*  Collection (Application),       */
  0x85, 0x05,       /*    Report ID (5),                */
  0x09, 0x01,       /*    Usage (01h),                  */
  0x15, 0x80,       /*    Logical Minimum (-128),       */
  0x25, 0x7F,       /*    Logical Maximum (127),        */
  0x75, 0x08,       /*    Report Size (8),              */
  0x95, 0x07,       /*    Report Count (7),             */
  0xB1, 0x02,       /*    Feature (Variable),           */
  0xC0,             /*  End Collection,                 */
  0x05, 0x0D,       /*  Usage Page (Digitizer),         */
  0x09, 0x02,       /*  Usage (Pen),                    */
  0xA1, 0x01,       /*  Collection (Application),       */
  0x85, 0x10,       /*    Report ID (16),               */
  0x09, 0x20,       /*    Usage (Stylus),               */
  0xA0,             /*    Collection (Physical),        */
  0x14,             /*      Logical Minimum (0),        */
  0x25, 0x01,       /*      Logical Maximum (1),        */
  0x75, 0x01,       /*      Report Size (1),            */
  0x09, 0x42,       /*      Usage (Tip Switch),         */
  0x09, 0x44,       /*      Usage (Barrel Switch),      */
  0x09, 0x46,       /*      Usage (Tablet Pick),        */
  0x95, 0x03,       /*      Report Count (3),           */
  0x81, 0x02,       /*      Input (Variable),           */
  0x95, 0x04,       /*      Report Count (4),           */
  0x81, 0x03,       /*      Input (Constant, Variable), */
  0x09, 0x32,       /*      Usage (In Range),           */
  0x95, 0x01,       /*      Report Count (1),           */
  0x81, 0x02,       /*      Input (Variable),           */
  0x75, 0x10,       /*      Report Size (16),           */
  0x95, 0x01,       /*      Report Count (1),           */
  0xA4,             /*      Push,                       */
  0x05, 0x01,       /*      Usage Page (Desktop),       */
  0x55, 0xFD,       /*      Unit Exponent (-3),         */
  0x65, 0x13,       /*      Unit (Inch),                */
  0x34,             /*      Physical Minimum (0),       */
  0x09, 0x30,       /*      Usage (X),                  */
  0x46, 0x40, 0x1F, /*      Physical Maximum (8000),    */
  0x26, 0x00, 0xA0, /*      Logical Maximum (40960),    */
  0x81, 0x02,       /*      Input (Variable),           */
  0x09, 0x31,       /*      Usage (Y),                  */
  0x46, 0x70, 0x17, /*      Physical Maximum (6000),    */
  0x26, 0x00, 0x78, /*      Logical Maximum (30720),    */
  0x81, 0x02,       /*      Input (Variable),           */
  0xB4,             /*      Pop,                        */
  0x09, 0x30,       /*      Usage (Tip Pressure),       */
  0x26, 0xFF, 0x07, /*      Logical Maximum (2047),     */
  0x81, 0x02,       /*      Input (Variable),           */
  0xC0,             /*    End Collection,               */
  0xC0,             /*  End Collection,                 */
  0x05, 0x01,       /*  Usage Page (Desktop),           */
  0x09, 0x02,       /*  Usage (Mouse),                  */
  0xA1, 0x01,       /*  Collection (Application),       */
  0x85, 0x11,       /*    Report ID (17),               */
  0x09, 0x01,       /*    Usage (Pointer),              */
  0xA0,             /*    Collection (Physical),        */
  0x14,             /*      Logical Minimum (0),        */
  0xA4,             /*      Push,                       */
  0x05, 0x09,       /*      Usage Page (Button),        */
  0x75, 0x01,       /*      Report Size (1),            */
  0x19, 0x01,       /*      Usage Minimum (01h),        */
  0x29, 0x03,       /*      Usage Maximum (03h),        */
  0x25, 0x01,       /*      Logical Maximum (1),        */
  0x95, 0x03,       /*      Report Count (3),           */
  0x81, 0x02,       /*      Input (Variable),           */
  0x95, 0x05,       /*      Report Count (5),           */
  0x81, 0x01,       /*      Input (Constant),           */
  0xB4,             /*      Pop,                        */
  0x95, 0x01,       /*      Report Count (1),           */
  0xA4,             /*      Push,                       */
  0x55, 0xFD,       /*      Unit Exponent (-3),         */
  0x65, 0x13,       /*      Unit (Inch),                */
  0x34,             /*      Physical Minimum (0),       */
  0x75, 0x10,       /*      Report Size (16),           */
  0x09, 0x30,       /*      Usage (X),                  */
  0x46, 0x40, 0x1F, /*      Physical Maximum (8000),    */
  0x26, 0x00, 0x50, /*      Logical Maximum (20480),    */
  0x81, 0x02,       /*      Input (Variable),           */
  0x09, 0x31,       /*      Usage (Y),                  */
  0x46, 0x70, 0x17, /*      Physical Maximum (6000),    */
  0x26, 0x00, 0x3C, /*      Logical Maximum (15360),    */
  0x81, 0x02,       /*      Input (Variable),           */
  0xB4,             /*      Pop,                        */
  0x75, 0x08,       /*      Report Size (8),            */
  0x09, 0x38,       /*      Usage (Wheel),              */
  0x15, 0xFF,       /*      Logical Minimum (-1),       */
  0x25, 0x01,       /*      Logical Maximum (1),        */
  0x81, 0x06,       /*      Input (Variable, Relative), */
  0x81, 0x01,       /*      Input (Constant),           */
  0xC0,             /*    End Collection,               */
  0xC0              /*  End Collection                  */
};

In the same file find this chunk of code:

case USB_DEVICE_ID_KYE_MOUSEPEN_I608X:
      if (*rsize == MOUSEPEN_I608X_RDESC_ORIG_SIZE) {
          rdesc = mousepen_i608x_rdesc_fixed;
          *rsize = sizeof(mousepen_i608x_rdesc_fixed);
      }
      break;

and add this after it:

case USB_DEVICE_ID_KYE_MOUSEPEN_I608X_2:
      if (*rsize == MOUSEPEN_I608X_2_RDESC_ORIG_SIZE) {
          rdesc = mousepen_i608x_2_rdesc_fixed;
          *rsize = sizeof(mousepen_i608x_2_rdesc_fixed);
      }
      break;

In the same file find this chunk of code:

case USB_DEVICE_ID_KYE_EASYPEN_I405X:
  case USB_DEVICE_ID_KYE_MOUSEPEN_I608X:
  case USB_DEVICE_ID_KYE_EASYPEN_M610X:

and change it to this:

case USB_DEVICE_ID_KYE_EASYPEN_I405X:
  case USB_DEVICE_ID_KYE_MOUSEPEN_I608X:
  case USB_DEVICE_ID_KYE_MOUSEPEN_I608X_2: // add this line
  case USB_DEVICE_ID_KYE_EASYPEN_M610X:

In the same file find this chunk of code:

  { HID_USB_DEVICE(USB_VENDOR_ID_KYE,
              USB_DEVICE_ID_KYE_MOUSEPEN_I608X) },
  { HID_USB_DEVICE(USB_VENDOR_ID_KYE,
              USB_DEVICE_ID_KYE_EASYPEN_M610X) },
  { HID_USB_DEVICE(USB_VENDOR_ID_KYE,
              USB_DEVICE_ID_GENIUS_GILA_GAMING_MOUSE) },

and change it to this:

  { HID_USB_DEVICE(USB_VENDOR_ID_KYE,
              USB_DEVICE_ID_KYE_MOUSEPEN_I608X) },
  { HID_USB_DEVICE(USB_VENDOR_ID_KYE,                // add this line
              USB_DEVICE_ID_KYE_MOUSEPEN_I608X_2) }, // and this one
  { HID_USB_DEVICE(USB_VENDOR_ID_KYE,
              USB_DEVICE_ID_KYE_EASYPEN_M610X) },
  { HID_USB_DEVICE(USB_VENDOR_ID_KYE,
              USB_DEVICE_ID_GENIUS_GILA_GAMING_MOUSE) },

The last file to edit is in /path/to/download/linux-"KernelVersion"/drivers/hid/usbhid directory. It's called hid-quirks.c. Inside of it find this chunk of code:

  { USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS, HID_QUIRK_MULTI_INPUT },
  { USB_VENDOR_ID_SIGMA_MICRO, USB_DEVICE_ID_SIGMA_MICRO_KEYBOARD, HID_QUIRK_NO_INIT_REPORTS },
  { USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_MOUSEPEN_I608X, HID_QUIRK_MULTI_INPUT },
  { USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_M610X, HID_QUIRK_MULTI_INPUT },
  { USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_DUOSENSE, HID_QUIRK_NO_INIT_REPORTS },
  { USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_LTS1, HID_QUIRK_NO_INIT_REPORTS },

and change it to this:

  { USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS, HID_QUIRK_MULTI_INPUT },
  { USB_VENDOR_ID_SIGMA_MICRO, USB_DEVICE_ID_SIGMA_MICRO_KEYBOARD, HID_QUIRK_NO_INIT_REPORTS },
  { USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_MOUSEPEN_I608X, HID_QUIRK_MULTI_INPUT },
  { USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_MOUSEPEN_I608X_2, HID_QUIRK_MULTI_INPUT }, // add this line
  { USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_M610X, HID_QUIRK_MULTI_INPUT },
  { USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_DUOSENSE, HID_QUIRK_NO_INIT_REPORTS },
  { USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_LTS1, HID_QUIRK_NO_INIT_REPORTS },

Remember to save all the files after editing. Now you can compile the kernel as mentioned above.

Again, this might not be the correct way to do this, but since I didn't find the tutorial how to do it properly, I had to do it manually. It worked for me, but, again, I can't guarantee that it will work for you. Hope this helps you.


No GUI boot; startx error, I suspect no filesystem corruption

There is an error with your xorg.conf file - did you do an upgrade?

If you could post the complete error message when you type startx it will help, also when you log in with the CLI typesudo nano /etc/X11/xorg.conf and post the result.


How to move all subdirectories to current directory?

for dir in /A/*; do
    find "$dir" -mindepth 2 -depth -type d -exec mv -t "$dir" -- {} \;
done

This instructs find to search for all directories (-type d) at least 2 levels underneath (-mindepth 2) $dir depth-first (-depth). For each object it finds it runs mv -t "$dir" -- <SRC>. As always, mv doesn't allow you to merge a source directory into an existing target directory (but there are ways around that).

You can also avoid running an individual instance of mv for each source directory:

[...] -exec mv -t "$dir" -- {} +


Dead link for Eclipes in the Ubuntu's launcher

Create a file ~/.local/share/applications/eclipse.desktop
Add this content, adjust the paths to your Eclipse/STS location:

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Name=STS-3.5.1
Icon=spring_tool_suite.png
Path=/the/path/to/my/sts-3.5.1
Exec=env UBUNTU_MENUPROXY= /the/path/to/my/sts-3.5.1/STS
StartupNotify=false
StartupWMClass=Spring Tool Suite
OnlyShowIn=Unity;
X-UnityGenerated=true

Now open with nautilus:

user@host $ nautilus ~/.local/share/applications

Drag and drop the eclipse.desktop file to the unity launcer.


what versions of TLS speak your IMAP servers? TLS 1.0, 1.1, 1.2 or 1.3?
Ubuntu 20.4 don't support unsecure TLS versions like TLS 1.0 and 1.1.

Maybe this informations helps, too:

https://blog.surgut.co.uk/2019/08/how-to-disable-tls-10-and-tls-11-on.html

Regards


ubuntu 13.04 did not load after installing

Try This.

The problem is related to secure-boot.  Here is what you need to do:

This error indicates that it is related to Secure Boot which is a new security feature with Windows 8.  Once you disable Secure Boot, hopeful the problem will go away.

Reboot the notebook and press F10 until the BIOS loads.
Check both the "boot options" and "secure boot configuration"
sections for the ability to disable Secure Boot and enable Legacy
Boot Support.
Disable Secure Boot and enable Legacy Boot Support.
Save the changes and reboot the notebook.
Verify whether the issue is resolved and let me know.

Source:HP


The problem is, hybrid shutdown is using the hiberfil.sys, the explanation is here:

http://www.msfn.org/board/topic/152937-what-is-hybrid-boot-in-windows-8-and-how-does-it-work/

The guide with instructions on how to disable it is here:

http://www.techulator.com/resources/5201-How-enable-or-disable-Hybrid-Boot-Windows.aspx

Don't remove the hibernation file, it will cause data loss!


For backing up installed Softwares, preferences, themes & sources, go for Aptik

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

& for entire system backup refer to this post.


Okular allows draw over PDF. Not a laser-mode, but similar to requirement


Upgraded To 18.04 -> USB Harddrive doesn’t idle anymore

looks like autosuspend has not been installed

sudo apt-get install autosuspend


How to web-scrape using Ubuntu terminal?

Combine the curl and text processing utilites like grep, sed awk, etc.

For example:

curl https://askubuntu.com/questions/941409 &| grep -Po '(?<=<title>).*(?=</title>)'

returns the title of your question's page.


Symlinks and their paths are confusing - how can they be used effectively?

Not really, because either way you are still viewing/editing the files that the symlink is pointing to
When the symlink path is given, I think it means that the application thinks that the file is at that path; however, the data is still being read from/written to the same place in the file system (the original file). So yes, you can ignore it.
'Preserving symlinks', in my understanding, means that when you move a symlink file and it points to a relative path, the relative path will be adjusted so that it still points to the same file. It is probably a good idea to preserve symlinks. 'follow links' means that the action you are doing (such as copy) is done to the linked to files and all the files within the linked to directories. I think that if you follow links when copying, the actual files/folders will be copied to the new location. If you don't follow links, only the link is copied to the new address.

This wikipedia page has a detailed explanation of symlinks


How to start virtualmachine from terminal?

Here is a way to start a virtual machine from terminal :

Open Virtual Box, right-click on the virtual machine. Then click on Create shortcut on desktop.

Go to the desktop, right-click on the shortcut and edit it.

Then copy the command and paste it into the terminal.

/usr/lib/virtualbox/VirtualBox --comment "Ubuntu" --startvm "cea829eb-85fe-4842-b98e-e98603094be0"

or you can start in terminal like this.

Get your UUID of VM

cd "VirtualBox VMs"
cd your-virtualpc-name
cat your-virtualpc-name.vbox-prev |grep Machine

output should look like this.

neil@ASUS:~/VirtualBox VMs/Ubuntu$ cat Ubuntu.vbox-prev |grep Machine
  <Machine uuid="{cea829eb-85fe-4842-b98e-e98603094be0}" name="Ubuntu" OSType="Ubuntu" snapshotFolder="Snapshots" lastStateChange="2015-11-22T08:47:08Z">
      <ExtraDataItem name="GUI/RestrictedRuntimeMachineMenuActions" value="SaveState,PowerOff"/>
  </Machine>
neil@ASUS:~/VirtualBox VMs/Ubuntu$

Copy the Machine uuid

and run it in the command like so. With the quote marks

VBoxHeadless --startvm "cea829eb-85fe-4842-b98e-e98603094be0"


How can I recover data from a 2TB hard drive?

ddrescue
To recover data from a failing hard disk any further read or write access to this drive needs to be avoided as this dramatically increases damage and may eventually lead to a complete failure to access this drive.
It is therefore recommended that you first read all data that are still accessible on your drive by creating an image of this drive. Recovering your data can then be done from this image.
Ddrescue is a tool that allows copying all data from your drive and save it to either another (healthy) drive, or to an image on a healthy drive. The drive you save your image to needs to be at least of the same size as the original drive was.
There is a detailed guide on how to do this on the Forensic Wiki. The first step will be to boot your system e.g. from a live rescue system or CD and run the following command in a terminal:
ddrescue --no-split </dev/hda1> <imagefile> <logfile>

Replace above <entries> according to your system setup.
You can then perform data recovery e.g by using testdisc or photorec on the generated imagefile.


You could use Geary, but it is in an early stage of development.

There are a stable ppa and a daily ppa. If you want stable software, don't use the daily ppa, it's at your own risk.

To add the stable ppa and install Geary type the following in a terminal.:

sudo apt-add-repository ppa:yorba/ppa
sudo apt-get update
sudo apt-get install geary

To add the daily ppa and install Geary type the following in a terminal.:

sudo apt-add-repository ppa:yorba/daily-builds
sudo apt-get update
sudo apt-get install geary


The output of dpkg -S /bin/cp is:

coreutils: /bin/cp

which means /bin/cp is part of coreutils package. Reinstall it by running:

sudo apt-get install --reinstall coreutils

Next time place your custom executables in /usr/local/bin.


NVIDIA GeForce GT 640 compatible with 12.10?

Should be - see here.

Considering one myself since this card is available in silently-cooled versions from ASUS.  Research indicates it's probably the most powerful silently-cooled NVIDIA card available.

Currently I'm using a GT 520 with 304.43 drivers.  No issues.  So I'll be going NVIDIA again.

Edit: I installed the card and everything works perfectly.


How do I back up Mozilla Thunderbird emails when upgrading to 12.04?

The best way is to backup the Thunderbird profile.

Open your Homoe directory, Press Ctrl+H to show hidden files and folder, look for ".thunderbird" folder and save it somewhere. After upgrade just put it back there.


(Help!) erased lsb-release when installing Intel graphics driver

Here's the contents of my lsb-release

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.5 LTS"

Different Ubuntu releases will obviously have different values there.


Something's gone wrong with your apt keys or adding/changing repos or something... I don't know what

What did you do that caused these errors, and what fixes have you tried?

But here are some band-aid solutions for your symptoms:

To just add the missing keys, this command should work (replace the "2EA8..." string with your acutal missing keys)

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 2EA8F35793D8809A

May try --keyserver keys.gnupg.net if any aren't on ubuntu
[see https://askubuntu.com/a/141088/129271 ]

It looked kind of like you didn't add some PPA's correctly, according to Ubuntu's instructions it should "fetch the PPA's key" by itself. Here's the terminal directions from https://help.ubuntu.com/community/Repositories/Ubuntu

  Step 2: Open a terminal and enter:

$ sudo add-apt-repository ppa:user/ppa-name

  Replace 'ppa:user/ppa-name' with the PPA's location that you noted above.

  Your system will now fetch the PPA's key. This enables your Ubuntu system to verify that the packages in the PPA have not been interfered with since they were built.

In case there's a problem with your software sources, this should restore them to their "defaults". I'd make a backup copy of everything in /ect/apt/sources.list and /ect/apt/sources.list.d/ first, just in case. Not knowing what your Ubuntu version is I'm not sure what the "defaults" should be, or whether you've added extra PPA's or other sources. Running lsb_release -a should tell you about your version & "codename"

Backup the sources.list files

Just copy them to a backup folder somewhere, this should work:

sudo mv /etc/apt/sources.list /etc/apt/sources.list.old
sudo mv /etc/apt/sources.list.d /etc/apt/sources.list.d.old

Restoring the default Ubuntu sources.list

For Ubuntu, if you do this it should generate a new fresh sources.list file

delete the old files (sudo rm /etc/apt/sources.list and sudo rm -R /etc/apt/sources.list.d but BACKUP FIRST).
Then do either of:

Run the Software Sources (sudo software-properties-gtk or sudo software-sources) select/check-mark some repos, pick a server and update.
Generate a new one at http://repogen.simplylinux.ch/ using your version & country (to pick local mirrors), then copy & paste it into your new sources.list with gksudo gedit /etc/apt/sources.list or in a terminal sudo nano /etc/apt/sources.list

The site http://repogen.simplylinux.ch/ has a LOT of optional PPA's too, looks quite useful.  [courtesy How do I restore the default repositories? ]


Ubuntu 17.10 stops responding to mouse or keyboard

I have had the same problem in the past weeks. Usually because of an un-finished drag job..

  A quick restart should resolve your problem


All program windows are grey after updating 13.04

I managed to get this problem fixed by installing the latest beta driver from ati from here http://support.amd.com/us/kbarticles/Pages/AMDCatalyst13-3LINBetaDriver.aspx

Extracting the file is simple using unzip in the terminal, run the .run file using sudo. Once the window opens it can be dragged to the top of the screen where if maximises and can be viewed.

Once installed I restarted (had to do the above process twice for some reason) but this put the system back to a usable state.


I had a similar problem but I got around it. Try this.

Download Java JDK 9 zip or tar.gz (I used this so everything I say afterwards will reflect this).
Once downloaded, extract the tar.gz file in your location of choice (please take note of the location, you will come back to it later).
Open IntelliJ and go to Project Structure under Files. Under Project SDK, navigate to the location in 2. above and select it.

Alternatively, go to Files > Project Structure > Platform Settings. Once again, add the location in 2. above (green plus sign) if you do not see it in the pane.

I hope this will help you and you will enjoy Java 9 as well as jShell.


If you re-install your kernel, the modules will be re-installed as well.


double clicking on the date in the applet opens up the calender. then in the top left fand there is New.Click on it and select what u want.


How to install extundelete on Ubuntu 16.04

In Ubuntu 16.04.7 LTS, extundelete is installed successfully.
sudo sh -c 'apt update && apt install extundelete'

Ubuntu says 'v0.2.4-1' is installed.
Please check your distribution version and package update.
ps: please do not install extundelete on same partition which deleted file was in. Boot with other media like live cd. I'm afraid new package list cache, list, extundelete related files may overwrite your deleted files.


Ktechlab is an alternative to Pspice. This software runs on Linux.

Edit :Try a software called geda


Xubuntu 12.04 - change orientation of workspace switcher on a vertical panel

Ok, some options, but for some reason the "row" setting is not taking effect on the vertical... I suspect you have found a bug.

Use only 2 workspaces (not the best I'll admit)

Uncheck "Show miniature view" when you > right click > properties - on the workspace switcher.

This will give you workspace "buttons", but the text is still the other way...

Hope this helps, I will try to look into if there is a bug report already. Try Updating and creating a new user, the bug seems to be fixed in later versions.

To Change the name of the workspace- right click on the workspaces and select "Workspace Settings..." then double click on the right numbers to rename the workspaces.


Ubuntu 18.04 workspaces and switch between windows

It is possible like

Alt+Tab and then Alt+^ (or Alt+´ in US-layout) to switch between windows in same application.

Info found here: https://help.ubuntu.com/stable/ubuntu-help/shell-windows-switching.html


Is Ubuntu Desktop compatible with Acer Aspire hardware

I turned secure boot off in the bios and installed mint 16 from a DVD.  Both Windows and Linux seem to be happy.  I could not get the install DVD to boot with secure boot enabled.
I don't know what the ramifications of running Windows 8.1 without secure boot enabled are but it is working.


Windows 10 laptop returns to boot menu repeatedly after installing Ubuntu

Make sure you can access your windows 10 drive from within Ubuntu by clicking the drive icons on the unity bar.

If you can access them, setup grub again

sudo update-grub

and then, reboot.


Screen is blank after installing unless I boot with the monitor unplugged

I suggest you turn off he onboard intel graphics and just allow the secondary graphics.You can do this in the BIOS


Where do I find the applications menu editor?

You can install alacarte :

sudo apt-get install alacarte

It's an application menu editor.


How to set Ubuntu with Cinnamon to hibernate when lid is closed with external monitor?

If not already installed, install dconf-editor with

sudo apt-get install dconf-editor

Then open it and navigate to
org.cinnamon.settings-daemon.plugins.power
and tick
lid-close-suspend-with-external-monitor.

Close dconf-editor and it should be working.


I'm yet unsure how to completely containerize a display-manager in a headless server.

For running gui apps with audio in containers, this tutorial worked for me. The following is a summary of steps. Note that I'm using LXD 3.5 (snap) on an Ubuntu 18.04.1.

1.  Save the following into a text file named lxdguiprofile.txt:

config:
  environment.DISPLAY: :0
  raw.idmap: both 1000 1000
  user.user-data: |
    #cloud-config
    runcmd:
      - 'sed -i "s/; enable-shm = yes/enable-shm = no/g" /etc/pulse/client.conf'
      - 'echo export PULSE_SERVER=unix:/tmp/.pulse-native | tee --append /home/ubuntu/.profile'
    packages:
      - x11-apps
      - mesa-utils
      - pulseaudio
description: GUI LXD profile
devices:
  PASocket:
    path: /tmp/.pulse-native
    source: /run/user/1000/pulse/native
    type: disk
  X0:
    path: /tmp/.X11-unix/X0
    source: /tmp/.X11-unix/X0
    type: disk
  mygpu:
    type: gpu
name: gui
used_by:

2. Add the profile to your LXD instance:

lxc profile create gui
cat lxdguiprofile.txt | lxc profile edit gui

3. Apply the profile to a container:

lxc profile add "$container" gui
lxc restart "$container"

That should be it! To test your gui, execute the following commands:

# Login to the ubuntu user in the container.
lxc exec "$container" -- su ubuntu -l

# This should show an animation of gears if all is well.
glxgears

# This command shows the audio setup info.
pactl info

Note that, in my setup, the gui only works in the default ubuntu user inside the container. I'm unsure why, but the steps can probably be tweaked to allow other container users to access the gui. I have also ran into trouble running hardware accelerated apps, such as WineHQ or Steam.


Missed UFEI screen for virtualbox on boot, how to get it again?

I realised that the issue with removing virtualbox was actually because of this:

debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable

I found out what was locking this process using this answer and saw that it was a process called frontend. I killed this process as root and was then able to remove virtualbox, and reinstall it, correctly following the signing procedure this time.


HUD is currently available for unity only ,if you are using Lubuntu 12.04 you can enjoy features of HUD by installing unity inside Lubuntu

Linked questions

Is there a way to install Unity or Gnome Shell along with Lubuntu?
What is the Unity HUD and how can I install it on my system?
How do I use the HUD?


Reducing colour depth to 16 bit without losing panels and launcher

make a backup copy of your current xorg.conf file like:

cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak

make a copy of your xorg.conf like:

cp /etc/X11/xorg.conf /etc/X11/xorg.conf.game

edit your /etc/X11/xorg.conf.game file to contain the settings you need/want for your game.

gedit /etc/X11/xorg.conf.game

write a bash script that copies your game conf file over your standard conf file

add a line to launch your game

add the lines you require to restore things back to normal.

Save the script and modify permissions so that you can execute it.

use the script you've written to test launching your game.

Note: I've never had any issues running a lower colour depth game at a higher colour depth so I doubt any of this is necessary.


If the command already finished, it's output is lost.
In older GNOME versions, there was a checkbox "Run in terminal" in the Alt+F2 dialog. Ticking this checkbox causes a terminal window to open while the command is running, that will display the command output.
This is still available in GNOME Flashback desktop (which I use), but no more in GNOME Shell. But even in GNOME Flashback, the terminal window closes right after the command finishes, so it's of little use.
It seems that you have to use Ctrl+Alt+T instead of Alt+F2, to open the terminal window first and then run the command from the terminal.


You can try increasing the Dock's maximum length.

Right click on the Dock.
Select Dock Settings.
Open the Appearance tab.
Scroll to find the Length section and increase the maximum length of the dock to 100% or whatever you like.

This should fix the problem as long as you don't fully occupy the length with your apps.


Connecting to 3G Modem with Command Line


Devices with same model names appearing once in Disks utility

Edit I:

Okay, after reading your comment I realized, that i missed something. The problem you have seems to be a bug in gnome-disk-utility itself. Check  https://bugzilla.redhat.com/show_bug.cgi?id=887979 and https://bugzilla.gnome.org/show_bug.cgi?id=709065
I guess these two describe the same bug that you encounter.

My explanation below is not a fix. It is a workaround in case your Partitions/Volumes will not be mounted automatically. Unfortunately my workaround does not work with luks encrypted volumes. I never used luks yet.
From what i have read, it is possible to mount them manually or more or less automatic by fstab. The problem is that for an automatic solution you will need to save your passphrase on your machine: Mount LUKS encrypted hard drive at boot. It might also be possible to be prompt to enter the passphrase https://www.linuxquestions.org/questions/linux-newbie-8/uuid-in-etc-fstab-for-luks-partition-4175425909/

Workaround for automount without luks:

If you type lsblk --output NAME,SIZE,FSTYPE,UUID your UUID's, that belong to your partitions should be diffrent. If not, I am surprised.

Here is my Output. sdb is my external drive. It has a Volume sdb1 with an UUID of 3593-DE9E

alex@SchlepptopLubu:~$ lsblk --output NAME,SIZE,FSTYPE,UUID
NAME     SIZE FSTYPE UUID
sda    223,6G
├─sda1    16G ntfs   F81A2CE61A2CA41A
├─sda2    45G ntfs   B09E8A9C9E8A5AAC
├─sda3     1K
├─sda5     2G swap   c9b7a567-cff5-4967-a73d-7a042e8851af
├─sda6    11G ext4   db850438-e5b3-4540-b99d-64e84d1685a4
└─sda7    30G ext4   8c0ef57b-0a9d-4b7a-a177-ffa7e8295594
sdb      7,2G vfat   3593-DE9E
sr0     1024M

Next create folders on your Desktop for each volume that you want to mount.

Next go to sudo nano /etc/fstab. Do not delete anything in this file! In case, create a copy of the file as backup before you continue with your modifications.
Inside fstab create a new line at the end of the file and write
UUID=YOUR_UUID_OF_DRIVE_A /PATH/TO/YOUR/CREATED/FOLDER/FOR/DRIVE_A/ FILE_SYSTEM_TYPE OPTIONS DUMP PASS

In my example with my UUID and the filesystemtype corresponding to my drive:
UUID=3593-DE9E /home/alex/Schreibtisch/drive_A/ msdos defaults 0 2

Check man fstab for filesystem and options. In general i would try msdos or ntfs. In your case ext4 might be the right one.

Create as many entries as volumes you want to be mounted.


itunes2rhythm python3 script returns syntax error

Just edit your itunes2rhythm.conf file to remove the extra quotes:

iLib=""/media/trunk/SOUNDS/itunes/Library.xml""

It should be:

iLib="/media/trunk/SOUNDS/itunes/Library.xml"

in order to exec this line with Python.


Changing keyboard layout without logging in to any user in Ubuntu 17.10

Steps 1 through 6 of this answer should get you into the system since grub knows nothing about your installed keyboard layouts. Then follow up with this answer and read the comments too as they will be useful.


I've changed GRUB_DEFAULT value from 0 to 1 and it made ubuntu boot to the recovery mode

I've changed GRUB_DEFAULT value from 0 to 1 and it made Ubuntu boot to the recovery mode

The solution is simple:

In the recovery mode select "Drop to a root shell" (I believe they changed the wording, but it's almost the same).
Type nano /etc/default/grub
Look for the line that reads GRUB_DEFAULT
Change the 1 to 0.
Press Ctrl + O, now press Enter.
Press Ctrl + X.
Type update-grub.
Type reboot. Now you should be booting to Ubuntu normally.

The "Resume Ubuntu" was not intended to take you to a full GUI boot but to a login prompt. The modules in Recovery Mode aren't loaded fully as they should assure the maximum compatibility with any video card. Hence if you want a Normal Boot the best way is starting Ubuntu without using the "Resume boot" option.


Webcam creates repeated error messages "Cannot set freg 16000"

This is a known bug, unfortunately not fully resolved.

For more details and possible workarounds see

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/567565

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/459445


According to the OpenFOAM download page, the currently available versions do not include Ubuntu Trusty Tahr:

  OpenFOAM and Paraview are currently available for the following versions of Ubuntu:

  12.04 LTS, codename precise
  12.10, codename quantal
  13.04, codename raring
  13.10, codename saucy


ssh to a computer run a command and mail the result

I finaly could do this with a python code:

import paramiko
import time
import os

def touch(path):
    with open(path, 'a'):
        os.utime(path, None)

ssh = paramiko.SSHClient()

ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())

ssh.connect('ip', port=port, username='USER', password='PASS',
            key_filename='OPTIONAL Address to private Key')

baseCommand = "command"
stdin, stdout, stderr = ssh.exec_command('some command')
print(stdout.readlines())
stdin, stdout, stderr = ssh.exec_command(baseCommand + 'ls')
print(stdout.readlines())

#for copy file

localpath = "local paths" + time.strftime("%Y-%m-%d-%H-%M-%S") + ".sql"; # add a date name for file
remotepath = "remote path"
touch(localpath);
sftp.get(remotepath, localpath) # download the file

sftp.close()
ssh.close()


Why is gnome-calculator scanning my home directory?

No worries, it seems quite normal.

I installed gnome-calculator as a snap. When starting it from the
command line, nothing special happens but when I start it via the GUI
(Activities → Search → Calculator) then I see the same messages as
you do in kern.log about scanning my $HOME.

I again uninstalled the snap and installed the apt package instead
with the following commands:

# switch from snap to apt:
sudo snap remove gnome-calculator
sudo apt install gnome-calculator

and the messages do no longer appear.

Plus, I can start gnome-calculator by a special key on my keyboard and
it opens far quicker, but that's another cup of tea (see this related
and interesting post).

(Btw, I also replaced the snap version of gnome-system-monitor with the
apt version because the snap version lists all the snap filesystems
while the apt version only lists the "regular" ones. I see no point in
listing dozens of those squashfs filesystems which are all 100 %
full. It just messes up the display.)


How can I run multiple instances of Telegram?

Finally, I learned it. here is the detail of solution.

download tsetup.1.1.23.tar.xz
extract it.

it is better to copy "Telegram" file from extracted folder to "/home/youruser/" . because you can simply open the Terminal by Ctrl+Alt+T.
open a Terminal on that folder.
create some folder for each Telegram account. for example:

makedir ~/tel
makedir ~/tel2

run the Telegram as

./Telegram -many -workdir ~/tel

for second user, open another Terminal and run Telegram as

./Telegram -many -workdir ~/tel2

more option

how can close the terminal without terminating the Telegram process?

I found the solution from here.
How to keep processes running after ending ssh session?

  install "screen" application

sudo apt-get install screen

  Type screen in Terminal and Enter.
      screen
  Then start the Telegram.

./Telegram -many -workdir ~/tel

  return back to the terminal and

  Press Ctrl-A then Ctrl-D.

Thanks for your helps.


How can I remove second workspace from Ubuntu 18.04?

Lets say you have 2 static workspaces..
ignore what ever windows running in both the workspaces..

run the below command

gsettings set org.gnome.desktop.wm.preferences num-workspaces 1


The solutions provided for similar issues of dpkg returning an error is to use:

dpkg --configure -a
apt-get install -f

Both did not resolve the issue and produced the same error output. In some cases, aptitude may be a better option to use than apt-get.
The solution is to use aptitude install -f:

aptitude install -f

Explanation:
As a special case, aptitude install with no arguments will act on any stored/pending actions.
When the -f option is given, aptitude will be more aggressive when attempting to fix the dependencies of broken packages, even if it means ignoring the actions requested on the command line.


Solved:

In Software Sources, label Other Software, there was a repository called "Canonical Partners Added by Software Center main". I unticked this option because still there is another source called "Canonical Partners Software Packaged by Canonical for their partners".

I also changed to USA server (I was in main), as I have seen that it seems to have some to do with Skype repository in the main server.

This seems to have solved the problem.


Start XBMC Automatically for specific user

There are a number of ways of doing this (start-up scripts in a real desktop, separate X sessions) but I think the best for the method you're suggesting is adding a XBMC session and using that from your secondary user.

Note: some distributions of XBMC include the following already. All you might need to do is change session at the login screen. Click the down button next to the username and pick XBMC.

If you don't have an XMBC option already, add one by running sudoedit /usr/share/xsessions/XBMC.desktop and fill it with:

[Desktop Entry]
Name=XBMC
Comment=This session will start XBMC Media Center
Exec=xbmc-standalone
TryExec=xbmc-standalone
Type=Application

You might need to run sudo restart lightdm (this will kill all running desktops and graphical apps) but then you should be able to pick an XBMC option at the login screen.

And if that doesn't work, check xbmc-standalone exists with which xbmc-standalone. Some distributions of XBMC don't ship a separate -standalone variant so just change the command to xbmc.


Daemon.log/Syslog files getting spamed with DHCP Information

For any future readers that have come here by google search:

I had the same problem. It seems to be caused by the script /etc/dhcp/dhclient-exit-hooks.d/sendmail, that tries to access a file /usr/share/sendmail/dynamic that may not exist, causing an error and apparently an endless restart-loop of dhclient.

In my case, upon removal of the sendmail package apt seems to have neglected to cleanup the /etc/dhcp/dhclient-exit-hooks.d/sendmail script.

So either rm /etc/dhcp/dhclient-exit-hooks.d/sendmail or mkdir -p /usr/share/sendmail && touch /usr/share/sendmail/dynamic, may fix it for you (depending on if you want to keep sendmail or not).

edit: credits go to luchonacho for finding the cause, just wanted to add some clarification


how to cannot install alien ubuntu 16.04?

alien often produces unsolvable dependencies in the package being installed due to differences in the naming of libraries in the Debian and Red Hat operating systems, however in Ubuntu 16.04 and all supported versions of Ubuntu it is possible to build a Debian package of Oracle SQL Developer using sqldeveloper-package from the default Ubuntu repositories. Open the terminal and type:

sudo apt install sqldeveloper-package

This utility will require you to download the architecture independent archive from http://www.oracle.com/technetwork/developer-tools/sql-developer, identified as "Oracle SQL Developer for other platforms", "Oracle SQL Developer for Multiple Platforms" or "Oracle SQL Developer for Linux and Unix" (depending on which version you  are building), to create the Debian package from.


Here is what it looks like for containers:

root@nsn7:~# zfs list -r nsn7/lxd/containers
NAME                                     USED  AVAIL  REFER  MOUNTPOINT
nsn7/lxd/containers                     2,95G   259G    19K  /nsn7/lxd/containers
nsn7/lxd/containers/lds-xenial          2,68G   259G  3,16G  /var/lib/lxd/containers/lds-xenial.zfs
nsn7/lxd/containers/maas-trusty          214M   259G   214M  /var/lib/lxd/containers/maas-trusty.zfs
nsn7/lxd/containers/maas-trusty-virbr1  57,0M   259G   570M  /var/lib/lxd/containers/maas-trusty-virbr1.zfs

Observe where each zfs dataset is mounted, above and in this output asking specifically for the mount-related options:

root@nsn7:~# zfs get all nsn7/lxd/containers/maas-trusty|grep mount
nsn7/lxd/containers/maas-trusty  mounted               yes                                      -
nsn7/lxd/containers/maas-trusty  mountpoint            /var/lib/lxd/containers/maas-trusty.zfs  local
nsn7/lxd/containers/maas-trusty  canmount              on                                       default


Can /home/user/music and other media folders be moved to a separate drive?

I think this is not the best solution however it could be useful. You could create subfolder 'Media' for example and mount your 1TB HDD partition to ~/Media. So you'll get internal media storage in ~/Media that physically placed on your 1TB HDD. Couple good guides: one, two, three.


Copying files between Ubuntu and WIndows partitions

From https://help.ubuntu.com/community/MountingWindowsPartitions

  Using the File Manager

  For those using a desktop version of Ubuntu, or one of its offical
  derivatives, the easiest and quickest way of mounting NTFS or FAT32
  partitions is from the file manager: Nautilus in Ubuntu, Thunar in
  Xubuntu, Dolphin in Kubuntu and PCManFM in Lubuntu. Simply look in the
  left pane of the file manager for the partition you wish to mount and
  click on it - it will be mounted and its contents will show up in the
  main pane. Partitions show with their labels if labelled, or their
  size if not.

  Unless you require your Windows partition - or a NTFS/FAT32 partition
  for data shared with Windows - mounted every time you boot up for one
  of the reasons given below, mounting from the file manager in this way
  should suffice.


It would be safest to use a Live CD, but you could do:

copy all the files to a new partition, making sure that the contents of /usr do not change while you are doing this.
edit /etc/fstab so that /usr will be mounted on the next reboot
reboot
delete the old files

See below for details on each step.

Note that you can't mount the new partition on /usr while running as there will be lots of files in /usr that will be open.

Copying the files

I would use cp -a. -a is the archive option. From the man page:

-a, --archive
          same as -dR --preserve=all
...
-d     same as --no-dereference --preserve=links
...
-P, --no-dereference
          never follow symbolic links in SOURCE
...
--preserve[=ATTR_LIST]
          preserve      the      specified      attributes       (default:
          mode,ownership,timestamps),  if  possible additional attributes:
          context, links, xattr, all
...
-R, -r, --recursive
          copy directories recursively

Editing /etc/fstab

You need to know the UUID of your new partition. You can see the mapping by doing:

$ ls -l /dev/disk/by-uuid/

And then add this line to /etc/fstab:

UUID=634c31a5-e27c-4e33-ac67-2e22491a30c2 /usr           ext4    defaults        0       2

Change the UUID to your UUID, and change ext4 to be the file system type you are using - you should know this if you have set up the partition.

Delete the old files

After the reboot, the old files in /usr on the root partition will be hidden by the new partition mounted on /usr. But we can use some mount bind trickery to get to the old files and then delete them.

$ sudo mount --bind / /mnt
$ sudo rm -rf /mnt/usr/*
$ sudo umount /mnt

But some slight mistyping (say, hitting Enter when you'd only typed sudo rm -rf /mnt ) could cause disaster, so I would only use this method if you were very confident in what you were doing, really couldn't deal with any downtime, or had no physical access to the machine and hence were unable to boot off a live CD or live USB stick.


Unity application launchers are disappeared

How do you add a launcher! Run a application and right click on icon and select keep in  launcher. If you are doing right but getting problem then

unity --reset

Now add launcher according above process, restart and check.


at this point it sounds like you have some corrupted system files. use the livecd to copy the files you need to save to a usb just in case, then reinstall using the same username and password, it should carry over the packages and home folder. Sorry it got to that point, sir.


ubuntu stuck at 'pls remove installation media and close tray and press enter

Sounds like the you didn't install a bootloader that knows about your Ubuntu installation. So Windows just boots like normal. Easiest way is to install again and this time install the bootloader (Grub2) when prompted.

During Grubs installation it will scan your drives and make a list of options to boot into when you reboot.


You didn't say how you want to open them :)

One way is to use grep to recursively look for the string in your files (-r). Use -l to ask grep to output only the filenames of matching files. This will output one filename per line, use xargs to build a suitable command line for your editor.

grep -r -l foobar /foo/bar/ | xargs vim

this also works with gedit; just change vim for gedit.

You can also use find for this but it's more complicated IMHO:

find /foo/bar -type -f -exec grep -l foobar {} \;  | xargs vim


All partions deleted accidently and I lost all my very very important data

First thing: Power the computer down!

Any attempt to write to the hard disk may overwrite the data you need to recover -- and Ubuntu (as with most operating systems) writes swap data continually, as well as log files, etc. in the root and home partition(s).

Others may be able to offer a method to recreate your partitions without loss of data; I don't know any reliable way to do that for file systems newer than FAT16.  But, you may only get one try (because rewriting the partition table and formatting the partitions will overwrite some data), so don't start that process until you have a proven method in hand.

The easiest way to get your data back would be to remove the hard disk from the machine and take it to a computer repair center for data recovery (or take the whole computer in).  That will be expensive, but if the data is that important, it may be worth doing.


apt doesn't not install maintainer configuration files during upgrade

You should not specify the force-confdef because it uses default option provided by package maintainer (whether to use new or old file). If no default option is available then only after that it falls back to the force-confnew setting.

What you want is to leave only  force-confnew setting.


Well, you haven't posted any screenshots, but from what I can tell here
The window is just not streched enough.

So you just grab the window border, and pull it until it looks like this
and there ya go! fixed!
You should also post screenshots when you ask questions.


How to pass the command "--overwrite-conf" in ubuntu terminal?

Add option after ceph-deploy:

ceph-deploy --overwrite-conf mon create-initial


Why does Artik5 Ubuntu Server image skip installation and go straight to login?

I don't think it is booting from the SD card.
I guess it is booting from eMMC.
Try root/root as the login.

I have successfully booted UCore on Raspberry Pi B and B+, but cant seem to get it to boot on a Seeed Eagleye530 or Samsung Artik 5 development kit.


Systemd service starts with enable/start command but does nothing on startup

Did you try running the enable command? Assuming your service is called keyboard-backlight.service, try running the following: systemctl enable keyboard-backlight.service.


To bypass the limit on command line length, try this in a command prompt:
cd <directory with desktop>
printf "%s\0" *.png | xargs -0 rm

Explanation:

printf "%s\0" prints its of each following arguments followed by a null separator
*.png is expanded by the shell to a very long list of arguments, but since in bash printf is overridden by a shell builtin, the limit on the size of the list doesn't apply.
So all your .png names are printed to stdout and piped to xargs-0 (the -0 tells it to expect null separators) and xargs calls rm after grouping the input names in arguments lists just long enough to fit in the limits.

If you don't use bash there is an equivalent trick with find ... | xargs rm.


How do i find out lines of a file that are not present in another file?

Simply

grep -vxf A B

If you want the line number of the non-matching lines also:

grep -nvxf A B

If B has multiple non-matching identical lines, and you only want to print out the identical lines once, then

grep -vxf A B | sort | uniq


Serious errors were found while checking the disk drive for /

Here is a thread on how to solve the issue it works i tested it.

Ubuntu 14.04 not booting after error message. /tmp could not be mounted


Ctrl+ C sends SIGINT (signal interupt), which makes a process to get interrupted (in other words it kills the process). Some programs can catch this signal and ignore it, which is the case with bc.

The Ctrl+ D  character sends EOT (end of transmission) character. Receiving this signal has similar effect as if when a program was reading from file, and reached the end of that file. Effectively, bc is waiting for you to tell it that you have no more input to give.

As for why . . . it's up to the developers to specify how the program exits as well as how it interacts with users


Is it possible to run multiple VMware guests Using Free VMware Player?

Unlike VirtualBox, by default with VMware Player if one tries to launch a second instance (e.g. another machine that you want to run at the same time), the original running machine comes into focus and one doesn't get to the 'library" list. One never is able to get back to interface in 'home' state where you can choose the machine while a machine is running. After some experimentation, I did discover that one can do an ALT+F2 and type in "vmplayer" and get to the machine picker mode... from there, one can indeed run another machine... I think I just need to create launchers specific to my machines....


Short answer:
The number of links to a directory is at least two:

The link to the parent directory
The link to itself

See also here:

The number of links is the number of hard links to the file. For a directory, the number of hard links is the number of (immediate) subdirectories plus the parent directory and itself.


How to enable hibernation on ubuntu 16.04?

I think I found the reason: You have to disable the secure boot option in the BIOS. To do that, interrupt the normal boot process and it is in the option secure boot.


In which repository is Libreoffice to be found?

You can normally find LibreOffice on the Ubuntu Software Center (an application that is normally installed on your computer).
Just type LibreOffice on the text field on the top left of this application and it should show you LibreOffice.

Actually it should be preinstalled with Ubuntu so you should find it in your application (Super (Windows key) + A to access your applications).


It may be your BIOS time.
"Your computer has two timepieces; a battery-backed one that is always running (the hardware, BIOS, or CMOS clock), and another that is maintained by the operating system currently running on your computer (the system clock). The hardware clock is generally only used to set the system clock when your operating system boots, and then from that point until you reboot or turn off your system, the system clock is the one used to keep track of time."


How do I resolve desktop larger than screen?

NOTE: I'm answering this question because it is the first result that appears in a google search.

I had this same problem and I spent ages searching for a way to fix it within Ubuntu to no avail.

Turns out though that it can be solved by looking at the settings of the monitor/TV you are using. Not the Ubuntu settings, the actual built-in settings for the display that you access by pressing the physical buttons on the display.

For me I had to change the aspect ratio settings from 16:9 to "Just Scan". Not sure what it means, but it did the job.


Why is my wireless significantly slower on Ubuntu 12.04, as compared to windows 7?

you could try something like this, temporarily:

sudo modprobe -r iwlwifi
sudo modprobe iwlwifi 11n_disable=1

as shown here: http://ubuntuforums.org/showthread.php?t=1996768&highlight=11n_disable

you might also want to disable powersaving on your wireless card
http://ubuntuforums.org/showthread.php?t=1686641


Trying to use Pandas in Python - Error: wrong ELF class: ELFCLASS32

Some of the Pandas source code is written in Cython. The Cython pyx files are turned into .c files and compiled in .so libraries. The error you are seeing,

ImportError: /usr/local/lib/python2.7/dist-packages/pandas-0.7.3-py2.7-linux-i686.egg/pandas/_tseries.so: wrong ELF class: ELFCLASS32

says that _tseries.so was compiled as an ELF 32-bit binary, while your system (probably) needs an ELF 64-bit binary.

The proper way to fix this depends on how you've arrived at this situation. For example, if you have the full pandas source code in ~/src/pandas, then

cd ~/src/pandas/pandas
/bin/rm *.{c,cpp,so}   # <-- remove the 32-bit binaries
/bin/rm -rf ~/src/pandas/{build,dist}
cd /usr/local/lib/python2.7/dist-packages/
/bin/rm -rf pandas*    # <-- remove the egg file
cd ~/src/pandas
python setup.py build_ext --inplace && python setup.py install   # <-- will build 64-bit binaries on a 64-bit system.

will recompile the cython code and then attempt to install pandas.


Use the Icon "Synfig Studio".

Or the command $ synfigstudio ... and the "SynfigStudio" GUI will open.
Then create something, and save it.

You can run the saved file with $ synfig [file.sif*]


Ubuntu updates to be moved to different partion

In Linux, filesystem partitions are used to hold specific parts of an OS or user data, such as system files, temporary files, files used by servers, or users' home directories. Each partition is mounted at a particular point in the unified directory tree -- for instance, at /home, /var, or /usr. Because the /home directory holds users' home directories, putting it on a separate partition isolates user data from system data. Other directories can be isolated in a similar manner. This can be useful in performing backups, for security reasons, to help simplify system upgrades, and so on.

This is different from Windows, which is much more haphazard in the way files are managed -- in Windows, you might create a partition and populate it with both program files and user data files. In some sense this is more flexible, but it also encourages a type of unstructured and inconsistent setup that would make a professional Linux/Unix administrator cringe.

In any event, for most desktop systems, if you split /home off from /, the latter need be no larger than 5-30GiB, depending on how much software you install. Installing software updates won't greatly increase the space demands, since the new software replaces existing software, so the space required won't go up much. There are exceptions to this rule, of course; for instance, most servers store data in /var, so if you run a Web server with gobs of Web pages, you may need lots of space in /var (and might therefore consider splitting it off into its own partition).

It's unclear from the original question just how those three partitions are being used. Those sizes might be reasonable for some purposes, but I suspect they were chosen based on previous experience with Windows. If one partition is actually filling up, it might be better to resize the partitions and use them in a more Unix/Linux-like way than to try to move data between the partitions. More details about where the partitions are mounted, how full they are, and what's being stored on them would be helpful in providing more specific advice.

For more general information on this topic, see this introductory article I wrote on the subject or read the Filesystem Hierarchy Standard (FHS).


Firefox freezing with 100% CPU usage for 30 seconds when launching Chromium

TL;DR: It's an issue with fontconfig before version 2.13. It can be fixed by upgrading the package to 2.13 or higher (though I couldn't find a suitable provider). Alternatively, examine all your fonts-related folders and config files in your home directory and test if removing any of them resolves your issue. For me, renaming ~/.fonts did the trick.

After learning about the bug reports https://bugzilla.mozilla.org/show_bug.cgi?id=1495900 and https://bugzilla.mozilla.org/show_bug.cgi?id=1411338 it becomes rather clear that the problem must be caused by fontconfig.

Somehow when Chromium starts, it triggers a change in the fonts database (???), which causes Firefox - if currently running - to re-scan the file system for fonts somehow, resulting in the CPU usage and temporary freeze.

Apparently updating the fontconfig package from version 2.11 to 2.13 (the version shipped e.g. in Ubuntu 18.10) should fix the issue, but I found no easy way to get that version on 16.04, without breaking dependencies of lots of other packages I have installed.

So as the issue is limited to my user account, I examined my user's local font configuration and folders. There's quite a mess of different font-related directories to be honest, including ~/.fonts, ~/.local/share/fonts, ~/.local/share-font-manager, ~/.config/font-manager, ~/.cache/font-manager, ~/.cache/fontconfig and a few more config files and application-specific font stuff.

I started by removing (renaming) the ~/.fonts folder, as it didn't seem to contain anything useful anyway, and a simple touch ~/.fonts/Library/ before that triggered the Firefox misbehaviour. After that folder was gone, so was the issue when launching Chromium. \o/


Transmit recorded video as it was captured from webcam

You can use v4l2loopback which is available via apt

sudo apt install v4l2loopback-utils v4l2loopback-dkms

You will need to set things up and the number of cameras etc...

https://github.com/umlaeute/v4l2loopback
modprobe v4l2loopback

You can then stream to it using ffmpeg

https://stackoverflow.com/questions/23877809/dummy-video-device-v4l2loopback-webrtc
ffmpeg -re -f lavfi -i "movie=sample.mkv" -f v4l2 /dev/video0

Then you can use a video conferencing application and select the virtual camera:


Ubuntu 12.04 - Thunderbird 17.0.2 - Set MIME enconding quoted printable

Open config editor (preferences, advanced, general, config editor button)
search for
mail.strictly_mime
then make it true
(which sends messages that contain 8-bit characters as quoted-printable)


Fan speed auto control doesn't seem to work properly anymore (too high)

User Psusi was right, the bearing of the fan was broken (I felt it as I rotated the fan with the finger). I changed the fan, no noise anymore.


How to add timestamp to bash after completed command

Something similar, but not exactly, what you ask: add the following lines to your ~/.bashrc

mytime() {
    printf '%*s**%s**\n' $((COLUMNS-13)) "" "$(date +%T)"
}
PROMPT_COMMAND=mytime

The difference is that the time is shown on the previous line, not the current.
I think it should be difficult to write on the current line without interfering with the shell prompt and line editing.


Based on the file extensions (.c), I assume that ex1.c is a C source file. You must first compile the source code before you can debug the application with GDB. Assuming you have GCC installed (available from the gcc package ), you can do this with:

gcc ex1.c -g -o ex1

Once compiled, you can debug the application by running:

gdb ex1

This will load the executable and dump you at the GDB prompt. You can then start the application by running the following command at the prompt:

run

If the program crashes, you can inspect the calling stack by running:

backtrace


Unable to run compiled files - bash: ./a.out: Permission denied. (I've tried chmod)

If you copy the binary off of the FAT32 filesystem and onto your native ext* filesystem, the binary should run, when given the right permissions (+x).

It is possible that a filesystem is mounted with no execution rights. So in addition to chmod, you will want to also check your filesystems' mount options.


Unable to get Nvidia GT720 work fine beside hybrid Intel graphic - laptop with Ubuntu 14.04

Pease read till the end before you get upset! ;-)

Disable hybrid mode in the BIOS, boot only with NVidia and get your GPU working in a stable way.
Head to the xorg-edgers PPA to accomplish this.
Use your computer like that for at least a day until it is stable
Now boot in Intel mode, use it for a day as well and see whether you have any issues there (never heard of any, but Murphy etc.
Now head to the Bumblebee PPA, and get their software installed.
Boot again in Hybrid mode.

Done!


B43 Device Firmware Error - 12.04 Installation


Using cp -b will make a backup of the destination files, i.e. where you are copying to.
I do not think you are trying to do this?

The most common use is by using -R, which allows a recursive copy of the source to the destination. Perhaps this would be more appropriate?

You might also consider using rsync (i.e. rsync -avz $SRC $DST --delete), which would allow you to perform smaller backups each time, i.e. it will only transfer what changed`

It may help if you provided details on the external disk, i.e. what filesystem it is using, etc.


Remove the link wherever you created it

Have you installed mysql-client at all? Maybe try to reinstall it?


Duplicate ping response when running Ubuntu as virtual machine (VMWare)

I had been experiencing exactly the same issue, using DHCP on Ubuntu 12.04 as Guest on a Win7 x64 host, using VMware Workstation 8.04. I knew something was wrong in the VMware core as VMware Player 4.0 and VMware Workstation 8.0 share it, but I wasn't sure what was wrong.

But I found the culprit.

It's the Routing and Remote Access service. I had it activated as I configured my Win7 box to accept incoming PPTP connections. Stopping it the problem goes away.

Also, there are other quirks associated with that. Besides the Ubuntu guest, I had a Win XP guest which could not make outbound PPTP connections when bridged. This was also fixed when disabling the RRAS service.

Googling this problem I found other reports about RRAS being the problem, e.g. http://www.codeblog.co.uk/2009/06/22/fixes-and-tweaks/vmware-duplicate-ping-responses/


Menu text is dark after installing KDE-desktop

I had exactly the same problem. I selected Ambiance as the theme in Gnome/Unity, but the menus and other stuff was unreadable dark on dark font as shown in the image posted by the OP.

In the end I had to change ~/.config/gtk-3.0/settings.ini

BEFORE it had (for whatever reasons):

[Settings]
gtk-font-name=Ubuntu 9
gtk-theme-name=oxygen-gtk
gtk-icon-theme-name=oxygen
gtk-fallback-icon-theme=gnome
gtk-toolbar-style=GTK_TOOLBAR_ICONS
gtk-menu-images=1
gtk-button-images=1
gtk-application-prefer-dark-theme=0

AFTER I changed it to:

[Settings]
gtk-application-prefer-dark-theme=1

Now the colors are fine.


How to configure Movie Player (totem) to append to playlist instead of replacing it

Totem

To get Totem to accept one of more files for the playlist will need a slight-modification to its desktop launcher as described below.

How to edit the totem launcher

What we need to do is edit the totem launcher.  Let's not edit the installed version in /usr/share/applications because any changes will be lost when totem is next updated.

We can copy the launcher to our home folder to prevent this from happening.

First open a terminal and copy and paste the following:

cp /usr/share/applications/totem.desktop ~/.local/share/applications
nano ~/.local/share/applications/totem.desktop

Find the line that looks like Exec=totem %U
Change it to be Exec=totem --enqueue %U
Save, logout, login
Start totem and right click totem in the launcher and choose Keep In Launcher.

You can now close totem.

How to append to the playlist

You can now append to playlist in two ways:

Drag and drop files from File Manager (Nautilus) onto the totem launcher. It will add the selected file/files to the playlist. I think due to a bug, don't drop files onto the totem launcher if the totem moves into the middle of the screen (I think its called spread mode). If you do, your Unity session will freeze, although Totem will continue playing.
Given the ALT-TAB issues with drag-and-drop on, perhaps an easier workaround is to right click the file/files on File Manager and choose "Open With Movie Player". With the --enqueue trick above, files can be repeatedly added to the play-list.


Where is the information stored in the USB core regarding the class driver and the HCDs, for it to check?

In the Linux kernel, the module loader is woken up when a new device is
detected. It's passed a "modalias" string, which identifies the device and
looks something like this for USB devices:

usb:v058Fp6387d0103dc00dsc00dp00ic08isc06ip50in00

You can find your device modalias (and the HCD driver) using the following command:

udevadm info --export-db

This is the section related to my USB drive:

P: /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0
E: DEVPATH=/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0
E: DEVTYPE=usb_interface
E: DRIVER=usb-storage
E: ID_MODEL_FROM_DATABASE=Flash Drive
E: ID_VENDOR_FROM_DATABASE=Alcor Micro Corp.
E: INTERFACE=8/6/80
E: MODALIAS=usb:v058Fp6387d0103dc00dsc00dp00ic08isc06ip50in00
E: PRODUCT=58f/6387/103
E: SUBSYSTEM=usb
E: TYPE=0/0/0
E: USEC_INITIALIZED=530904794

This string contains the device class (usb) and class-specific information
(vendor/product/serial number, device class, etc). Each kernel driver
contains a line such as:

MODULE_ALIAS("usb:...")

Which must match the usbalias (wildcards are used to match multiple
devices). If the modalias matches one that the driver supports, this driver
is loaded (or notified of the new device, if it's there already).

You can see the supported devices (by modalias) and their associated modules with

more /lib/modules/`uname -r`/modules.alias

If you grep for the usb-storage device driver, you'll see it has some
specific devices it supports by vendor and device ID, and will also attempt
to support any device with the right (storage) class, no matter the
vendor/device.

The USB modalias can be decoded like this:

usb:
v   vendor_id (4 hex)
p   product_id (4 hex)
d   revision (4 hex)
dc  class (2 hex)
dsc subclass (2 hex)
dp  protocol (2 hex)
ic  interface_class (2 hex)
isc interface_subclass (2 hex)
ip  interface_protocol (2 hex)

Source


HPLIP setup doesn't detect older HP printer through a printserver

I had to make a change during hp-setup- when detecting over wireless, I needed to change the network discovery method to "mDNS/Bonjour" in advanced settings, as shown in the picture below.


Wireless dropping out periodically on laptop

On what you posted, you only have two nearby access points broadcasting at higher signal strengths than yours!  Try changing channels, maybe the 2462 Frequency, with only weak signals present (at the time you ran the script).


Is it possible to tether internet between my android phone and a 3G HSPDA router?

So after some more research the answer seems to be this product:

http://www.edimax.co.uk/en/produce_detail.php?pd_id=352&pl1_id=1&pl2_id=77

As it says in the description:

  Internet tethering via iPhone, HTC,
  Blackberry, Nokia, Sony Ericsson, and
  other smart phone

It is a neat little thing as it comes with a battery and also runs of a micro USB connection. Perfect for my car setup.


I can actually answer my own question now: it is possible to switch the stick into a "modem mode" where it presents 3 serial devices. Connecting via those modem devices doesn't currently work, however. In any case, here's the magic incantation - put the following into a file "/etc/usb_modeswitch.d/12d1:1f01":

# Huawei E3531s-2 - switch to modem mode instead of HiLink CDC-Ether mode
TargetVendor=0x12d1
TargetProduct=0x1f01

# switch to 12d1:1001 (modem mode, 3 virtual serial ports)
MessageContent="55534243123456780000000000000011062000000100000000000000000000"

# switch to 12d1:14dc (default HiLink CDC-Ether mode)
# MessageContent="55534243123456780000000000000a11062000000000000100000000000000"

# switch to 12d1:1442 (debug mode with 2 virtual serial ports)
# MessageContent="55534243000000000000000000000011060000000000000000000000000000"

Found at and adapted from: http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=3&t=1897


My Wifi Card is not called wlan0 but wlp18s0b1, how then to configure my Ubuntu Server?

I suggest you set up /etc/network/interfaces something like:

auto lo
iface lo inet loopback

auto wlp18s0b1
iface wlp18s0b1 inet static
address 192.168.1.150
netmask 255.255.255.0
gateway 192.168.1.1
wpa-ssid <your_router>
wpa-psk <your_wpa_key>
dns-nameservers 8.8.8.8 192.168.1.1

Be sure to select a static address outside the range used by the DHCP server in the router, switch or other access point. Of course, substitute your details here.

Get the system to read and use the changes:

sudo ifdown wlp18s0b1 && sudo ifup -v wlp18s0b1

Did you connect?

ping -c3 192.168.1.1
ping -c3 www.google.com


You can do this in native git with a post-receive hook. Since you shouldn't be pushing to a non-bare repo, you'll need a script along the lines of this

#!/bin/sh
target="/tmp/math"
exec > "$target/$(date +%s)_$(uuidgen).log" 2>&1
mkdir -p "$target"
GIT_WORK_TREE="$target" git checkout -f
cd "$target"
make

Put that in hooks/post-receive inside the bare repo, and you should be all set (note that this will not create $TARGET_DIR, you'll have to do that manually)


i used the starup disk creator to burn 18.4.iso to a thumb drive i get an error

This error output indicates that you are using an old version of the Startup Disk Creator where there is a known bug. (There is a new cloning version in Ubuntu 16.04 LTS and newer versions of Ubuntu).

You can use other tools, that are not affected by that bug,

Disks alias gnome-disks in Ubuntu 14.04 LTS and newer versions.
mkusb in Ubuntu 12.04 LTS and newer versions as well as in many other linux distros.

See the following link and links from it, if you want more details about tools to create a USB boot drive.

Installation/iso2usb


Based on the many attempts you tried with various systems I would strongly assume that the USB stick is dead or damaged.

You can carefully try some rescue software and see if the data can be retrieved.


I had the same. The service installed rsync and got some files. I found a dota.tar.gz file in the user folder.

deny port 22 outgoing in firewall (e.g. ufw deny out 22)
pkill -KILL -u kodi  ( this kills all running processes of user kodi)
deluser kodi
remove userhome
remove rsync (I didn't use this)
remove /tmp/.mountfs*

Please take note this will probably ruin things for kodi. Instead of removing the whole userhome you can probably only remove dota.tar.gz (if it's there) and the .ttp folder (do not forget to clean the crontab!)

After a reboot I don't see any outgoing connections anymore (check with:

netstat -peanut | grep 22

Infection happened via a user with a weak password (kodi account with the default password maybe?)


Ubuntu external SSD not booting on my desktop, but works on my laptop

Thank you oldfred for pointing me in the right direction! Your answer didn't work straight out of the box, but I managed to use Gparted to fiddle around with partitions, creating two 1GB partitions in the beginning of the drive, one exfat32 and one ext4 (EFI and boot drive respectively) and then boot-repair's advanced editor like you suggested and created a boot partition + an EFI partition so now my desktop happily boots into Linux (before it showed Samsung T5 in the boot priority list, now it shows Samsung T5 AND Ubuntu!). Writing this from Ubuntu as a happy man.

And the Windows stuff was due to an old drive I forgot to disconnect, boot-info didn't even recognize my RAID SSDs where my Windows 10 resides.


Ubuntu 12.04 - Install newer libqtwebkit4 instead 2.2.1 for ScudCloud

I found a solution in ScudCloud's Github page:

Since you do:

sudo apt-add-repository -y ppa:rael-gc/scudcloud

Don't update and/or try do install ScudCloud. Instead, add these PPA's to solve the libqtwebkit4 incompatibility:

sudo add-apt-repository -y ppa:immerrr-k/qtwebkit4-backport

Then, update and install:

sudo apt-get update
sudo apt-get install scudcloud


Broken menu bar (global menu) on gtk2 apps after installing and removing Cinnamon

This is probably (like you love the menu integration) because in cinnamon, you enable in the settings of the global menu applet, some enviroment variables and you don't see the warrning.

Solution in this case:

If in /etc/environment file you have UBUNTU_MENUPROXY, you need to remove the line where it's if it appear and save file then. You will requiered be root (sudo), to edit this file.
Then, if in the folder /etc/profile.d/ you have a file called: "cinnamon-globalmenu.sh" remove also this file, you will requiered be root.
Reboot your machine.


USB write: delay between when Ubuntu says its done and it actually being done

It happens because Ubuntu takes all the data from the disk that is to be written to the USB and save it in the RAM buffer (Depends on the capacity of RAM). Then Ubuntu shows that the data has been written to the USB but actually data is being transferred from the buffer to the USB at that time. So, if you remove your USB during the transfer (although Ubuntu has shown you the transfer is done), you'll find that all data has not been transferred. You can use

  sudo iotop

to check for real time transfer between disk and other I/O and when you found that the transfer has really been done then you can safely remove the USB.


I upgraded from 1 GB to 2 GB and I saw a huge performance boost.

I had the standard Ubuntu Pangolin install + Google Chrome.  If I opened Google Chrome and opened, say, 10 different webpages, the system would slow right down.  With 2 GB the problem disappeared.


Free disk space is less than 20% on volume /boot

I referred here and it reduced over 100MB on /boot. Thanks.

root@sv:~# apt-get autoremove

root@sv:~# df -h
Filesystem                Size  Used Avail Use% Mounted on
/dev/sda1                 453M  215M  211M  51% /boot


There appears to be hell lot of bugs in 17.10 specially with gnome, so for now I suggest to use X or unity.

X:

click on wheel and select X at login.

Unity:

sudo apt install unity

select good old lightdm instead of gdm when prompted, reboot and choose unity at login.


Something is strange with your system.
The installer complains, that it can not find the binary locale, which is located at /usr/bin/locale, which is packaged in libc-bin, that you are just about to install.

So how did you get rid of libc-bin?
Isn't it installed? Can you run

dpkg -l libc-bin


tar: /: file changed as we read it tar: Exiting with failure status due to previous errors

Your tar -cvpzf backup.tar.gz ... command puts backup.tar.gz in the current directory (which is the home directory of root, /root, in the default installation). You exclude --exclude=/backup.tar.gz, which, in this case is not the same as $PWD/backup.tar.gz.

cd / and try again, or be consistent with the filename.


Trying to unmount Logical Volume, gives error "umount: /dev/lvm3/nlv1: not mounted"

You need to use the correct device name in the umount-command, it is the name you found with the previous grep-command:
sudo umount /dev/mapper/nv-nlv1

Alternatively you can pass the mount-point to the umount-command:
sudo umount /media/theperson/97ee469c-3af3-4a2d-a6be-b86847d686ef


mkusb progress stuck trying to make persistent Ubuntu 20.04 USB

From the screenshot I conclude that mkusb is stuck (or very slow) during cloning from the iso file to partition #4.

This can happen, if the target drive has been used before, and many memory cells are already occupied. We must understand that USB pendrives are rather cheap devices, and the built-in management of the memory cells (how they are linked to the logical structure with a partition table, file systems, directories and files) can get overloaded and slow. Sometimes a USB pendrive or memory card gets completely locked, 'gridlocked', and then it is read-only (and cannot be repaired). Let us hope that your pendrive is only slow.

I agree with the advice by C.S.Cameron: "X out of mkusb and eject the USB safely. Do a full wipe of the drive using mkusb and repeat the install ...".

Select mkusb's menu option "Wipe the whole device". It means that the whole drive will be overwritten with zeros (even the partition table and file systems). This will be rather slow, but chances are much better that it will work compared to creating a persistent live system. This wiping process will release the built-in management of the memory cells, and the automatic leveling of wear of memory cells can do its job.

So when you try again to create a persistent live drive, the process will be much faster. Please notice that you need not do any formatting before you use mkusb to create a persistent live drive.

You find more details at the following links,

Pendrive lifetime

Can't format my usb drive. I have already tried with mkdosfs and gparted

Wipe the first megabyte or the whole device


Black screen after updating ubuntu 20.04 to 20.10

After you log in and get a terminal.
First, try typing exit and then press ENTER.
If it does the same thing, follow the instructions to reboot. You can either run:
sudo reboot

or
systemctl reboot

If you still get the same thing, review the journalctl errors by running the following command and post those to your question:
journalctl -xb

The last thing I would suggest would be to run the following commands to finish any unfinished updates:
sudo apt update
sudo apt dist-upgrade

Then, reboot.
Please post any errors.


Only Dummy Output appears in Sound Settings [SOLVED]

It seems the loss of the sound card was due to upgrading the kernel from 5.6.0-64 to 5.8.0-38.
Here is the solution:
1.boot to 5.4.0-64
2.sudo apt-mark hold 5.4.0-64-generic
3.sudo apt remove -y $(dpkg -l | grep -o -P "linux-[\S]*-5.8.0[\d\S]+")
4.reboot
5.sudo apt update && sudo apt -y upgrade && sudo apt autoremove
In the future, to revert to kernel upgrades, we will do:
6.sudo apt-mark unhold 5.4.0-64-generic


I managed to make it work by directly linking fastcgi_param to the status.html file by changing the following line:
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

To this:
fastcgi_param SCRIPT_FILENAME /usr/share/php/8.0/fpm/status.html;

And the status page is finally working now.
Not really sure why $document_root$fastcgi_script_name doesn't resolve to the relevant path though.


What you have to do is to install grub. Which is a bootloader helps to choose b/w different os.  This link shows how to


Does grep distinguish a variable and the $ regex?

Grep knows nothing it does not see. If grep sees $string$, it will try to match $string{end-of-line}. What happens is that the shell expands the variable $string before grep kicks in, so that grep receives
test$ as the regex.
But, given the word $string$, why is the last $ is not expanded while
$string is?  Because $ is not a valid variable name. This is very clear
in the POSIX specification:

If the parameter is not enclosed in braces, and is a name,
the expansion shall use the longest valid name (see XBD Name),
whether or not the variable represented by that name exists.

And XBD name states

In the shell command language, a word consisting solely of underscores,
digits, and alphabetics from the portable character set.
The first character of a name is not a digit.

And there are also special parameters, such as $$, $@, $#, etc..
If you don't want to remember all this, simply follow Gordon Davisson's advice
and escape every $ that should not introduce a variable to ensure it will
be preserved.
$ echo "$string$"
test$
$ echo "$string\$"
test$
$ echo "\$string\$"
$string$

Also remember variables are expanded in double-quotes but not in single quotes.
$ echo 'test' | grep '$string$'   # No match, $string is not expanded
$ echo 'test' | grep "$string$"   # Match, $string is expanded
test

I want to grep for a variable that has the string test, but I also want to make sure that it will only find test if that is the only word on a line.

For that, you need either the regex ^test$ (to anchor the string both to the start and end of line) or to use the -x flag of grep. Your original attempt would match Atest because the regex test$ is not anchored to the start of line.
$ echo Atest | grep "$string$"
Atest
$ echo Atest | grep -x "$string"
$ echo Atest | grep "^$string$"


Getting kernel panic wth the message "not syncing fatal exception in interrupt"

I was having the same issue. I turned off the proprietary drivers I was using and the panics seem to have stopped. Specifically I think it was a Broadcom driver that was causing my issue.

To get a full answer you'll need more specifics though. What kernel are you running? What is the full error message? Do you have any pci cards installed?


How to escape spaces in .desktop files Exec line

Precede each space by a backslash:

[Desktop Entry]
Name=Sublime Text 2
GenericName=Sublime Text 2
Comment=Edit text files
Exec=/home/user/opt/sublime/Sublime\ Text\ 2/sublime_text %U


Why isn't one of my GPU cards showing in sensors?

Upgrading the kernel to 4.13 fixed this.


convert subtitle MKS to SRT in terminal?

Try out this solution.

It worked back then, I see no reason why it should not work any more !


Allocate space from NTFS to ext4 with GParted

While the partition you want to change (i.e. your Ubuntu partition) is in use (mounted), you can't make many changes to it, especially if those changes involve moving the partition. Of course, with data partitions, you can unmount them and edit them how you wish, but you can't do that with the partition that is currently booted.

The procedure to resizing your Ubuntu partition requires that you have some sort of Linux LiveCD/USB handy. If you have another Linux OS on the drive, don't use that. It can cause problems. If you still have your Ubuntu installer lying around somewhere, just skip these steps and continue on with the rest. If you don't have your installer, follow these instructions to create a new one.

USB Method:

You will need a blank USB flash drive that is at least 4GB.

Open a terminal (Ctrl+Alt+T) and run sudo apt-get install unetbootin.
Once that is done, close the terminal and search for and open the application, Unetbootin.
Inside Unetbootin, select the first option.
In the Select Distribution dropdown, select Ubuntu, and choose 15.10 for the version.
Toward the bottom of the window, you will see options for the desired target of the Ubuntu installer. If you only have one flash drive plugged in, Unetbootin will have selected it automatically.
Click the Confirm button near the bottom right of the window to 'burn' Ubuntu to the USB drive.

Now that you have an installer disc or USB stick, reboot and boot into it. Choose the Try Ubuntu without installing. option when prompted. Once you are in the Live Environment, you can start the procedure to moving your partitions.

Search for and open Gparted and let it scan your drives.
Once you see your partitions, and can interact with them, right click that new ext4 partition your created.
Select the Delete option to delete it. Please make sure you aren't actually deleting your Ubuntu installation. Delete the 97GB partition.

Now you should have about 97GB unallocated space in that area again.

Now, right click the Ubuntu partition and make sure it is unmounted by clicking the Unmount option if it exists. If not continue on.
In the right-click menu of the Ubuntu partition, select the Resize/Move option.
In the window that pops up, drag the partition shown at the top of that little window as far left as it can go.
Now, drag the right of the partition as far right as it can go, filling up all the space in that little diagram.

If there is a little extra space, don't worry about it.

Click OK to exit the window and then click the checkmark button near the top of the window to apply your changes.
Let that run and when it's finished, close Gparted and reboot.

There is a chance Ubuntu won't boot after this. If that happens, use the boot-repair ISO from community.ubuntu.com. You'll have to burn it with another computer or from the Live Environment, using Unetbootin.

If you have any questions, comment. Sorry for the rushed ending. I have to leave for a while.