Ubuntu and LAN games (specfically Minecraft)

First, you should check the firewall configuration on the computer running the server (the one on which you opened your world to LAN).

ufw is the default firewall interface on Ubuntu (you will need a terminal).

> sudo ufw status verbose

Bellow is the configuration for one of my home server:

Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing)
New profiles: skip

To                         Action      From
--                         ------      ----
22/tcp                     ALLOW IN    Anywhere
5901/tcp                   ALLOW IN    Anywhere
22/tcp                     ALLOW IN    Anywhere (v6)
5901/tcp                   ALLOW IN    Anywhere (v6)

We can see that all incoming connections are denied, while all outgoing are allowed (this a standard configuration).
Additional rules allow incoming connections to SSH (22) and VNC (5901) ports.

If you are on a LAN, behind a router and the router doesn't forward ports to your computers, it should be safe to disable the firewall:

sudo ufw disable

An other option I would feel more comfortable with is to allow anything coming from your LAN:

sudo ufw allow in from 192.168.0.0/24

This assuming that is using addresses looking like this : 192.168.0.*
You can check that using

ip addr show | grep "inet "

Mine is on IP 192.168.0.9 :

inet 127.0.0.1/8 scope host lo
inet 192.168.0.9/24 brd 192.168.0.255 scope global wlan0

I don't really know how minecraft works, but it should only be necessary to change the firewall settings on the minecraft server.


L1 + L2 cache hardware information with lscpu different to information from Intel & Windows

OK, I compared it to my processor and your processor has two memory channels and mine too, so you have to multiply (or divide) the cache by the number of memory channels, so that's solved!

The maximum CPU is not dependent on Ubuntu but on your motherboard/chipset/RAM,… Also, Ubuntu lowers the CPU speed automatically if you're not using it a lot to save energy!  ;)

The Level1 cache stumps me too: no explanation.  (Ask Intel and report back here)

And most important of all: Yes, your processor is Ubuntu-friendly!  ;)


Ubuntu 15.04 intalled on older computer is running slow

Are you using the default Ubuntu?

Try some derivates like Xubuntu or Lubuntu because they use a window manager that uses less resources than Gnome, which is the default window manager for Ubuntu.

You can also try installing XFCE (the window manager from Xubuntu) or LXDE (the window manager from Lubuntu) manually and use them (but tis is a bit more difficult than simply use a derivate and istall this).


Your partition was not cleanly unmounted the last time it was used. Unfortunately, because it's NTFS, this problem cannot be fixed within Ubuntu; you must fix it from Windows. You can (temporarily) move the disk to a Windows computer, use a Windows emergency repair disk, or re-install Windows on the disk to fix the problem.

Once the problem is fixed, if you intend to keep using your computer as Ubuntu-only, you should back up the data on the partition in question, convert the partition to a Linux-native filesystem (ext4fs, btrfs, XFS, etc.), and restore the data; or back up the data, delete the partition, expand your Ubuntu partition, and restore the data. Using NTFS on a Linux-only computer is asking for trouble, since when a problem occurs (as you've encountered), the only solution is to use Windows to fix it.

While you're considering this, I recommend you look into the possibility of using a separate /home partition, as covered here. Various other questions, like this one, cover the mechanics of creating a separate home partition. I mention this because my hunch is that the data on your NTFS partition would belong, mostly or completely, in your home directory, and for a dedicated Ubuntu machine, IMHO, a separate /home partition is a moderate advantage for such a system.


Ubuntu 18.04 LTS Fresh install - Can't run 1080p @60Hz

Fixed it! I did the following:

Use the following tool from Nvidia to search for the driver you need: http://www.nvidia.com/Download/index.aspx?lang=en-us
Reboot your system, and press the E key on the grub bootlader screen with the Ubuntu option selected.
At the end of the "linux" line, add the following:

nouveau.modeset=0
Press F10 and let it boot.
Before signing in, click the settings button to change from "Ubuntu" to "Ubuntu with Wayland".
Once you are signed in, go into your settings and you should be able to select 1920x1080, with a 60Hz refresh rate.


Kubuntu 12.04 screen capture (KSnapshot, etc.) broken by update

Questions/ Check list

AMD with the open/propietary drivers ?
Driver version ?

KDE version ? (available KDE 4.8.5 & 4.10.1)

Any error messages ?
Have you tried to launch the ksnapshot from the konsole/terminal ?

Ksnapshot help:

:~$ ksnapshot --help
Usage: ksnapshot [Qt-options] [KDE-options] [options]

KDE Screenshot Utility

Generic options:
  --help                    Show help about options
  --help-qt                 Show Qt specific options
  --help-kde                Show KDE specific options
  --help-all                Show all options
  --author                  Show author information
  -v, --version             Show version information
  --license                 Show license information
  --                        End of options

Options:
  -c, --current             Captures the window under the mouse on startup (instead of the deskto
  --fullscreen              Captures the desktop
  --region                  Captures a region
  --freeregion              Captures a free region (not rectangular)
  --child                   Captures a part of windows

Are there error messages in the ~/.xsession-errors ?
About error messages: http://www.kubuntuforums.net/showthread.php?59067-Where-are-error-messages-from-programs-launched-from-the-K-menu

Have you tried with the new user ?
Sometimes the KDE settings get screwed - with the new user they should work. If they are working with the new user then you could reset the old users settings.


Can't start docker on Ubuntu 16.04 with driver not supported error

Apparently removing the folder isn't the best course of action because you are deleting any containers you had running. The better course of action is installing the linux-image-extras package that corresponds with your current kernel.

sudo apt-get update
sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual

sudo modprobe aufs

sudo service docker restart

See https://mymemorysucks.wordpress.com/2016/03/31/docker-graphdriver-and-aufs-failed-driver-not-supported-error-after-ubuntu-upgrade/


This is because cloning is used for creating the directory, setting it up for use with git, and copying the files into it. Since you already have files in that directory, it could be unwise to replace something in it that you might have put hours of work into, so it won't allow that.

You have two options:

Updating to the latest files

cd repository-name
git pull

Restarting from scratch

rm -rf repository-name
git clone https://github.com/username/repository-name


It's .Skype, a hidden folder in the home directory.

Hit ctrl+h to reveal hidden folders, or run rm -r .Skype in a terminal window to remove it.


It is certainly possible. To my knowledge, Samba doesn't care what file system you're using, just so long as you can read it and mount it. If you setup a Samba share that points to a directory on your esata drive, windows machines will be able to view it without ever having to know that it's formatted ext4.

edit:
To provide more information, modifying your /etc/samba/smb.conf is how you would go about creating a share for your esata drive.

As an example, here is a relevant entry in my smb.conf:

[raid]
   comment = 4TB Raid5
   path = /mnt/raid
   public = yes
   writable = yes
   create mask = 0777
   directory mask = 0777
   force user = nobody
   force group = nogroup

That will create a share named raid that points to the directory /mnt/raid. It doesn't require a username/password, and it's writable.

After making those changes, use sudo service smbd restart to restart the samba server.


All routes except "/" return 404 from Nginx running Flask WSGI

That's because you did not define all the routes in your nginx configuration, you should have something like the example below, except that you should change server_name and ports.
Note : I was using this snippet to connect nginx to other containers so think about changing http://client:80; to your localhost or application name, also do the same for all the routes.
The main idea is to define all routes.
http {

         server {

            listen 80;
            server_name localhost 127.0.0.1;

            location / {
                proxy_pass          http://client:80;
                proxy_set_header    X-Forwarded-For $remote_addr;
            }

            location /api/ {
                    # why should i add / at the end 5000/ to make it work
                proxy_pass          http://api:5000/;
                proxy_set_header    X-Forwarded-For $remote_addr;
            }

            location /api/client {
                proxy_pass          http://api:5000/client;
                proxy_set_header    X-Forwarded-For $remote_addr;
            }
}


I know this isn't the answer you want, but modern browsers don't play midi files. To the best of my knowledge Mozilla dropped support for NPAPI plugins around the first quarter of 2017. Wikipedia makes this clear.

  Music files may occasionally use the MIDI format (.MID or .MIDI extension). MIDI is often playable without additional software, and some PCs have a MIDI-enabled player and sound card. However, for macOS (since 10.9 Mavericks), a MIDI file is not playable by both Safari and QuickTime pre-installed in the system and an alternative standalone player has to be used. The situation is similar with modern Firefox and Google Chrome browsers which do not support MIDI by default but require additional software (plugins, extensions, codecs) to play such files.

One solution is to download and play them in totem (a.k.a Videos) Totem requires a plugin for this that it doesn't automatically find. The solution to THAT is to be found in the fluidsynth package.

Another option mentioned by doug in a comment above can be found here: Audacious: How to play midi files?

S number of popular MIDI files can be found here.

Sources:

https://support.mozilla.org/en-US/questions/1149132

https://en.wikipedia.org/wiki/Wikipedia:Media_help


Can't figure out DNS configuration for Static IP on Groovy

systemctl restart networking
This is not required (and I would not expect it to do anything except return an error).

As for why DNS isn't working: check the output of resolvectl.  Do you have the correct DNS servers listed in the output?
Also, what are the contents of /etc/resolv.conf?


Telegram 2.1.7 launcher icon not showing up ubuntu 20.04

Looks like the desktop file is not executable.
Open a terminal, and run the command
chmod +x .local/share/applications/telegramdesktop.desktop

You might have to logout and login for it to show up in the menu.
If it does not work, replace the contents of the file .local/share/applications/telegramdesktop.desktop (using the command gedit .local/share/applications/telegramdesktop.desktop) with the following.
[Desktop Entry]
Version=1.0
Name=Telegram Desktop
Comment=Official desktop version of Telegram messaging app
TryExec=telegram-desktop
Exec=telegram-desktop -- %u
Icon=telegram
Terminal=false
StartupWMClass=TelegramDesktop
Type=Application
Categories=Chat;Network;InstantMessaging;Qt;
MimeType=x-scheme-handler/tg;
Keywords=tg;chat;im;messaging;messenger;sms;tdesktop;
X-GNOME-UsesNotifications=true

You might have to run chmod +x .local/share/applications/telegramdesktop.desktop
once again.


You can use cron to do this for you.

Simply do crontab -e in terminal
It will open in your selected editor, where you can type
@reboot <your command>
(make sure you give full path for all executables)
Save the file and exit

Ref: http://manpages.ubuntu.com/manpages/precise/en/man5/crontab.5.html


How can I determine what codec is being used?

Normally compression doesn't change pitch, but depending on the program the hertz will. For instance if a 48000 file is played at 44100 the file will play more slowly, and will the pitch will drop. Just check the hertz your files are playing at.


Using PIP to install swampy

pip is a tool for installing and managing Python packages

sudo apt-get install python-pip
sudo pip install swampy


do-releas-upgrade non working (Ubuntu 19.04 to 19.10) Operation not permitted or denied

Found this command which solved my issue:

sudo pkexec do-release-upgrade -m desktop


How to add another Ubuntu version to "affects" list on Launchpad bug?

It seems that there is another link called "Nominate for release", which is supposed to be available for only bug administrators, according to this mailing list discussion and this bug report. Since neither of us are one, the best option is to leave a comment noting that it still affects 12.04.


How can I run Linux GUI apps on Ubuntu-touch 16.04 on Nexus 5?

You do not need to install the scope separately any more. If you open the scopes overview/manager by swiping up from bottom edge on the dash, you can favorite the already installed desktop apps scope, to see the list of apps in your libertine containers again.


Cannot encrypt Ubuntu installation in dual boot

What you want to do should be possible. You will need to manually partition though.

Before you do anything, use Clonezilla or the built-in Windows imaging software to grab a system image! That way, if something goes very wrong, you can restore to a working single-boot, Windows system.
The first thing you'll have to do is shrink the Windows partition to make space for Ubuntu (you can use GParted in the LiveOS). My guess is that you already have an EFI partition, so you'll need to make two new partitions in the empty space one for /boot and one for LUKS. Then you should be able to follow the steps in this answer to install Ubuntu using manual partitioning.


Just tested the Logitech with Cheese again and the image has degraded. It looks like the camera is broken and slowly getting worse. Cheese handles this failure better, initially picture was good in Cheese while bad with lines in Chrome, now the image while not a bad as when viewed in Chrome, is getting worse in Cheese. The issue was Hardware failure.


Changing themes and icons with Unity or Ubuntu Tweak, but getting same menu bar "defaults"

I am experimenting myself with icon themes.
You can try this:

Edit the index.theme file that is in te icon theme folder. It should be under ~/.icons/breeze-dark or /usr/share/icons/breeze-dark
and change the line that says

Inherits=hicolor

adding the name of a theme (in the first place) that you have intalled in the system and that has the top panel menus that you like. In my case:

Inherits=clear,hicolor


How to change "File Type" on upload to Ubuntu One Cloud Storage

I'm not sure what you're asking exactly, but Ubuntu One doesn't really know anything about the MIME types. Do the files have different extensions? Are they encoded with different codecs?


GRUB can't find Ubuntu running grub-install /dev/sda

Solved by boot repair, I don't know what it did but it worked


How to change default new file template Presentation on WPS Office Linux (Ubuntu 20.04)

I am using Ubuntu 20.04 and downloaded WPS 2019 version 11.1.0.10161 from the website https://linux.wps.com/
If you are using ubuntu and installing from the website's deb file, then most probably the installation location and settings are same as mine, so you can try to follow this.

Edit your desired Presentation template. And this means we want to edit from the Slide Master. In the ribbon, open Design > Edit Slide Master then edit all of the fonts or background if you like. Then after you finish, go to the ribbon Slide Master, then click Close.
Save this file as newfile_linux.pptx on your /home/Documents folder
Find the default new file template for WPS Presentation. Mine is located at here, so find it in your file browser.

/opt/kingsoft/wps-office/office6/mui/en_US/templates/Wpp Default Object/prometheus/newfile_linux.pptx

We want to replace the file on point 3 with the file we created on point 2. But that default file is read-only, so we need to remove this file first then replace it with the one we created. You may want to copy the original default template for a backup. To remove it, type this in Terminal (ctrl + alt + T)

sudo rm -r "/opt/kingsoft/wps-office/office6/mui/en_US/templates/Wpp
Default Object/prometheus/newfile_linux.pptx"

Then it will ask your password, just type it it's invisible. Then press enter.

Now move your own created file on point 2 to the WPS default new file location. Type this in Terminal

sudo mv "/home/brian/Documents/newfile_linux.pptx"
"/opt/kingsoft/wps-office/office6/mui/en_US/templates/Wpp Default
Object/prometheus/newfile_linux.pptx"

That's it! I hope this helps you. Please give a vote button if it does.


Ubuntu 18.04 doesn't see my web camera. Help me please

A little search and I found this bug on lauchpad https://bugs.launchpad.net/ubuntu/+source/linux/+bug/144745

The proposed solution is to unload 2 modules and reload it

sudo modprobe -r gspca
sudo modprobe -r zc0301
sudo modprobe gspca

A permanent fix would then be to blacklist the zc0301 module. Create a file /etc/modprobe.d/blacklist-zc0301.conf with this content

blacklist zc0301


How to setup dual boot with two drives with two different versions of Ubuntu (v12/v14)?

Yes. GRUB will do it all. Simply install both drives in the machine.

Boot from whichever one you want Open a terminal and run  sudo update-grub


How does Ubuntu determine a package to be installed?

Yes. dpkg records entries of packages installed in the system. The file it maintains is /var/lib/dpkg/status.

From man dpkg

/var/lib/dpkg/status
      Statuses  of  available packages. This file contains information
      about whether a package is marked for removing or  not,  whether
      it  is  installed  or  not,  etc.  See section INFORMATION ABOUT
      PACKAGES for more info.

      The status file is backed up daily in /var/backups.  It  can  be
      useful if it's lost or corrupted due to filesystems troubles.


How to customize the LXTerminal console in Lubuntu 16.04?

If you want colours you have 2 easy options.

Upgrade to 18.04,
the new terminal has a funky colour scheme.

Go to software and download terminal.

System tools-> Software, then search terminal.
The store typically has pictures from which you can get a feel for its functionality.


Asking for cache data failed | Assuming drive cache : write through. Ubuntu 12.04 LTS GUI doesnot appear

Sounds like you are using  a server installation. If you deleted software and you also deleted the desktop you can re-install it with..
sudo apt-get update
sudo apt-get install ubuntu-desktop

After you reboot you will see a desktop again.

This...

Asking for cache data failed
Assuming drive cache : write through

has nothing to do with it.


Audio output and input stopped working after the last update

I was able to get it to work! I'm not sure why, but I think the update removed my user from the group pulse. So, I added myself again and logged out:

$ sudo usermod -a -G pulse renatov

When I logged back, audio was working again. If someone got trouble with the sound in this last update too, I hope it helps!

PS: Originally I added myself to audio and pulse groups. This update messed a lot of things here, I'll do a clean install.


Ubuntu install doesn't recognize SSD but Windows 7 does

Verify that this is a problem with your hardware by trying find the Kingston drive with sysRescueCD.  If it can find it, then try a different version of Ubuntu


Dual booting ubuntu and windows, window won't load even after updating with

Does grub bootloader work fine? If so you can just choose to boot to Windows from grub menu. Otherwise will you please post more information in this?


USB file transfer (MTP) more difficult Android > 6.0

If your Android is version 6 or higher setting up USB file transfer (MTP) is more difficult than before. First you need to enable developer options. Then you need to select MTP each time the phone is connected: How To Set The Default USB Connection Type In Android 6.0

Here is a screen shot from the link:


How can I stop LibreOffice from randomly crashing?

According to this thread http://ubuntuforums.org/showthread.php?t=1813246 and http://forums.linuxmint.com/viewtopic.php?f=47&t=77851&p=456737 this problem is linked with the graphics card in use is Intel HD Graphics and on an Intel Sandy Bridge CPU like the (Intel(R) Core(TM) i5-2540M).

The suggested fix is to disable anti-aliasing on LibreOffice. To do so go to the Tools menu, select options. Then on the next screen select "view" from the "LibreOffice" menu and then deselect "Use Anti-Aliasing"

I confirm it worked for me. So far Libre office has not misbehaved after I disabled the Graphics Output options from the LibreOffice View preferences. Thank's to the mint and Ubuntu forums. That saved my day. I've been searching for so long...


How to reinstall Ubuntu Software Center?

Luckily, the desktop environment runs on top of another terminal, called a TTY. A TTY is a basic terminal found on the system, which the desktop environment runs on top of. To access TTY1, use the shortcut Ctrl+Alt+F1.

A text-based login screen should appear. Login with your regular username and password. The password will not appear on-screen.
Use apt-get to re-install the terminal:

First call sudo apt-get update to make sure you will install the latest version.
Then sudo apt-get install gnome-terminal to actually install the missing terminal.
The software center can then be installed with sudo apt-get install software-center.

Sign out with logout. You can return to the regular desktop environment with Ctrl+Alt+F7.

If want more information installing software with the command line, see

What does "sudo apt-get update" do? and
what does "sudo apt-get install aptitude" do?


Always try a script by running it from a command line. If you did that, you would see the following message

:~$ ./test.sh
./test.sh: line 20: syntax error near unexpected token `)'
./test.sh: line 20: `        *) echo "Please enter either C or Press [ENTER]"'

If you look up the bash manual, you will see the following syntax:

case word in [ [(] pattern [ | pattern ] ... ) list ;; ] ... esac

That means that after the commands to be executed, you need to add a ;; (not necessarily after an exit statement!) The following case statement works as well:

case $selection in
    [Cc]) exit;;
    "") echo "Shutting down... 'sudo shutdown -c' to cancel"
        sleep 5
        sudo shutdown -h 180
        ;;
    *) echo "Please enter either C or Press [ENTER]"
        ;;
esac

OK, but this is a boring answer. You know what -- you want an interactive program. You launch it in a GUI (by clicking on an icon). Why not use (tadam!) zenity:

#!/bin/bash

if zenity --question --text "Shutdown in 3 hours?" ; then
  zenity --info --text "Shutdown has been scheduled"
  sudo shutdown -h 180
else
  zenity --info --text "Shutdown CANCELLED"
fi


Gianni's solution, as described above, worked for me.
Any '.png' file in the 'default' directory needs 'convert' run on it.

sudo apt-get install imagemagick
cd /usr/share/mplayer/skins/default
for FILE in *.png; do sudo convert $FILE -define png:format=png24 $FILE; done


Increasing brightness with Fn-key outputs symbol ±

Using the X event tester xev output:
KeyRelease event, serial 38, synthetic NO, window 0x4400001,
    root 0x6a9, subw 0x0, time 10913765, (1291,-68), root:(1342,47),
    state 0x0, keycode 126 (keysym 0xb1, plusminus), same_screen YES,
    XLookupString gives 2 bytes: (c2 b1) "±"
    XFilterEvent returns: False

I take note of the keycode 126 and add the line xmodmap -e "keycode 126 = " (note that I map it to nothing) to the file .bashrc (hidden in the home directory). This has solved my problem, though it is more of a workaround than an actual solution.


As a temporary solution, you can manually set it higher than 100% from the command line with:

pactl set-sink-volume 0 150%

If the command is not found, you need to install:

sudo apt install pulseaudio-utils

The 0 there is the index of the sound card sink you want to use. You can determine it with:

pacmd list-sinks | grep -e 'name:' -e 'index'

The 150% is the percentage of volume you want. Start with 150% and work from there slowly. You dont want to blow your laptop speakers with clipped audio


Change the character separating username and hostname in the terminal

You can use different tools like: http://ezprompt.net to create your desired prompt, what you want can be achieved by:

export PS1="\uⒶ\h\w\\$ "

Put it in your .bashrc and you are done.

\u : user
Ⓐ  : exactly a Ⓐ char.
\h : hostname
\w : working directory
\\$ : prompt sign


Why do many software packages in Ubuntu have the letter 'g' appended?

As it was very nicely pointed out to me, that these letters are in place to prevent the OSes from using the same names for different programs. Also to make it easier to see what OS the package belongs to.

The ones you listed are for the GNOME Desktop. They work in other environments, they were just developed in GNOME. If you type in man gedit it shows you the name, and this is what it shows.

gedit - text editor for the GNOME Desktop

The same rule applies to apps like k3b a burning application for K Desktop Environment.

k3b - KDE CD burning program

k3b can be installed into GNOME or other environments by typing in

sudo apt-get install k3b

When a application gets installed into another desktop environment, it grabs dependency files that work for the environment it was developed for.  It does not install the actual Desktop Environment though.

NOTE: this is not always true.  I suggest when in doubt, check the man page or developers site as they should show you why it is named what it is.


How to downgrade kernel after bad update (16.04)

Remove the latest kernel by

sudo apt remove linux-image-4.4.0-91-generic linux-headers-4.4.0-91-generic

That will uninstall meta packages linux-generic, linux-image-generic and linux-headers-generic. Kernels will never be upgraded.

To revert it you can run

sudo apt install linux-generic

That will install the latest kernel and kernels will get upgrades.

linux-generic is a meta package. It is empty, but depends on two other meta packages: linux-image-generic and linux-headers-generic.

The last two point to the latest kernel image and headers.

If you remove meta packages, nothing will be removed from the Linux, but kernel image and headers won't get updates. You can always install them later. They will pull the latest "real" kernel packages.

So the solution is to manually remove the kernel packages you don't want and also the meta packages.


I'm looking program for vector based animation/video

Try synfig  studio. It's similar in some ways to Inkscape, and geared toward vector based animation.

Screenshot:

The interface is obviously a bit confusing at first (even overwhelming), but fortunately in the help menu there are tutorials and more to get you going.


So...

The problem has gone away, but I don't know why!

Here's what I did:

1 - Install Gnome desktop (I already had KDE) thus:

$ sudo tasksel install ubuntu-desktop

2 - Logout, and login with Gnome

3 - Check copy and paste -- it worked fine, all formats preserved

4 - Reboot (there were updates which demanded I do so)

5 - Login with Plasma (KDE)

Now copy and paste in KDE also work fine, all formats preserved.

This seems - for now at least - to have fixed the clipboard issue. I hope it doesn't return. Perhaps this information will be of use to someone else, one day, too!

EDIT

The problem came back. I logged out of KDE, and logged in again. The problem had vanished. Clearly re-starting the KDE session fixed the fault, for now at least. I wonder how long it will stay fixed this time...

FURTHER EDIT

The problem came back again. But this time I noted it appeared after starting KRDC remote desktop connection client. So I did some testing. Now, many tests later, and a whole day, the problem seems to have stayed away. My solution was to uninstall KRDC remote desktop connection client, and use Remmina remote desktop client.


"libgnutls-dev has no installation candidate" error while installing Ubuntu as a DC in a Windows server domain

Looking into this, I found https://launchpad.net/ubuntu/bionic/+source/gnutls28

Change the package to libgnutls28-dev, so your command would be

sudo apt-get install git build-essential libacl1-dev libattr1-dev libblkid-dev libgnutls28-dev libreadline-dev python-dev python-dnspython gdb pkg-config libpopt-dev libldap2-dev dnsutils libbsd-dev attr krb5-user docbook-xsl libcups2-dev libpam0g-dev ntp


And the answer is: to build RAID on partitions (/dev/sdb1, /dev/sdc1 ...) rather than on entire devices.


What packages did Midori install for it to run that I should uninstall to be completely rid of Midori?

I normally use rdepends for that, install it with sudo apt-get install apt-rdepends or look for in the Ubuntu Software Center.

After installing the program you can use it simply by opening a terminal and typing sudo apt-rdepends <package_name>.

It will show you all the dependencies any package that is in your apt lists required to install and all the dependencies of a package that you might be thinking about installing.

It shows the information in a tree diagram where all the dependencies from one package are compared against all the dependencies of the each package dependency... (and so).

ie:

  sudo apt-rdepends sqlite

Reading package lists... Done
Building dependency tree
Reading state information... Done
sqlite3
  Depends: libc6 (>= 2.4)
  Depends: libreadline6 (>= 6.0)
  Depends: libsqlite3-0 (>= 3.6.18)
libc6
  Depends: libc-bin (= 2.13-20ubuntu5)
  Depends: libgcc1
  Depends: tzdata
libc-bin
libgcc1
  Depends: gcc-4.6-base (= 4.6.1-9ubuntu3)
  Depends: libc6 (>= 2.2.4)
  PreDepends: multiarch-support
gcc-4.6-base
multiarch-support
  Depends: libc6 (>= 2.13-0ubuntu6)
tzdata
  Depends: debconf (>= 0.5)
  Depends: debconf-2.0
debconf
  PreDepends: perl-base (>= 5.6.1-4)
perl-base
  PreDepends: dpkg (>= 1.14.20)
  PreDepends: libc6 (>= 2.11)
dpkg
  PreDepends: coreutils (>= 5.93-1)
  PreDepends: libbz2-1.0
  PreDepends: libc6 (>= 2.11)
  PreDepends: libselinux1 (>= 1.32)
  PreDepends: xz-utils
  PreDepends: zlib1g (>= 1:1.1.4)
coreutils
  PreDepends: libacl1 (>= 2.2.11-1)
  PreDepends: libattr1 (>= 2.4.41-1)
  PreDepends: libc6 (>= 2.7)
  PreDepends: libselinux1 (>= 1.32)
libacl1
  Depends: libattr1 (>= 2.4.41-1)
  Depends: libc6 (>= 2.4)
  PreDepends: multiarch-support
libattr1
  Depends: libc6 (>= 2.4)
  PreDepends: multiarch-support
libselinux1
  Depends: libc6 (>= 2.8)
  PreDepends: multiarch-support
libbz2-1.0
  Depends: libc6 (>= 2.4)
xz-utils
  Depends: libc6 (>= 2.7)
  Depends: liblzma2 (>= 5.0.0)
liblzma2
  Depends: libc6 (>= 2.4)
zlib1g
  Depends: libc6 (>= 2.4)
  PreDepends: multiarch-support
debconf-2.0
libreadline6
  Depends: libc6 (>= 2.11)
  Depends: libtinfo5 (>= 5.6+20070908)
  Depends: readline-common
libtinfo5
  Depends: libc6 (>= 2.4)
readline-common
  Depends: dpkg (>= 1.15.4)
  Depends: install-info
install-info
  Depends: libc6 (>= 2.4)
libsqlite3-0
  Depends: libc6 (>= 2.4)
  PreDepends: multiarch-support

If you just want to see what midori installed during the installation process (and not all the list of dependencies of midori) you can check your /var/log/apt/term.log file, it will show you all the steps apt has performed until now in your system, including installations and removals of packages.

Have a look at it running cat /var/log/apt/term.log | more in a terminal or open it with your favorite text editor.


Dual-Boot with Win10 - Win Boot says 'invalid EFI file path' after restart

With BIOS and multiple drives, you do not run the auto fix in Boot-Repair as you do not want one grub in every MBR. You really want Windows BIOS boot loaders in MBR of sda & sdb as those are Windows only drives and grub only in sdc. Grub also only boots working Windows 10, so after Windows updates which turn fast start up back on, you normally have to directly boot Windows from BIOS, so you can turn fast start up back off.
Use Boot-Repair's advanced mode & install a Windows type boot loaders to MBR of sda & sdb. Or use your Windows repair/recovery drive to repair your Windows installs.
https://sourceforge.net/p/boot-repair/home/Home/
You also need to turn off Windows fast startup.
Unable to mount Windows 10 partition; it "is in an unsafe state"
Unable to mount Windows (NTFS) filesystem due to hibernation
And it looks like you originally installed Ubuntu in UEFI boot mode. UEFI & BIOS are not compatible. Or once you start booting from UEFI, you cannot switch modes and grub then can only boot other installs in same boot mode.
You have newer UEFI system, but old BIOS/MBR type installs. Long term you need to think about reinstalling Windows & Ubuntu in UEFI boot mode. Microsoft has required vendors to install Windows in UEFI boot mode to gpt partitioned drives since 2012. But BIOS/MBR still works for now.


Setting LDAP users Permission and assigning roles on ubuntu 14.04

There are no straight answer for this, you need to combined LDAP with PAM.D module to make it work. Another solution would be IdM server for Red Hat.


I don't know what they're for but here are three commands that will create these files and fill them with the same content as my copies of /etc/init.d/.depend.{stop,start,boot}

sudo install -b -m 644 <(<<EOF
TARGETS =
EOF) /etc/init.d/.depend.stop

sudo install -b -m 644 <(<<EOF
TARGETS =
INTERACTIVE =
EOF) /etc/init.d/.depend.start

sudo install -b -m 644 <(<<EOF
TARGETS =
INTERACTIVE =
EOF) /etc/init.d/.depend.boot


Xubuntu Xfce - multiple actions for shortcut

Setting up:
1. Install wmctrl by pasting sudo apt-get install wmctrl in terminal.
2. Copy the script below to your bin directory in your home directory. Create bin if necessary.
3. Make the script executable chmod +x ~/bin/script-name

Editing script:1. Replace the two instances of panel-5 with the number of your panel that has the workspaces on it.2. Change sleep 5 to the amount of time in seconds you want to panel to be displayed.

#!/bin/bash

# Switch to the next workspace and make your panel appear
wmctrl -s `wmctrl -d | awk '$2=="*"{cur=NR} END{print cur % NR}'` &
xfconf-query -c xfce4-panel -p /panels/panel-5/autohide-behavior -s 0

# Amount of time the panel appears before hiding again
sleep 5

# Hides the panel
xfconf-query -c xfce4-panel -p /panels/panel-5/autohide-behavior -s 2

How to use the ctrl+alt+left keyboard shortcut:
1. Go to Window Manager > Keyboard. Change Left workspace to some random keyboard shortcut.2. Now you can add your keyboard shortcut under Keyboard > Application Shortcuts. You can just paste the script-name.


You need to allow the local loopback interface:

sudo iptables -A INPUT -i lo -j ACCEPT

Sometimes inter-process communications takes place over the loopback interface. See here for more information about the loopback interface.

EDIT: So I have exactly this on one of my test computers:

doug@s17:~$ sudo iptables -v -x -n -L

Chain INPUT (policy DROP 0 packets, 0 bytes)
    pkts      bytes target     prot opt in     out     source               destination
      94     9843 ACCEPT     all  --  lo     *       0.0.0.0/0            0.0.0.0/0
    5093  6056565 ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            state RELATED,ESTABLISHED
       8      613 REJECT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            reject-with icmp-port-unreachable

Chain FORWARD (policy DROP 0 packets, 0 bytes)
    pkts      bytes target     prot opt in     out     source               destination
       0        0 REJECT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            reject-with icmp-port-unreachable

Chain OUTPUT (policy ACCEPT 3904 packets, 321224 bytes)
    pkts      bytes target     prot opt in     out     source               destination

Now, if I wanted to gain further insight into the rejected packets, I could also log them:

sudo iptables --insert INPUT 3 --jump LOG --log-prefix "INPUT-REJECT:" --log-level info

And then (after some more rejects) look at /var/log/syslog:

Dec 12 14:18:42 s17 kernel: [2007598.577383] INPUT-REJECT:IN=ens5 OUT= MAC=ff:ff:ff:ff:ff:ff:00:21:9b:f9:21:26:08:00 SRC=192.168.111.101 DST=255.255.255.255 LEN=42 TOS=0x00 PREC=0x00 TTL=1 ID=4970 PROTO=UDP SPT=55705 DPT=3289 LEN=22
Dec 12 14:18:42 s17 kernel: [2007598.695347] INPUT-REJECT:IN=ens5 OUT= MAC=ff:ff:ff:ff:ff:ff:00:21:9b:f9:21:26:08:00 SRC=192.168.111.101 DST=255.255.255.255 LEN=42 TOS=0x00 PREC=0x00 TTL=1 ID=4971 PROTO=UDP SPT=55708 DPT=3289 LEN=22
Dec 12 14:18:43 s17 kernel: [2007599.014201] INPUT-REJECT:IN=ens5 OUT= MAC=ff:ff:ff:ff:ff:ff:00:21:9b:f9:21:26:08:00 SRC=192.168.111.101 DST=255.255.255.255 LEN=42 TOS=0x00 PREC=0x00 TTL=1 ID=4972 PROTO=UDP SPT=55712 DPT=3289 LEN=22

And I observe that they are just broadcast packets from this computer that I am typing on now.


i found a much quicker solution! just right click on the each inbox and select properties. then under the 'general information' tab select 'rebuild index'. this took about 30 seconds and cleaned the whole thing up!

$ df -h
Filesystem            Size Used Avail Use% Mounted on
/dev/sda1             895G  120G  730G  15% /
none                  4.0G  300K  4.0G   1% /dev
none                  4.0G  1.5M  4.0G   1% /dev/shm
none                  4.0G  140K  4.0G   1% /var/run
none                  4.0G     0  4.0G   0% /var/lock
none                  4.0G     0  4.0G   0% /lib/init/rw
$ du -ch | grep [0-9]G
2.2G    ./.VirtualBox/Machines/iBike/Snapshots
2.2G    ./.VirtualBox/Machines/iBike
2.2G    ./.VirtualBox/Machines
2.2G    ./.VirtualBox
4.3G    .
4.3G    total

far out! from 667GB to less than 1GB in 30 seconds!! that was quick! :)


Add these lines at the top

if [[ ! $EUID == walkman_uid ]] ; then
    echo "this script must be run as walkman"
    exit 1
fi

If you do not know the uid of walkman, run

id walkman | awk '{print $1}'

As kati, run

sudo -u walkman /full/path/to/script

Personally I would put the script in /usr/local/bin and have it owned by root.


Why will Ubuntu no longer measure file size unit as byte, megabyte, gigabyte, etc?

Short answer is yes, the prefixes change. But it doesn't really make a difference.

Reasoning

There has always been confusion because decimal-style units like KB, MB, GB were used with binary data - KB meant 1024 bytes, not 1000 bytes as might be expected. And of course many people throughout the world use the actual decimal prefixes in their daily lives under the metric system.

Network engineers and long-time computer users of course are trained to understand the difference, but the ongoing confusion meant applications were inconsistent in their usage; one application might use MB to mean 1,000,000 bytes (using the decimal prefix), while another might mean 1,048,576 bytes (using the binary interpretation).

This led to Ubuntu eventually adopting a new units policy.

Impact

The impact is really just a display issue. File sizes and network bandwidth will be displayed using the decimal prefixes, so a 5kB file will actually be 5000 bytes. This is actually in line with what many (most?) people expect.

Memory usage and some low-level utilities will display sizes using the binary prefixes (KiB, MiB, GiB, TiB). This may cause some initial confusion but is actually better than the status quo where we have one prefix meaning two different things.

Since Windows still uses the old, ad-hoc system a Wine application might display slightly different file sizes for the same file. However I at least often see different sizes displayed anyway due to rounding methods, so I'm not convinced it's a major issue.

See also:

What file size units do applications on Ubuntu use?


Configure Kate to build and execute a project

There's a hack: activate the build plugin, set up a shortcut for it and insert an execution command in the makefile so it's built and run in the same operation.


How can I use a swap partition instead of a swap file

I found a solution:
https://ubuntuforums.org/showthread.php?t=2400322

First find the UUID of the swap partition:
sudo blkid | grep 'TYPE="swap"'

Then modify your /etc/fstab and replace /swapfile with UUID=xxx, using the UUID you got from the command above. The line that now has /swapfile must then look something like

UUID=01234567-89ab-cdef-0123-456789abcdef   none       swap    sw        0       0

The swap partition will be used after a reboot or running
sudo swapon -a


System Settings -> Application Style -> Window Decorations and click on the  icon settings for the window theme selected (in my case is Breeze). There is a tab named Shadows, you can change some values.

If after all the window shadow isn't showing, maybe you have to (re)enable Compositor, at System Settings -> Hardware -> Display and Monitor -> Compositor. For me, OpenGL 3.1 is working well for the Rendering backend .


I would advise you to leave sufficient space for Windows 7 - it grows larger and larger as you use it. It seems to me that 30 gigabytes is ideal. (larger if you intend to install some other softwares) Ubuntu doesn't really need a dedicated partition to mount /boot; if you want to make everything as simple as possible, I would suggest:

/: A fresh installation of Ubuntu 12.04 takes approximately 5 gigabytes on /, so if you are not planning to get a lot of softwares then you don't need too much space allocated for it.
/swap: The common size of this partition = 0.5 * size of the memory, but I see you have some 16 gigabytes of RAM ... Ubuntu itself doesn't produce that much stuff, so just for fun, 2~4 gigabytes.
/home: theoritically this is where you should allocate the most space (But as gajdipajti says, you do not need a seperate partition. If you do not specify this during installation then these stuff would be put onto /) . However as you're saying, you prefer to put this on your external hdd. I advise otherwise. You may allocate some 4~8 gigabytes for /home on ssd, and create symlinks to link whatever you put on your external hdd.


Cannot connect to network after upgrade to Ubuntu 14.10

Please try:

sudo apt-get purge bcmwl-kernel-source

Reboot and tell us if it's working. If not, please post another diagnostic report and I'll edit this question to propose a solution.


MaaS node deployment failing on HP Proliant DL380 G5

I recently run into this issue.
The solution is to disable cciss driver by setting MAAS global kernel parameters.
MAAS has issues when installing HP machines. This is due to old device driver cciss. This gives naming to block devices which MAAS curtin installer cannot handle. Add this to Global kernel parameters in MAAS settings. Use a better hpsa driver.
cciss.blacklist=yes modprobe.blacklist=cciss hpsa.hpsa_allow_any=1

Then release and re commision the node.


The following Makefile is not working and I am not sure what's going on

Check that you have the real tab character in front of the entry, e.g.

all:
    make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

It has to be \t, the Tab character, not merely spaces.

To verify, you can run cat -T Makefile:

$ cat -T Makefile
all:
^Iecho "foo"
foo:
^Iecho "bar"

^I indicates a tab character. Verify that all lines succeeding a target is tab-indented.


Apple magic mouse battery indicator on Ubuntu 13.10

See https://askubuntu.com/a/501024/67335.

My thinking is if you can write a shell script which gives you the information you want, then run indicator-sysmonitor and have it call your script.


By doing bit more of research, I could find fix. By executing below 3 commands, it worked.

    sudo mkdir /var/lib/plexmediaserver/Library
    chmod 777 -R /var/lib/plexmediaserver/Library
    service plexmediaserver restart


On Ubuntu 16.04, pip is installing libraries to python 2.7

I'm not a python person, but the default python in Ubuntu 16.04 is python 2.7. To use python3 you type python3.

pip applies to the default python (thus 2.7), and you use pip3 when you want to use the 'pip' for python3 (pip3 being found in package python3-pip)


I removed the libcheese, then reinstalled it, and installed xserver-xorg-lts-quantal, and then reconfigured the xserver-xorg, then the normal desktop reappeared. I am not sure what solved the problem though.


Why is my display name in Ubuntu Software Center some weird set of letters?

I have noticed the same thing on 11.04. When reviewing an application it tells me my name is "Greg Auger" (which it is) but once the review is posted it shows up as belonging to "fluteflute".

I suggest you go to launchpad.net and sign in using your Ubuntu Single Sign On details. If you clixk on your name in the top right corner of the pageyou will go to your userpage. From here click "Change Details". I'd be interested to know what yours says, mine is below:


It looks like a user soprano encrypted their home directory with the "ecryptfs" encryption scheme.

You can read about it on the Ubuntu Community Help Wiki.


Ubuntu server installation via USB drive - Failed to load preconfiguration file, after manually mounting cdrom/USB

At first please check with md5sum that your downloaded iso file is good. See this link and links from it

help.ubuntu.com/community/UbuntuHashes

You can use a tool to install the iso file into a USB drive to make it a USB boot drive. If you are running linux, you can use mkusb. If you are running Windows, you can use Win32 Disk Imager.

These are cloning tools, and the cloning method works with all current Ubuntu and Ubuntu family iso files (Kubuntu, Lubuntu ... Xubuntu including Ubuntu Server). But the target drive will be overwritten, so if you store some important files there, you had better copy them to a safer place before you start.

See the following links

help.ubuntu.com/community/mkusb

Win32 Disk Imager


"Work" tab in "Lubuntu Netbook" session is messed up

I've just installed Lubuntu on two machines, didn't have the issue.  Maybe it was a bad install?

Since this is a fresh install, I would recommend, reformatting and trying again


converting multiple png to mp4, all frames are the first image

You need to change the wildcard.

From implant%4d.png to implant%04d.png

Works for me.


Looking at my own install, the /etc/letsencrypt/archive directory has permissions 0700 which disallow even the group.  Changing this to using something like sudo chmod 0750 /etc/letsencrypt/archive should do what you want.


Ubuntu 18.04.1 LTS has missing icons for system apps such as "Software Updater" and "Calculator"

I've been installing various software throughout the day and it appears as though all icons except for "System Monitor" now have been fixed.

I have no idea how but directly after installing Stacer, they all popped back one-by-one as I clicked on them.

Regards,

The Gent


Installed Cyrus / tls_sessions.db not created / process not running

You have to create this file and give it permissions for the cyrus user:

# touch /var/lib/cyrus/tls_sessions.db
# chown cyrus:mail tls_sessions.db

Check the other files in /var/lib/cyrus so the owner and group are the same as in the new file. Mine are cyrus,mail and I guess yours will be the same.

Then restart the service and it should work.

Hope it helps.


If you have sudo set to NOPASSWD for your user, then you can create a desktop icon containing this text:

#!/bin/bash
sudo shutdown -r now

chmod +x ~/desktop/yourfile and it will do this task for you.


Unable to connect to wireless adhoc/hotspot with Ubuntu 11.10

Try this:
Go to network connections -> Wireless
choose the network you want to connect
select edit->ipv6-settings->ignore

A technical note:
 We can use our wifi adapter (NIC) in four modes: managed, monitor, ad-hoc and Access Point(master).

Managed: It is the default mode. It helps us to connect to access points only. So if you are connected to AP it means your card is in managed mode.

Monitor: In this mode you don't connect to any of the networks but simply catch the packets in air. Usually used for hacking wifi passwords.

Ad-hoc: It is like a P2P connection. If two machines are connected via an ad-hoc connection both the machines should be in ad-hoc mode , using managed mode you can't connect to an ad-hoc but only access point.

Access Point: In this your card behaves like a router/access point. You need HostAP daemon to create an AP.

Now, if you can't create an ad-hoc connection this means your driver does not support ad-hoc mode and hence you can't connect to an ad-hoc network. But you should always be able to connect to an AP.


Cannot update Ubuntu due to broken package

that is because both you are running it without sudo, and the previous package operation failed and has thus not released its hold on the installation directory. Reboot and run "sudo apt-get -f install"


Try sudo apt-get install pavucontrol and see if the sound comes back when you toggle the configurations.


xterm in bash stops script from executing

If you want your script to run a command and then continue executing, you need to tun the command in the background (&, see https://unix.stackexchange.com/a/159514/22222). So, change your script to:

#!/bin/bash

xterm -e 'sh -c "$HOME/TEST/FirstAPP --test;"' &
## script opens the xterm and stops until I press CTRL+C
while true; do
....

That will launch the xterm command in the background, keeping the terminal open and FirstAPP running, and will then continue onto the other lines of your script.

The reason it worked with gnome-terminal is because when you run gnome-terminal, it apparently forks itself and returns control to the shell you launched it from. You can see this with strace:

$ strace -e clone gnome-terminal
clone(child_stack=0x7fef6e44db30, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fef6e44e9d0, tls=0x7fef6e44e700, child_tidptr=0x7fef6e44e9d0) = 9534
clone(child_stack=0x7fef6dc4cb30, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fef6dc4d9d0, tls=0x7fef6dc4d700, child_tidptr=0x7fef6dc4d9d0) = 9535
# watch_fast: "/org/gnome/terminal/legacy/" (establishing: 0, active: 0)
clone(child_stack=0x7fef6d391b30, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fef6d3929d0, tls=0x7fef6d392700, child_tidptr=0x7fef6d3929d0) = 9540
# unwatch_fast: "/org/gnome/terminal/legacy/" (active: 0, establishing: 1)
# watch_established: "/org/gnome/terminal/legacy/" (establishing: 0)
+++ exited with 0 +++

Note the calls to clone which, as explained in man clone does:

   clone() creates a new process, in a manner similar to fork(2).

So, unlike most programs, gnome-terminal will make a clone of itself when launched. The normal way of launching something and then continuing with something else is to use & to launch it in the background.


Enabling hardware acceleration for windows 10 VM in qemu 2.11 on 18.04

Currently there are not drivers for Windows that support Virgl and 3D acceleration and OpenGL.  I resolved this by purchasing an inexpensive PCIE GPU to directly pass through to the VM to be able to have 3D acceleration and OpenGL on my VM.  Details on how I did this are listed in this post.


Wireless internet doesn't work Broadcom Corporation Device [14e4:43ae]

This device is not supported by the proprietary Broadcom driver bcmwl-kernel-source form Ubuntu repository.

You can try the latest Broadcom driver that can be installed by

sudo apt purge bcmwl-kernel-source
sudo apt install broadcom-sta-dkms

If this driver still does not support your adapter, then there is no way to get it work now.


Remove Windows Network in "Browse Network" on Ubuntu Mate 18.04 LTS

You can't change this behavior by removing packages, as it is non-conditionally programmed.

See relevant source code fragment.

This is a legacy of Nautilus.


how to have access to make a file executable?

If you're doing this through a GUI, the executable option is usually a checkbox below the permissions dropdown. Alternatively, you can do this through the command line by running chmod +x filename, where filename is the name of the file that needs to have the executable bit set.


Tips for getting to grips with the command line

If you are looking for a good guide to learn the command line, my favorite is LinuxCommand.org

The guide will show you the basics of the command line, and will even guide you into writing useful shell scripts.

That said, most user will not need to use the command line for most day to day operations. I do not think that the command line should discourage users from migrating to Ubuntu. But once you learn the power of the command line, you won't be able to live without it!


Capture and compile a list of names from a log file

You need just:

awk -F'/' '/elv/ && !seen[$5]++ {print $5}' infile

This prints the fifth field per slash / as the field separator, if it's not previously set in the array named seen as well as the line should contain elv. See also How does awk '!a[$0]++' work? and this answer on Stack Overflow.

For the given sample, the output would be:

TITAN
DELTA
ATLAS_CENTAUR


Cannot make a screenshot using Print-key on Gnome 3.10

The screenshot should automatically save to the ~/Pictures folder:

You can get the prompt to save or copy the screenshot (right) by using the 'Screenshot' dialogue (search in the overview for screenshot, or run gnome-screenshot --interactive). This also enables you to include options such as whether to include the mouse pointer etc.

You can also set in Keyboard settings what commands can be used for Screenshots - so you for instance to screenshot copy to clipboard by using Ctrl+Print Screen (or whatever is set in the settings):

If you want to have the screenshot dialogue open, add you can add a custom keyboard shortcut to launch gnome-screenshot --interactive - I use Super+Print Screen:


For your current setup i would recommend you install Xubuntu after you upgrade the RAM to 1GiB you can go for Ubuntu 13.10 with gnome 3 gnome-session-fallback (no effects), it should run ok.

I hope this is helpful, good luck and welcome to the community.


Dummy output using 82801JI (ICH10 Family) HD Audio Controller

Default sound drivers to original setup

Run sudo apt-get install --reinstall linux-image-$(uname -r)

Setup surround

Edit alsa-base.conf with gksudo gedit /etc/modprobe.d/alsa-base.conf
Add to bottom, options snd-hda-intel model=auto
Restart computer
Open the console and run alsamixer and turn up audio on all and set
channels to 6.


Where do I enter PPOE user and password over ethernet connection?

I was supposed to select DSL for ppoe over ethernet cable and with my provider it didn't connect unless I cleared the [service] name box next to user/password.


Can you apply noatime on ext3 partitions at realtime?

You can use the command you proposed while the system is running, for security reasons I would do it during the night or when the application is not in use.
The command mount return, among other lines, somthing like this

/dev/sda5 on / type ext4 (rw,errors=remount-ro,data=writeback)

then if you issue the command you proposed

mount -o remount,noatime /

the output of the command mount looks like this

/dev/sda5 on / type ext4 (rw,noatime,errors=remount-ro,data=writeback)

showing that the option was added correctly.
Hope I helped you!


ssh+sudo+dump on server cannot be restored locally

I asked about the "why are \r's inserted" bit at https://unix.stackexchange.com/q/633543/4869 where it was quickly pointed out that this is a feature of the pseudo-tty allocated with -t which then needs to be turned off again.  See that question for details.


Root partition is full. No unallocated space. Home partition almost empty. Resize?

You will have to move the home partition to the back end of the free space - to the right. Then you can expand root into the now free space.


Dual boot write permission problem "destination is read only"

In Windows 10 if fast boot is activated this the problem could arise
Solution 1:
You can fully shutdown your Windows 10 operating system then boot to Ubuntu.
To fully shutdown your Windows 10 Press and Hold Shift Key and Click on Shutdown menu
Solution 2:
Your can turn off Windows 10's fast boot or Hibernation by following below steps

Press the Windows button on the keyboard to open Start menu
Now write cmd in search box
In search result list, right click on Command Prompt and Click on Run As Administrator
Now type powercfg.exe /hibernate off and press Enter.
Shutdown Windows 10 Operating System
Boot to Ubuntu (Hope your problem will be fixed).


VLC can open iso files without them mounted.But why do you want to play a mounted image, instead of an iso directly ? If you cannot open them from open dialog just issue: vlc /path/to/file.iso in a console.


Get recipe inredients:

sudo apt-get install xautolock slock

xautolock - executes a locker after a period of inactivity.
slock - locks the screen wit a black only UI, type password and hit Enter.

try the command to lock the session first and see if you like it:

slock

This can be hooked into Awesome menu by modifying it's config:

# make awesome config dir:
mkdir -p ~/.config/awesome

# copy default config file to your home folder:
cp /etc/xdg/awesome/rc.lua ~/.config/awesome

# edit the custom config:
nano ~/.config/awesome/rc.lua

Find where the mymainmenu is being built and adjust it. My section now looks like this (note the "Lock" line):

lockscreen = function() awful.util.spawn("slock") end

mymainmenu = awful.menu({ items = {
            { "Lock", lockscreen },
            { "Awesome", myawesomemenu, beautiful.awesome_icon },
            { "Debian", debian.menu.Debian_menu.Debian },
            { "Guest", terminal .. " -e /usr/bin/dm-tool switch-to-guest" },
            { "Greet", terminal .. " -e /usr/bin/dm-tool switch-to-greeter" },
            { "Logout", awesome.quit },
         }
      })

And make a Meta+Escape shortcut for it too. Originally Escape is bound to tag history. I don't use that feature though.

-- it was:
--    awful.key({ modkey,           }, "Escape", awful.tag.history.restore),
    awful.key({ modkey,           }, "Escape", lockscreen               ),

Then comes the automatic locking. I created an executable file to make sure that xautolock only executes once per session:

# make a bin folder if not present:
mkdir -p ~/bin/

# make the file, set permissions and edit:
touch ~/bin/session-daemon
chmod ug+x ~/bin/session-daemon
nano ~/bin/session-daemon

I used an environment variable "XDG_SEAT" which is set by the DM to distinguish sessions and store a PID and log of the command. It is only executed if not running already:

#!/bin/bash

if [ "$#" == "0" ] ;
then
    echo "Session daemon missing command" >&2
    echo "USAGE: $0 command [args...]"
    echo "Executes given command with args only once per XDG seat (session)."
    echo "Keeps PID and log of the executed command."
    exit 1
fi

COMMAND=$1
shift

NAME="${COMMAND##*/}"
PIDFILE=~/.cache/session-daemon/$NAME-$XDG_SEAT.pid
LOGFILE=~/.cache/session-daemon/$NAME-$XDG_SEAT.log
PID=""
PIDDIR="${PIDFILE%/*}"
LOGDIR="${LOGFILE%/*}"

mkdir -p $PIDDIR
if [ $? -ne 0 ];
then
    echo "Session daemon PIDDIR not there: $PIDDIR" >&2
    exit 2
fi

mkdir -p $LOGDIR
if [ $? -ne 0 ];
then
    echo "Session daemon LOGDIR not there: $LOGDIR" >&2
    exit 2
fi

if [ -e "$PIDFILE" ] ;
then
    echo "Session daemon '$NAME' PIDFILE found: $PIDFILE"
    PID=`cat "$PIDFILE"`
    echo "Session daemon '$NAME' PID found: $PID"
else
    echo "Session daemon '$NAME' PIDFILE NOT found: $PIDFILE"
fi

if [ "$PID" ] && kill -0 "$PID" 2>/dev/null ;
then
    echo "Session daemon '$NAME' was already running with PID $PID" >&2
    exit 3
fi

echo "Session daemon running $COMMAND $* > $LOGFILE 2>&1"
$COMMAND $* > "$LOGFILE" 2>&1 &
PID=$!
ERR=$?
sleep 1

if [ "$PID" ] && [  $ERR == 0 ] && kill -0 "$PID" 2>/dev/null;
then
    echo -n $PID > "$PIDFILE"
    echo "Session daemon '$NAME' started with PID $PID"
else
    echo "Session daemon '$NAME' did not start or finished early. PID: $PID, ERR: $ERR" >&2
    cat "$LOGFILE" >&2
    exit 4
fi

That session-daemon script will be used by the xautolock-session:

# make the file, set permissions and edit:
touch ~/bin/xautolock-session
chmod ug+x ~/bin/xautolock-session
nano ~/bin/xautolock-session

xautolock-session content:

#!/bin/bash

session-daemon xautolock -locker slock -time 5 -detectsleep -secure -corners "-00+"

That will be executed by Awesome on restart. Edit the Awesome config again:

nano ~/.config/awesome/rc.lua

And add this line at the bottom:

awful.util.spawn_with_shell("~/bin/xautolock-session")

Now when you log out and in again, your session will be automatically locked after 5 minutes.

Note: We could use dm-tool lock, too, but there's a freaky bug that actually breaks the whole idea: Lock can be circumvented by switching to console


Rear/Front Mic not shown on Sound manager

This is a bug with unity desktop, if you use gnome shell it will show you the hardware options on sound manager and then select duplexStereo or duplex+whateverSurround


Error deleting file: Unable to find or create wastebasket directory (Ubuntu 15.04)

The solution was simple, in my case running the command

ls -ld ~/.local/share/Trash/

Gave the output:

drwx------ 4 root root 4096 Jun 13 20:19 /home/user/.local/share/Trash/

For some reason unknown to me, the trash directory was owned by root, which is not what we want. So I ran:

sudo chown -R user:user ~/.local/share/Trash/

which solved the problem.

Also, the permissions may be incorrect, so run

sudo chmod -R 700 ~/.local/share/Trash/


Ubuntu 12.04 grub install fails, installing to wrong device

The OP solved the problem and gave the solution in a comment:

  Resolved. I was unaware you could choose "no" to not install the grub
  bootloader on the default screen. It then takes you to a screen that
  lets you choose which device to install it too. I simply choose
  "/dev/sde" and everything is working great! This option should be more
  noticeable.


lightdm change badge icon login for "ubuntu on wayland"

Okay, I've been lucky with several renaming attempts. The file must be called:
/usr/share/unity-greeter/custom_ubuntu-wayland_badge.png


I don't have one of these yet, but my understanding is that dimming it completely should simply leave the black and white e-ink display.

Did you buy the display separately?  If so which laptop did you put it in?  Or, did you in fact buy the sunbook?

Anyway, perhaps you are actually changing the contrast instead of brightness.  My suggestion would be to run the following command in a terminal:

find /sys -name "bright*"

This should return a few files, including something like
/sys/devices/pci0000:00/0000:00:03.0/0000:01:00.0/backlight/acpi_video0/brightness. If you read the file (cat /sys/devices/pci0000:00/0000:00:03.0/0000:01:00.0/backlight/acpi_video0/brightness) it should give the current brightness (mine says '8'), and you can turn brightness completely off by doing:

echo 0 | sudo tee -a /sys/devices/pci0000:00/0000:00:03.0/0000:01:00.0/backlight/acpi_video0/brightness

Then obviously you can reset it by doing:

echo 8 | sudo tee -a /sys/devices/pci0000:00/0000:00:03.0/0000:01:00.0/backlight/acpi_video0/brightness

Hopefully that will get you what you want.  Please keep us informed.  I'm very interested in getting something like this myself :)


Telnet with Arduino & WiFi shield: connection refused

Apparently the solution is the firmwareupdate since Arduino ships the WiFi chips with software from before 2012.
Now it works.


dpkg: error processing package mail-stack-delivery

I don't know that the following is the answer, I somewhat randomly arrived at this "solution" with help from the linux chat room on freenode IRC (thanks Jim and peetaur2):

thufir@mordor:~$
thufir@mordor:~$ sudo mkdir /etc/postfix /etc/dovecot/ /etc/dovecot/private/ /etc/dovecot/conf.d/
thufir@mordor:~$
thufir@mordor:~$ sudo apt-get install mail-stack-delivery
Reading package lists... Done
Building dependency tree
Reading state information... Done
mail-stack-delivery is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 145 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Setting up mail-stack-delivery (1:2.2.18-2ubuntu2) ...
grep: /etc/dovecot/conf.d/10-ssl.conf: No such file or directory
grep: /etc/dovecot/conf.d/10-ssl.conf: No such file or directory

Postfix not configured. Run
sudo dpkg-reconfigure postfix and choose
the type of mail server. Then run
sudo dpkg-reconfigure mail-stack-delivery to
finish mail-stack-delivery installation.

thufir@mordor:~$
thufir@mordor:~$ sudo dpkg-reconfigure mail-stack-delivery
grep: /etc/dovecot/conf.d/10-ssl.conf: No such file or directory
grep: /etc/dovecot/conf.d/10-ssl.conf: No such file or directory

Postfix not configured. Run
sudo dpkg-reconfigure postfix and choose
the type of mail server. Then run
sudo dpkg-reconfigure mail-stack-delivery to
finish mail-stack-delivery installation.

thufir@mordor:~$ sudo dpkg-reconfigure postfix
setting synchronous mail queue updates: true
Creating /etc/postfix/dynamicmaps.cf
Adding tcp map entry to /etc/postfix/dynamicmaps.cf
Adding sqlite map entry to /etc/postfix/dynamicmaps.cf
setting myhostname: mordor.bounceme.net
setting alias maps
setting alias database
setting myorigin
setting destinations: mordor.bounceme.net, localhost.bounceme.net, localhost
setting relayhost:
setting mynetworks: 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
setting mailbox_size_limit: 0
setting recipient_delimiter: +
setting inet_interfaces: loopback-only
setting default_transport: error
setting relay_transport: error
setting inet_protocols: all
WARNING: /etc/aliases exists, but does not have a root alias.

Postfix is now set up with a default configuration.  If you need to make
changes, edit
/etc/postfix/main.cf (and others) as needed.  To view Postfix configuration
values, see postconf(1).

After modifying main.cf, be sure to run '/etc/init.d/postfix reload'.

Running newaliases
Processing triggers for libc-bin (2.21-0ubuntu4) ...
thufir@mordor:~$
thufir@mordor:~$ sudo dpkg-reconfigure mail-stack-delivery
grep: /etc/dovecot/conf.d/10-ssl.conf: No such file or directory
grep: /etc/dovecot/conf.d/10-ssl.conf: No such file or directory
Mail stack delivery changes some postfix settings.
Old values are stored in /var/backups/mail-stack-delivery/main.cf-backup.
Feel free to revert any of them when the process is done.
Configuring postfix for mail-stack-delivery integration: .................... done.
thufir@mordor:~$
thufir@mordor:~$
thufir@mordor:~$ sudo dpkg --configure -a
thufir@mordor:~$

It's highly likely that something else broke the loop and allowed dpk and apt to run without error.

how can I fully purge this package, and all config?

useful CLI command I learned today:  update-manager to bring up the apt GUI.


Accidentally formatted partition, want to recover files

you can set up your grub boot loader to start with defined OS.if you cannot do it,start computer with live CD and find grub boot loader file.edit that.it is impossible to recover back datas in formatted part.I suggest Remastersys to backup your OS clone as iso file perodicly.Anyway God help you man! I wish you did not have important files in that formatted part :)


How do Ubuntu flavors compare regarding resource consumption and performance?

There is a resource usage I made a couple of days ago which I mentioned in one of your posts, in a graph it would look like this:

The source for both graphs is from What is the difference between Ubuntu and its derivatives? and as mentioned in there, they should be taken lightly, because they can vary. While I was doing the tests I noticed the following:

For all cases if the maximum amount of RAM was lowered, their general RAM usage was also lower. For example, Lubuntu in a computer with 4 GB of RAM would use 165 MB of RAM. But if you took out 2 GB of RAM and only left 2 GB in total, it would use 125 MB of RAM. If I again took 1 GB out, leaving only 1 GB, it would use around 100 MB of RAM. So the normal RAM usage can vary depending on the amount of total RAM.
All Distributions adapt to their hardware. Which that said, if you have a low spec CPU, the usage might be more than the graph. If you have a more powerful CPU, they usage could be lower than the graph for that particular distribution. The same can be said about RAM. It should be noted that Linux tries to use as much resources as possible to have the most optimum system available. Not used RAM is wasted RAM. This type of thinking is NOT to be confused on how Windows uses RAM. Both use that extra RAM in different ways.
The values in the graphs can vary between hardware differences, distribution versions, desktop versions, updates and more. This are just to give the end user an idea on how they compare in one particular case scenario.

For FPS (Video Performance) I would seek Phoronix March 2014 Desktop Performance

If we grab the general FPS score for all FPS benchmark tests conducted there we would get the following graph:

But again, this type of benchmark can change a lot if we take into consideration the type of graphics card, driver version, distribution version, desktop version, etc..

For graphics requirements, they all don't ask for much, even KDE, Unity and Gnome, but you should have at least a video card that supports OpenGL 2.0+ (Right now, almost all do). If you want to measure how the desktops influence the FPS performance when using the Desktop interface, I could put this way:

Heavy Desktops - KDE
Intermediate Desktops - Unity, Gnome
Lightweight Desktops - Xfce, LXDE, OpenBox

The data shown in Flexion, I feel is very accurate and gives an idea of the memory usage (Not CPU)

| Desktop Environment  | Memory Used |
| ---------------------|------------:|
| Enlightenment 0.18.8 |    83.8 MiB |
| LXDE 0.5.5           |    87.0 MiB |
| XFCE 4.10.2          |   110.0 MiB |
| LXQt 0.7.0           |   113.0 MiB |
| MATE 1.8.1           |   123.0 MiB |
| Cinnamon 2.2.13      |   176.3 MiB |
| GNOME3 3.12.2        |   245.3 MiB |
| KDE 4.13.1           |   302.6 MiB |
| Unity 7.2.0.14       |   312.5 MiB |

Now, to be fair, all Desktops from the time they were benchmarked have received numerous updates in regards to their rendering. That is why Phoronix made another FPS Benchmark in which we can see some improvements. The final result was that, at least for Unity, it gained around 10% better framerate in cases like the Xonotic 0.7 (1920x1080) where it went from 112 (Low Benchmark) & 42 (High Benchmark) to 120 (Low Benchmark) & 63 (High Benchmark).

For menu speed, this does not vary much on all distributions. It can be quicker on Unity (Using Dash) if you disable the Online Search in the Security & Privacy option in the System Settings.

Final Thoughts:

When doing all of this tests, I found out more than I thought I would. For instance, I was really not expecting KDE to use that low amount of resources. I thought it would take like 1 GB of RAM. Another thing I found out was how quickly Lubuntu and Xubuntu were it terms of booting and using the whole system. of course, a almost common fact remains, the less resources a distribution uses, the less options you will have.

So a user of Kubuntu or Ubuntu can enjoy several features like Samba sharing, easier printing configuration and many other features but an OpenBox or LXDE user would have it more difficult or would take longer to achieve the same objectives (Like sharing a folder).

If you wish to see CPU/RAM specific usage for the cases mentioned here I invite you to read What is the difference between Ubuntu and its derivatives? which shows how each distribution behaved under different loads, apart from other information.


This random disconnection could be a MTU issue - you should discuss this with your school network maintainer.

Possibly your MTU size could be 1500 or may be 1432 or some-other value your network maintainer should be able to tell you.

Normally "Automatic" is enough to establish a connection - maybe in this specific case you need a definitive value.

Look to change the MTU value in Network Manager - Edit Connections

i.e.


How to change icon of an webapp created with Chromium?

The easiest way to do this is downloading a picture (preferably .png format with at least 96x96 pixel) and then right-clicking on the application link.
Go to properties and click on the icon shown on the left-hand side of the properties dialog.
You can now choose a picture.
Point to the location you have saved the picture you want to use at (for example Downloads) and then just select the image file you'd like to use.


Yes, indeed there were residual files on my server. I had run the following commands to completely remove any references to anaconda2.

$ rm -rf ~/anaconda2
$ rm -rf ~/anaconda_backup
$ rm -rf ~/.condarc ~/.conda ~/.continuum


cmake-curses-gui depends on cmake (= 2.8.7-0ubuntu4) for a precise installation.

If you're unable to install this particular version it means that you installed a different version on your system.

Try first to uninstall cmake:

sudo apt-get remove cmake

And install again cmake-curses-gui:

sudo apt-get install cmake-curses-gui

If it doesn't work check if you're not pulling a different version of cmake from a ppa.


Laptop camera (/dev/video) not there after suspend - reboot needed to get it back

Suspend/wake events are handled by the pm-utils package. See my answer Why is wireless down/strange after switching to battery or closing/opening the lid?, but change "wireless" to "video" or "camera", as needed.


It looks suspiciously similar to the AppArmor bug they had recently:

https://github.com/dotcloud/docker/issues/5082

Perhaps check /var/log/messages for any apparmor messages e.g.

cat /var/log/messages | grep -i apparmor | tail


You have two problems:

Globbing interferes with your regexp
Your regexp doesn't match what is should match

Uncovering the globbing mechanism

sudo find /dev | grep sd* doesn't work as before because you have a file or a folder in your current working directory which triggers the globbing from bash. Add a echo in front of your command to see what globbing does to your command

echo grep sd*

By adding a random additional character, globbing didn't match the file/folder anymore and grep continued to work as expected.

How to prevent globbing

To prevent globbing from kicking in, you have to put '...' around your term.  (Double quotes will work also.) This will make grep behave as before:

sudo find /dev | grep 'sd*'

How regular expressions work

Now that the regexp is working as expected let's look at what * means in regular expressions as opposed to file globbing.  In short it means "This last character zero or n-times" and this is most probably not what you want.  Using 'sd*' you might see /dev/stdout in the output, since stdout starts with an s followed by zero or more d's.

In your case a simple:

sudo find /dev | grep sd

should be all you need to match.

Or, of course, you could just run one of the following commands (which use file glob patterns, not regular expressions) to give you the same output:

find /dev -name 'sd*'
ls -1 /dev/sd*


Nautilus wants a password when I try connecting to a public Windows share

Last time I checked (some months ago), I explicitly had to add a permission for "Guest" to the Windows 7 share (Advanced Sharing > Permissions) to allow password-free connections. "Everyone" alone didn't work for whatever reason. Maybe this has changed in the meantime, but it's worth a try.


Short Answer

To answer the question directly:

  Where is the configuration file for terminal keybindings?

In my case (Ubuntu 16.04 with bash), Serge's answer is useful. (Though I'm not quite sure that it is complete in covering all key bindings that might conflict, which is why I'm writing this longer answer.) Bash configures keybindings in these files:

default key-bindings: /etc/inputrc
custom key-bindings: ~/.inputrc

Long Answer

In this section, I would like to be a bit more comprehensive. While bash and readline affect key bindings, they are other processes involved. For example, how does ALT-2 get bound to TTY #2?

Overview

As an overview, here are the pieces involved on my Ubuntu Server 16.04 machine. I start with systemd, Ubuntu's current init system.

systemd starts systemd_logind.
systemd_logind starts TTY1 with login.
login starts bash.
bash uses the readline library.
bash runs ~/.bashrc which ultimately starts byobu
byobu, on my system, uses tmux as a back-end

(Note: systemd is used in Ubuntu 15.04 and 16.04. Upstart was the init system for Ubuntu 6.10 to 15.10, according to https://en.wikipedia.org/wiki/Ubuntu_version_history.)

Practically speaking, the following components trap some keypresses:

systemd-logind (traps ALT-1, ALT-2 etc).
login
bash using the readline library
tmux
byobu
the TTY (TODO: I don't know if this is a part of systemd or login?)

systemd-logind

For Ubuntu 16.04, systemd-logind is where user logins start. According to the Ubuntu man page for systemd-logind .

  systemd-logind is a system service that manages user logins. It is responsible for:

  Keeping track of users and sessions, their processes and their idle state
  Providing PolicyKit-based access for users to operations such as system shutdown or sleep
  Implementing a shutdown/sleep inhibition logic for applications
  Handling of power/sleep hardware keys
  Multi-seat management
  Session switch management
  Device access management for users
  Automatic spawning of text logins (gettys) on virtual console activation and user runtime directory management

See also the man page for logind.conf. I didn't see any mention there of terminal keybindings.

TTY / keyboard configuration

Related links about TTY / keyboard configuration:

https://wiki.debian.org/Keyboard
https://help.ubuntu.com/community/Custom%20keyboard%20layout%20definitions
Changing TTY keyboard layout on a server?

Tools for TTY / keyboard layouts:

https://github.com/simos/keyboardlayouteditor

bash (with the readline library)

The gnu.org bash reference has nice documentation about bash and readline functions.

These configuration files affect key bindings:

default key-bindings: /etc/inputrc
custom key-bindings: ~/.inputrc

tmux

tmux key bindings are described here: https://wiki.archlinux.org/index.php/Tmux#Key_bindings

  A user-specific configuration file should be located at ~/.tmux.conf, while a global configuration file should be located at /etc/tmux.conf.

byobu

Byobu has default key bindings which can be user defined in /usr/share/byobu/keybindings/.

Work In Progress

Note: this answer is a work-in-progress. There may be mistakes. (I find it easier to state what seems to be true based on my reading and reasoning, and correct it if it is wrong.) I will update this and remove this notice when it is closer to completion.


How do I configure ssh to ask me for my password in the terminal instead of in a dialog box?

I recently started seeing the same behaviour (for years it asked in the terminal).
I think it turns out that having a id_rsa.pub in your ~/.ssh directory is what triggers the behaviour.
I recently put it in there so that i could ssh-copy-id to one of my other servers.
You could work around the issue by storing your public key elsewhere.


Is Ubuntu16.04 LTS compatible with HP Pavillion dv6 i7

I have HP Pavillion laptop since 2011 and I have used Xubuntu 12.04, 14.04 and 16.04 LTS versions without any problem except suspending in 16.04. It just started after upgrading 16.04 (fresh install) and I believe that I'm one of the victim of this bug. Unfortunately it seems community won't fix it. This is my laptop:

These are fundamental hw of the device:

HP Pavilion dv6 Notebook PC (A7N36EA#AB8)
HM65 Express Chipset
Intel i7 2670QM @2.2Ghz
16GB DDR3 1333Mhz memory
512GB OCZ Vector SSD
AMD 7690M XT Graphics Card
AR9485 Wireless Network Adapter
FL1009 USB 3.0 Host Controller

I do not have any idea about the resource consumption of Ubuntu's itself but it is pretty low and running lightning fast with Xubuntu (I personally do not prefer fancy graphics, boom boom effects etc.). You can see fresh boot statistics below (mail client, remote desktop application, virtual device manager and some other applications have opened in boot up)

As you can see, even running around 10 startup applications in background, resource consumption is pretty low on Xubuntu. Using it daily and for long hours (12 to 18 hours per day) and putting fair amount of stress on many of hw everyday.

PS.:
Currently I do not have any OS installed than Xubuntu. However I got a problem while installing proprietary AMD drivers when I had Windows and Xubuntu dual boot back in 2014 (Xubuntu 14.04). I have removed and reinstalled Xubuntu around 3 times but I couldn't make the drivers work. I do not know what has caused the problem but it just disappeared when I removed Windows.


How to install some .deb packages from cache with apt?

To create a personal repository
Install dpkg-dev, type in a terminal
 sudo apt-get update
 sudo apt-get install dpkg-dev

Create the Script to update your packages directory
It's a simple three liner:
 #! /bin/bash
 cd /var/cache/apt
 dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz

Cut and paste the above into gedit, and save it as update-debs in /bin.
Next, make the script executable:
 sudo chmod u+x /bin/update-debs

How the script works:
dpkg-scanpackages looks at all the packages in /var/cache/apt, and the output is compressed and written to a file Packages.gz, that apt-get update can read
Edited: =========================================================
Create a Ubuntu configuration file for the repository
sudo touch /etc/apt/sources.list.d/mysources.list

Edit the empty file and add this line:
sudo nano /etc/apt/sources.list.d/mysources.list

And add this line:
deb [trusted=yes] file:/var/cache/apt ./

And you're done.
Whenever you put a new deb in the /var/cache/apt directory, run
sudo update-debs
sudo apt-get update

Now your local packages can be manipulated with Synaptic, aptitude and the apt commands: apt-get, apt-cache, etc.


Removing "quiet splash" options from kernel command line, obtained modifying /etc/default/grub and executing sudo update-grub, should make you see booting messages.

The console switches to hires mode after start of upstart job console-setup.


When you go to software updates, click settings then the drives tap, if there are more then 1 option, choose the one you prefer, preferably the one with Nvidia or AMD


Should Ubuntu or Fedora be installed first for dual boot?

Install Ubuntu last so that Ubuntu uses its own Grub bootloader. The Fedora Project releases a new version of Fedora approximately every 6 months and provides updated packages to these releases for approximately 13 months, while Ubuntu LTS releases are supported for 5 years, so the OS with the longer term of support should be installed last in order for it to use its own bootloader. The Ubuntu installer prompts you to select a computer name and so does the Fedora installer, so there can be different computer names for each of the two OSs in the dual boot and which computer name is used depends on which OS is running.


Accidentally removed binutils linker (/usr/bin/ld)

ld is the linker --- it is in package binutilus. You can find it using

[romano:~] % apt-file search -F /usr/bin/ld
binutils: /usr/bin/ld

You can reinstall it by

sudo apt-get install --reinstall binutils


.xsession file to open chromium-browser only

The .xsession file is a simple shell-script.
.xinitrc:

#!/bin/sh
/usr/bin/chromium-browser

May be, you needs special arguments (fullscreen mode, url to open etc.)

See man chromium-browser.
There will be no window-decorations, because no window-manager is running.


Correct instructions for installing MathGeoLib with CMake

The distribution appears to use the cmake build system. A suitable minimal out-of-tree build procedure would be something like

mkdir Build && cd Build
cmake ..

Then

make
sudo make install


How to make this "svngrep" alias work on ".bash_aliases"?

$1 does not work in an alias. You need to define a function for that, for example in your .bashrc file.

function svngrep { grep -R --exclude-dir=".svn" "$@" . ; }

This should do the trick! However, make sure that your old alias is not around before trying it out from the command line:

unalias svngrep
function svngrep { grep -R --exclude-dir=".svn" "$@" . ; }
svngrep "teststring"

Quoting bash manual:

  There  is  no  mechanism  for  using  arguments  in the replacement text.  If arguments are needed, a shell function should be used (...) For almost every purpose, aliases are superseded by shell functions.


Permissions error on Sophos on Ubuntu Studio 16.04

You need to install it in the default directory, which would be /opt/sophos-av/. I came across the same issue after trying to install it on a different partition.


Cannot open gnome-control-center in ubuntu 18.04

Was able to fix the issue by removing Pop!_OS PPA and reinstalling gnome-control-center.
sudo add-apt-repository --remove ppa:system76/pop
Then reinstall gnome-control-center:
sudo apt install --reinstall gnome-control-center
I'm on Ubuntu 18.04 too. What happened to mine is that I installed pop-theme via terminal so I added Pop!_OS repositories and that broke my Settings app somehow. Reinstalling gnome-control-center just grabs it from System76 so we have to remove their PPA so we can grab the one from Ubuntu.
If that did not work, you might have to remove pop-upgrade too before reinstalling gnome-control-center.
sudo apt remove --purge pop-upgrade && sudo apt autoremove


Do I need to log in to an Ubuntu system as root to make a complete backup?

Complete backup - cloning the whole drive

A complete backup can be achieved by cloning the whole drive. You do that with Clonezilla, booted from a CD disk or USB pendrive.

either create a cloned copy on a third drive of at least the same size as the original one,

or better: create a Clonezilla image, which is a directory containing several files where the big ones are compressed.

Backup all your personal files

You can run backup systems, that backup all your personal files more or less automatically with or without root permissions (like suggested by @Panther). See this link,

help.ubuntu.com/community/BackupYourSystem

It is possible to

configure the backup system to backup the directories and files, that you think are most important to backup,
you can select incremental backup
you can select compression or no compression
you can configure when (and how often) you want to run your backup system.

depending on the backup tool that you select.


Touchpad not working on Lenovo Yoga Slim 7 15IMH05

Try using the latest (or a newer) kernel from https://kernel.ubuntu.com/~kernel-ppa/mainline/ (5.10.4 today).


This article suggests not to, but if nonetheless you wish to install AV software, ClamTK downloadable from the Ubuntu Software Centre will provide some peace of mind.

Alternatively as described here you can open a terminal and type:

sudo apt-get install clamtk

or load it through Synaptic Package Manager.


What about Teamviewer? It has a free version for Linux and Windows, which has basic functions such as allowing interaction with one another’s desktop, and you may make voice calls.


14.04 fresh install keyboard and mouse not working on reboot

Hmmm... some other ideas. drop to the command line during a rescue boot. Make sure you are root or can sudo to get admin privileges. Use chroot so that you can change your path perspective. Makes it appear to the system that you booted normally so that you can use the system as if you hadn't booted in using a rescue stick.  Source your user profile if you have to. Next you need to check the difference between what is installed and what has been loaded into memory but not installed.

lsusb -v | less

Use the above command to review what USB devices are actually loaded. Remember the USB devices we are looking for were loaded but they are probably not installed onto your drive because they were on the stick you booted with.

K, if you can figure out the device or devices, the next trick is to figure out what package they belong to and install it. To some degree, you may be on your own in this regards as what you are looking for is a clue that I can't find for you. Here is what my keyboard device info looks like. Note the term "Human Interface Device". That usually indicates a keyboard or mouse. Also, I know the company that makes it is ROCCAT.  Also note the ID which is 1e7d:3264 Your ID is probably what you can use to track the package down which contains the drivers you need. :

Bus 003 Device 008: ID 1e7d:3264 ROCCAT Device Descriptor:
  bLength 18
  bDescriptorType 1
  bcdUSB 2.00
  bDeviceClass 0 (Defined at Interface level)
  bDeviceSubClass 0
  bDeviceProtocol 0
  bMaxPacketSize0 64
  idVendor 0x1e7d ROCCAT
  idProduct 0x3264
  bcdDevice 1.00
  iManufacturer 1
  iProduct 2
  iSerial 0
  bNumConfigurations 1
  Configuration Descriptor:
    bLength 9
    bDescriptorType 2
    wTotalLength 59
    bNumInterfaces 2
    bConfigurationValue 1
    iConfiguration 0
    bmAttributes 0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower 500mA
    Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 0
      bAlternateSetting 0
      bNumEndpoints 1
      bInterfaceClass 3 Human Interface Device
      bInterfaceSubClass 1 Boot Interface Subclass
      bInterfaceProtocol 1 Keyboard
      iInterface 0
        HID Device Descriptor:
          bLength 9
          bDescriptorType 33
          bcdHID 1.11
          bCountryCode 0 Not supported
          bNumDescriptors 1
          bDescriptorType 34 Report
          wDescriptorLength 65
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x81 EP 1 IN
        bmAttributes 3
          Transfer Type Interrupt
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0040 1x 64 bytes
        bInterval 1
    Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 1
      bAlternateSetting 0
      bNumEndpoints 1
      bInterfaceClass 3 Human Interface Device
      bInterfaceSubClass 0 No Subclass
      bInterfaceProtocol 0 None
      iInterface 0
        HID Device Descriptor:
          bLength 9
          bDescriptorType 33
          bcdHID 1.11
          bCountryCode 0 Not supported
          bNumDescriptors 1
          bDescriptorType 34 Report
          wDescriptorLength 309
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x84 EP 4 IN
        bmAttributes 3
          Transfer Type Interrupt
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0040 1x 64 bytes
        bInterval 1


It should be enough to just add this line to ~/.vimrc:

set keymap=foo

Where foo is the name of your keymap. For instance, I tested with set keymap=greek and I was typing in Greek when I opened vim (of course, then I couldn't exit the thing but that's vim for you).

If that doesn't work for some reason, here's an ugly, hacky approach you could try instead. Add this to your ~/.bashrc:

vim(){
  setxkbmap XX ## change this to whatever keymap you use for vim
  command vim  ## launch the actual vim executable
  setxkbmap YY ## change to whatever your default layout is
}

Now, open a new terminal and use vim. The keyboard layout will be automatically changed for the vim session and changed back when you exit vim.

This is not a very good solution, however, because the keyboard layout will be changed for all applications. It simply does it automatically and changes back when you exit, but you will still have the new layout for all other windows, as well as vim. The first approach is much better.


What exactly is /lib/modules/4.4.0-XX-generic/vdso/.build-id

/lib/modules/ is the directory to store modules. The next bit (with the digits) is the kernel number these modules belong to.

vdso in the name of the module (it stands for virtual dynamic shared object). Your system does a lot of "system calls"  (like reading and writing to disk, grant permissions, etc) and it takes up a lot of resources to perform each of these. But those calls are also done a lot. The vdso module was created to help improving the time needed by allocating memory for them.

From wikipedia:

  vDSO (virtual dynamically linked shared object) is a Linux kernel mechanism for exporting a carefully selected set of kernel space routines to user space applications so that applications can call these kernel space routines in-process, without incurring the performance penalty of a context switch that is inherent when calling these same kernel space routines by means of the system call interface.

Some more information on this:

gitbooks: part 1, part 2, part 3 all about system calls. Part 2 is about "vdso" and "vsyscall".

  I'm fairly certain they're all false positives

Probably (as with 99.999999% of all those rootkits notices ;) ) but you probably need to compare these files with a clean system and check things like file size, last modification times to visually check if this is a false positive.

By the way: the /lib/modules/ directory can get large quickly. It is safe to remove old kernels (save the current and the next least oldest just to make sure you got a backup). See: How do I remove old kernel versions to clean up the boot menu?

Removing the older version also lowers the amount of notices from your rootkit ;)


Does Ubuntu have the option to ctrl+click an icon in the dash to cycle between instances of that program?

While you may not be able to bind Ctrl+Click to do what you want, you can make it such that clicking successively on the icon cycles through open instances. If your dash currently does not currently behave like that, then you can set it that way with the command:

gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'cycle-windows'

While Ctrl+click will launch or switch to an application, it will not do extra actions (e.g., it will not cycle). To my knowledge, you cannot further customize Ctrl+Click behaviour.

However, you can further customize Shift+Click behaviour, and in addition middle-click and Shift + middleclick.

Use the gsettings range command to query the possible values of the different keys controlling click behavour, i.e., click-action, shift-click-action, middle-click-action and shift-middle-click-action, for example:

gsettings range org.gnome.shell.extensions.dash-to-dock click-action

Then use a gsettings set command (see first command for an example) as above to set one of the available values. Use a gsettings reset command to reset the value to the default value of Ubuntu, for example

gsettings reset org.gnome.shell.extensions.dash-to-dock click-action


Chromium Cast function does not find the chromecast device

Try to enable the flags load-media-router-component-extension
If that doesn't work after a relaunch, you may also need to enable cast-media-route-provider
Unfortunately without a device that can confirm if the chromecast has been properly configured, it isn't possible to determine if the issue is with your chromium flags or the chromecast itself.
Chrome-stable will have all the required flags enabled by default and should allow you actually set up the chromecast, see https://linuxize.com/post/how-to-install-google-chrome-web-browser-on-ubuntu-18-04/ for instructions on Ubuntu.
Good luck!


I downloaded 12.04 LTS 64 bit at 698 MB but the finished download came in at 732.2 MB

It is OK. The web page calculates as MegaBytes, and 698 MB is for one cd. On the other hand ubuntu calculates the size as MillionBytes and this way 700 MegaBytes is 734 Million Bytes. There is no problem!


I found this to work for me to disable to keyboard shortcut for running a terminal:

Press the super key to start a search
Search for Configuration Editor and select that application
Drill down the following: apps >> metacity >> global_keybindings
Scroll down until you see run_command_terminal
You can remove or type in the word disabled to the right of run_command_terminal
Press the red 'X' at the top of the Configuration Editor application
Verify the save by going into: System Settings >> Keyboard >> Shortcuts

Pictures of what it should look like in both the Configuration Editor and System Settings area. Hope this helps!


Recursively count number of sub-directories

You can use a combination of the find and wc commands

For example, to count the directories starting at the current directory . and starting with letter 's'

find . -type d -name 's*' -printf "1" | wc -c

The -name condition matches against the name of the directory, using shell pattern matching rules (it is also possible to match using regular expression syntax, however that would be overkill here). The -printf "1" part prints the character 1 each time a match is found, and wc -c counts these characters.

The choice of 1 as the character printed and counted is arbitrary.

To display and count, you could do

find . -type d -name 's*' | tee >(wc -l)

however be aware that the count may be inaccurate if any directory names include newline characters (rare - but legal).


Ubuntu and Windows dualboot - Start Ubuntu without ask

This question already has an answer here:

  How to remove or hide the GRUB boot menu? 2 answers

  How do I skip the Grub menu on a dual-boot system? [duplicate]


There is a tons of differences between how SMB client working on linux/Mac OS and on Windows.

On Linux/Mac:

You need to specify share folder smb://SERVER/SareFolder
You can't just use email addresses like on windows to login, there is a wrapper for GUI working like:

mount_smbfs //user@SERVER/folder ./mntpoint
Ofc it's can't parse @ sign in login


duh.  I just needed to run the command with sudo or as root
sudo firewall-cmd --list-all


USB drive not mounting on Kubuntu; mounts on Ubuntu 14.04

Try downloading the disk utility and then see if your drive is showing up

  sudo apt-get install gnome-disk-utility

if the drive shows up you should be able to mount it without problem