The Linux kernel has its own build system based on make, which generates the correct gcc options for a successful compilation of kernel components and modules.
The Kbuild file included in external kernel modules is intended for use with that kernel build system. In addition, external kernel modules should also include a Makefile which invokes the kernel build system. A minimal Makefile for an external module might look like this:

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

As you can see, the main Makefile of the kernel build system actually resides in the folder /lib/modules/$(KVERSION)/build, where $(KVERSION) is the version number of the kernel you're building for. If you're curious you can try to retrace what the mesh of Makefiles there does and which set of options it ends up calling gcc with.


I can't say definitively what creates this directory, but it is likely that it is created either as a side effect of installing third-party Linux kernel drivers such as NVIDIA or VirtualBox using DKMS, or by some other unsupported installer script not provided by Ubuntu. This directory was most probably created as a side effect of an install process that happens to support both rpm-based and deb-based distributions. DKMS happens to be such an install script and can definitely create this directory under the right conditions. The directory can safely be deleted without harming your system, but it may be created again when updates are installed later. See bug #1069350 for an open bug report tracking this issue.

That's the short answer, now some more detail.

What is .rpmdb?

As you may know, rpm is a software packaging format and set of tools for installing packages and maintaining the database of installed packages and their interdependencies. It is used by many distributions but not by Ubuntu and other deb-based distributions. Unfortunately for Ubuntu, however, any use of the rpm command requires a valid "rpmdb" database to exist or to be created.

On rpm-based distributions this is not a problem because they have a system-wide rpmdb by definition. On Ubuntu systems, since there is no need for a system-wide rpm database, rpm is configured to use a database under each user's home directory, specifically $HOME/.rpmdb. This database is silently created as needed whenever rpm runs. Since it is in each user's home directory, there are no problems with shared permissions or requiring the database to be created by an administrator. Every user just gets their own private empty rpm database.

Why would rpm be run at all on Ubuntu?

It turns out that some projects like to create install scripts that will work on any distribution, whether that distribution is rpm-based, deb-based, or neither. DKMS is one such project, it allows third-party drivers to be built for whatever Linux kernel a system happens to be running, and it is written to work across distributions. In part of its logic to determine which distribution it is running on and which kernel version is present, it executes an rpm command to query the database. As I explained earlier, this will silently create a .rpmdb directory if one does not already exist in the current user's home directory. The database query should fail, since Ubuntu is not an rpm-based distribution, and DKMS continues on.

If you install any additional Linux kernel driver packages from Ubuntu such as VirtualBox, NVIDIA, ndiswrapper, or openswan, you are probably using DKMS to install those drivers for your kernel. This is typically done automatically when the driver is installed from the Ubuntu repositories. So any time either a kernel or driver update is installed, DKMS runs again to rebuild the driver for all available kernel versions. It has been shown that when those packages are updated, the /root/.rpmdb directory does in fact appear, which is in root's home directory since root is required to install updates.

I don't know of any other specific third-party installation scripts that may also execute rpm commands as a way of detecting the distribution type, but it's certainly possible. For example, you may want to install LargeProprietaryProgram from Initech, and to do so you run an install.sh script as root. This script may try to query an rpm database to see if you're running an rpm-based distribution, and /root/.rpmdb is created again.

So that explains why you may see /home/user/.rpmdb and /root/.rpmdb directories show up on your system. But why in the system root directory?

Why is .rpmdb created in the root directory?

The easiest explanation for this is that the $HOME environment variable is unset somehow in some process context that runs rpm. Let's use DKMS for the sake of argument because we definitively know it can run rpm commands. Because it typically runs when packages are installed or updated, it runs in the environment of whatever package manager you happen to use. If you use sudo apt-get to install packages, it will inherit a correct $HOME. If you use PackageKit, it may not have a $HOME variable at all. I am not sure what environment is provided by Synaptic or Ubuntu Software Center.

So if DKMS is running in an environment that does not have a $HOME variable, and because of the way the rpm database was defined, an empty rpm database will be created in /.rpmdb instead of /root/.rpmdb. This has been fixed in the rpm package for Ubuntu in the 14.10 development version, so it should now create /root/.rpmdb even if $HOME is not defined.

I hope this explains why there are directories called .rpmdb at all on an Ubuntu system, why they may get created seemingly automatically, and why one can be created in the root directory under the right set of conditions. It's nothing to worry about, there is nothing malicious in the existence of this directory, and it can simply be deleted if its presence is offensive to aesthetics or security scanners.


Apache web server - how to strip language extentions

RewriteRule ^(.*.html)\..*$ $1

This rewrites /foobar.html.anything into /foobar.html, and seems to do what you want.

If it is intended to be permanent, you should probably send a 301:

RewriteRule ^(.*.html)\..*$ $1 [R=301]


Presonus Studio One installing with wine

Summary
You could try the following:

Update to the latest version of winetricks.
Rename the file as instructed in the message.
Try installing again.

This has been successful for many people.
Sources:

Can't install DLLs in Winetricks
winetricks sha1sum mismatch rename and try again

1. Updating winetricks
You can get your current version with
$ winetricks --version

and which is the latest available with
$ curl --silent --show-error https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks --stderr - | grep ^WINETRICKS_VERSION | cut -d '=' -f 2
20210206-next

If you don't have the latest, update and check with
$ wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
$ chmod +x winetricks
$ sudo mv -v winetricks /usr/local/bin
$ winetricks --version

or
$ sudo winetricks --self-update
$ winetricks --version

Source: How do I get the latest version of winetricks on Ubuntu?
2. Renaming the target file
$ mv -v <filename> <filename>.bak

3. Installing again
Repeat the procedure.
Related:

https://linuxconfig.org/configuring-wine-with-winetricks


Trying to pass two variables in a bash script

You're piping the y to echo 'my password', not to sudo.

Use the block to group both the echos:

{ echo 'my password' ; echo y ; } | sudo ufw reset

sudo normally reads the password from a terminal, not stdin, unless you supply the -S option.


What package provides the "wl" kernel module?

Based on this thread, it seems that Broadcom directly provides the wl module. Their code page for it is here: http://www.broadcom.com/support/802.11/linux_sta.php.

It looks like they want you to email support requests to the address provided on that page.


How could I tune the linux kernel parameters so that socket could be recycled frequently?

You might want to try lowering net.ipv4.tcp_fin_timeout, which affects how long the sockets hang out in TIME_WAIT.  This is already fairly low at 60; try lowering it 10 at a time and see if it improves the situation.

 echo 50 >/proc/sys/net/ipv4/tcp_fin_timeout

If it works, add it to sysctl.conf:

net.ipv4.tcp_fin_timeout = 50 # or whatever works best

Just keep in mind that, while it helps with load testing, it isn't necessarily a great default for real-world usage.

Eric


The jde package is in multiverse because historically, it required a non-free version of Java to work.  Software that's available under a free license, but requires non-free software to work, is shipped in "contrib" in Debian, which maps to "multiverse" in Ubuntu.

It looks like jde no longer requires the non-free Java to work, so on that basis it could be moved to universe.  Unfortunately, the package is also unmaintained in Debian, with the result that it depends on a number of other packages that are free but have been removed from the latest releases of Debian and Ubuntu (cedet-contrib, cogre, eieio, semantic, speedbar).  This is documented as Debian bug #620341, which has remained unaddressed for half a year.

As long as the package is uninstallable there probably isn't any point to moving it to universe; but if you want this to be changed you can file a bug in Launchpad against the jde package and subscribe the ubuntu-archive team to the bug.


Installation of Windows 7 from within Ubuntu

No, You can't install Windows and Ubuntu in the same partition.

But, I guess, You are referring to the disk by mentioning partition. Yes, You can install Windows and Ubuntu in the same disk by creating separate partition for each OS. In simple word, A partition is a logical division of the whole Disk, so that, You can feel, you have more disk.

Look at these question for getting help in installing Windows after installing Ubuntu:

How can I install Windows 7 after I've installed Ubuntu?


ProFTPD have to access Port 21 as it is service default port and its clearly saying that some other service using that port already.

you can see what service using that port by using , mostly probably another FTP service like vsftpd etc

netstat -peanutl | grep :21

you can kill that service and try starting ProFTPD.

else you can change default port to someother port with syntax in configuration file.

Port <Port_number>

Read this link


Yes.  The bind mount is immaterial, and as long as your backup tool is not configured to only backup the one filesystem and not descend into any mount points ( like the --one-file-system option to tar ) then the subdirectories in those mount points will be backed up.


You can use GhostScript for batch output .ai to various formats, i.e. transparent PNG:

gs -dNOPAUSE -dBATCH -sDEVICE=pngalpha -r300 -sOutputFile=out.png in.ai

Where -r300 is dpi resolution.

For available devices with which you can convert .ai format, reference documentation.


How to globally disable antialiasing in Ubuntu?

Yes, this is possible using nvidia-settings.  Launch this application, and then on the left hand side, you should see all your XScreens listed.  Find the xscreen corresponding to the monitor and go to antialiasing settings.  From there you can override application settings and turn off antialiasing for everything.


Installing Ubuntu on a device having both SSD and HDD completely fresh install

In your case, the easiest will be to do a fully automated default install, where, however, you should make sure to use your fast SSD drive. That way, Ubuntu will create one partition on your SSD, that contains the system files and the user files (under the "/home" folder). In addition, a swap file will automatically be set up to be used as swap memory.
Your SSD will then host both your operating system and your daily work files for speedy access. You then can use your second drive for large files or extensive data such as movies, photo collections or audio, or for archiving data, etc.
By default, your other drive will be visible in the file manager. You need to click it there to have it mounted before you can access it. That can be fine if you use that drive only now and then. However, you may prefer it is available immediately. This requires a small system intervention after you finished installed the system. Nowadays, you can do that  using the "Disks" utility that is by default available in Ubuntu. The classical approach, however, is to manually add the drive to the system file /etc/fstab.


How do I make the 'Shut Down the Computer' window be monochrome?

Change your icon set in appearance preferences to LoginIcons.  This will adopt the icons from the login screen, and also change the rest of your system icons to the Humanity set.
If you want to use the default Ambiance icons instead of the Humanity ones:

Create a local copy of the LoginIcons set:
cp -R /usr/share/icons/LoginIcons ~/.local/share/icons

open the newly-copied ~/.local/share/icons/LoginIcons/index.theme in gedit and change the Inherits line (line 4) to Inherits=ubuntu-mono-dark,gnome,hicolor

Change the Name line (line 2) to something unique; then select your newly named icon set in appearance preferences.


How can I get Compaq Presario V2565US graphics driver?

There is an app in Ubuntu under system settings > additional drivers to find open source drivers online, try that.


To install Netbeans, you can simply install the netbeans package. This will install everything Netbeans needs, including Java.

sudo apt-get install netbeans

To install Java, but without installing Netbeans

How do I install Java?

If you want the proprietary version of Java, you need to:

How can I install Sun/Oracle's proprietary Java JDK 6/7/8 or JRE?

To install these packages, use the Software Centre, which is available from the Applications menu.


Yes, you can upgrade Ubuntu within a virtual machine. However, be sure that there is enough disk space available. The upgrade tool may underestimate the required space on occasion. Around 3GB should be enough, IIRC.


12.04: php5-curl not working, NOT a LAMP server

I heard I have to include a line in my /etc/php5/apache2/php.ini file, so I included:

extension=php_curl.so

and now it's working.


Why is Evolution present and active but not visible as installed? How to get rid of it?

That's the evolution-data-server package.

Description: evolution database backend server
 The data server, called "Evolution Data Server" is responsible for managing
 mail, calendar, addressbook, tasks and memo information.

e-d-s is part of the Gnome and Unity desktops. It runs the integrated calendar and address book.


The package isn't available for Ubuntu 12.04 in the official repositories. But you could try to use the PPA ppa:jamesodhunt/procenv-daily

sudo apt-add-repository ppa:jamesodhunt/procenv-daily
sudo apt-get update
sudo apt-get install procenv

As an alternative it is always possible to compile your own version

sudo apt-get install git checkinstall
mkdir -p ~/src
cd ~/src
git clone https://github.com/jamesodhunt/procenv.git
cd procenv
./configure
make
sudo checkinstall


Single user rvm needs sudo, and adding users to rvm group

The version of RVM packaged by Ubuntu is old and broken in mysterious ways, you need to read this for details how to fix: https://stackoverflow.com/a/9056395/497756


I have a folder for Guest Additions - does that mean it's installed?

The folder that you see is probably the Guest Additions CD image that is mounted on the CD drive D:. This contains the Guest Additions installer files.

To assure that the Guest Additions have been installed, double-click on this folder and locate the installer .exe files. They are VboxWindowsAdditions-amd64.exe (for 64-bit installations) or VboxWindowAdditions-x86.exe (for 32-bit installations). Double-click on that and follow the instructions. When you're done, unmount the CD drive D:.

Update #1:

The image that you just posted is very confusing, but it looks like the CD Drive D: contains the Windows 10 Installer .iso image. Eject that. Go to the Devices menu, and select "Insert Guest Additions CD Image", and proceed as above.

Update #2:

If the Devices menu won't mount the Guest Additions CD image, you can manually find it in /usr/share/virtualbox/VBoxGuestAdditions.iso.

Regarding resizing the disk... if this is a fresh VM, and you don't have any files saved yet, it's just easier to delete the VM and start over, this time specifying the desired disk size. The default is probably 8G, and you'll probably want at least 20-40G.


I'm no expert on UEFI but looking at your link, I'm not convinced the SD card is right - it appears you have it booted from the USB-stick to obtain the report, however this:

$ efibootmgr -v
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0001,0002
Boot0001* UEFI: TOSHIBA TransMemory-Mx PMAP ACPI(a0341d0,0)PCI(1d,0)USB(1,0)USB(1,0)HD(1,20,1d0d7e0,000e5599)AMBO
Boot0002* Hard Drive    BIOS(2,0,00)AMGOAMNO.........T.O.S.H.I.B.A. .T.r.a.n.s.M.e.m.o.r.y.-.M.x. .P.M.A.P....................A.............................L..Gd-.;.A..MQ..L.T.O.S.H.I.B.A. .T.r.a.n.s.M.e.m.o.r.y.-.M.x. .P.M.A.P......AMBO

UEFI/Legacy mode:
BIOS is EFI-compatible, and is setup in EFI-mode for this live-session.
SecureBoot disabled. (maybe sec-boot, Please report this message to boot.repair@gmail.com)

PARTITIONS & DISKS:
mmcblk0p1   : mmcblk0,  not-sepboot,    no-grubenv  nogrub, no-docgrub, no-update-grub, 32, no-boot,    no-os,  is-maybe-EFI,   part-has-no-fstab,  part-has-no-fstab,  no-nt,  no-winload, no-recov-nor-hid,   no-bmgr,    notwinboot, nopakmgr,   nogrubinstall,  no---usr,   part-has-no-fstab,  not-sep-usr,    standard,   not-far,    /media/ubuntu/DAEA-6B79.
mmcblk0p2   : mmcblk0,  not-sepboot,    grubenv-ok  grub2,  signed grub-efi ,   update-grub,    64, with-boot,  is-os,  not--efi--part, fstab-without-boot, fstab-has-goodEFI,  no-nt,  no-winload, no-recov-nor-hid,   no-bmgr,    notwinboot, apt-get,    grub-install,   with--usr,  fstab-without-usr,  not-sep-usr,    standard,   not-far,    /media/ubuntu/47ac1923-ae17-4a5b-8c00-21c1cbaa2fc0.
mmcblk0 : sda,  maybesepboot,   no-grubenv  nogrub, no-docgrub, no-update-grub, 32, no-boot,    no-os,  not--efi--part, part-has-no-fstab,  part-has-no-fstab,  no-nt,  no-winload, no-recov-nor-hid,   no-bmgr,    notwinboot, nopakmgr,   nogrubinstall,  no---usr,   part-has-no-fstab,  not-sep-usr,    standard,   not-far,    /mnt/boot-sav/mmcblk0.

mmcblk0 : GPT,  no-BIOS_boot,   has-maybe-EFI,  not-usb,    has-os, 2048 sectors * 512 bytes
sda : not-GPT,  BIOSboot-not-needed,    has-no-EFIpart,     usb-disk,   no-os,  32 sectors * 512 bytes

Seems to suggest the SD isn't bootable.

I did find this link which looks similar


Edit your ~/.bashrc file and add this at the end:

function cfinfo(){
  cf target | awk '$1=="Org:"{printf "%s-", $2} $1=="Space:"{print $2}'
}

That function generates the string IB-Production depending on the output of the command cf target -s production.

Then add this after that function definition in ~/.bashrc:

PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w \n $(cfinfo) \$ '

Notice: The part before $(cfinfo) differs in your case. In my example it is just the default uncolored debian prompt.


You could take a few actions to tackle this issue:

Find the cause for the huge syslog
Clean syslog the safe way
Implement logrotate

I am linking a couple of sources.
There is no need to copy them here, as they belong to SE.

https://stackoverflow.com/a/62490004/2707864
https://askubuntu.com/a/515151/226614


How to wipe existing SSD prior to fresh Ubuntu install?

I'd like to safely wipe the SSD prior to doing so, but am unfamiliar with how to do so on a Linux system with a single drive.

There is no need for that since you can do it when the installer is asking for partitioning. It will format everything you tell it to. After installing the operating system it is possible to retrieve the old data but only if you immediately stop using the system (every write after that makes it less likely to be able to restore the old system).

If you still use the hard disk nobody is going to be able to retrieve the previous system unless you let them.

  Or, perhaps the Ubuntu Server installer USB allows me to run these commands prior to installation?

It does but it will then start installing too. You would need to kill the installation after the partitioning. To securely wipe a hard disk you probably need to format more than once. Formatting kills the life span of an SSD so I would advice against it.

Nevertheless: if you create a gparted live session you can also do this from a live session. Works similar to the live Ubuntu session but this will show your a partition editor where you can format, remove, shrink, enlarge and delete partitions.

The same can be done from a live Ubuntu session: install gparted inside the live session and you can format the partitions (this is terribly slow though; you should prefer the gparted live session over this method).


Switching proprietary drivers from shell

I also had the same issue and the following fixed this blank screen after login for me without having to downgrade to 410 (tried it still failed)

The following link comes from Black screen after installing NVIDIA drivers 390, 410, 415 for GeForce 1050 TI, in particular, this answer: https://askubuntu.com/a/1105657/930120

  You have to load the proprietary Nvidia drivers from initramfs.

  /etc/initramfs-tools/modules

# List of modules that you want to include in your initramfs.
# They will be loaded at boot time in the order below.
#
# Syntax:  module_name [args ...]
#
# You must run update-initramfs(8) to effect this change.
#
# Examples:
#
# raid1
# sd_mod
nvidia
nvidia-drm
nvidia-modeset
nvidia-uvm

  You could also check the content of
  /etc/modprobe.d/nvidia-graphics-drivers.conf, should be something
  like this:

options nvidia-drm modeset=1
blacklist nouveau
blacklist lbm-nouveau
alias nouveau off
alias lbm-nouveau off

  Make sure to update initramfs. sudo update-initramfs -u -k all

  To work around bug with still black screen on typing password, try the
  following: edit /etc/default/grub change the two lines to be like
  this:

GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX=""

  apply it with running sudo update-grub

  Reboot, and hopefully enjoy!


Authentication Failure on the first Ubuntu boot from my USB?

go to ubuntu.com and download ubuntu.  Then you need to verify what you downloaded has downloaded properly.  You do that by doing something called a checksum.

You can download it here - http://releases.ubuntu.com/14.04.3/ubuntu-14.04.3-desktop-i386.iso

Then do a md5sum.
If you are on Ubuntu you can install it with

sudo apt-get install md5sum

Then you can check the iso like

md5sum ~/Downloads/ubuntu-14.04.3-desktop-i386.iso

If you are on windows you can download a program to do it
http://www.etree.org/cgi-bin/counter.cgi/software/md5sum.exe

It should be

0bc058cdc75fb75d4922c7c74c4cd6b1

Let me know what happens after you verify this.


MTP with Android phone unreliable on 14.04

I had the same problem on a machine when I 'upgraded' the distribution from 12.04 LTS to 14.04 LTS.  There were a lot of other issues with the 'upgrade', so I just reformatted and installed 14.04 on the empty drive to solve ALL my problems.  The upgrade seemed like it worked, but the more I used it, the more it was obvious that there were a ton of little things that were broken that made the system frustrating to use.  (wacky java and other lib problems.... HW-stuff broken or unreliable like this, etc...)

Try booting from a 'live USB' version of 14.04 and see if that fixes this problem, if it does, you may have other issues and it'd be easiest to backup what you need and re-install to fix all of it at once.


Modify directory permissions for "others" in RPM

As far as I understand "others" is a flag used for all users that are not the owner.

No. "Others" permission is the last bit in chmod, e.g. permissions 0644 for a file allow reading of the file by anybody who is neither member of the group owner of the file, neither the owner of the file.
What actual system users are "others" will depend on chown permissions (ownership).
For example, the file is owned (chowned) as root:root. It means rootuser is the owner, androotgroup is the group owner. So others are any users who are neitherrootuser, nor members ofroot` group.
The %attr macro has this signature:
%attr(<mode>, <user>, <group>) <file>

So when you specify:
%attr(-,others,root) /opt/platform3pp/P3PPapache-tomcat-9.0.14-1.1/conf

This will of course not work unless there is an actual others user in the system.
Simply use the first argument to a macro which is mode (or, simply, chmod of the files in question). Example:
%attr(0644,root,root) /opt/platform3pp/P3PPapache-tomcat-9.0.14-1.1/conf

The result will be the file will be owned by root:root and chmod will be 0644, which, accounting for the last bit (others), will allow all users to read the file.


I found this on Reddit and it worked perfectly for me...
How to get fully working audio on XPS 9700 in Ubuntu 20.04:

Download and install dkms module:
https://launchpad.net/~canonical-hwe-team/+archive/ubuntu/pc-oem-dkms/+packages
Alternatively, you can install linux-oem-20.04, it will install the 5.6 kernel with the above driver. Your system may be more stable with 5.4 kernel since it is in wide use.

Manually install sof-firmware from Arch Linux:
https://archlinux.pkgs.org/rolling/archlinux-extra-x86_64/sof-firmware-1.5.1-1-any.pkg.tar.zst.html
You will need to delete the existing "sof" and "sof-tplg" files from the Ubuntu linux-firmware package first. Note if this package gets updated from Canoncial and they don't update these, you will have to delete and then reextract. Files go into the /usr/lib/firmware/intel/sof and /usr/lib/firmware/intel/sof-tplg folders.

Manually install the ucm2 files:
http://xps17.ddns.net/sof-soundwire.zip
These go into /usr/share/alsa/ucm2/sof-soundwire. Delete the contents of the existing sof-soundwire folder (if you have it) and replace them with the ones from the archive.

Reboot. You should now have all your audio devices available. If speakers do not play, you may need to run alsamixer (non-root) from a terminal and unmute and set the mixer levels all the way up.


There is a python script that it claims to reset Unity and Compiz settings back to default, it may could help you avoid reinstalling your desktop. You should be able to download it or install it through apt by adding the PPA to sources list.

Using terminal (you will have to provide administrator's [root] password)

sudo add-apt-repository ppa:amith/ubuntutools this will add the PPA to sources
sudo apt-get update perform an update
sudo apt-get install unity-reset install it
unity-reset perform the reset.

References:
Script's git repository

A blogpost mentioning the process


How to change default in ubuntu 12.04 LTS

you can use  unity-tweak-tool or ubuntu-tweak and then copy the modified files if you want to create a custom version of ubuntu


Software Center not working in Ubuntu 12.04 LTS

Open your terminal with CTRL + ALT + T and type as

sudo apt-get install --reinstall software-center

Then try to re launch it.


What is your current kernel?

You can find that thru a uname - r
https://www.kernel.org
Check if your version is the latest if not
http://www.yourownlinux.com/2016/02/how-to-install-linux-kernel-4-4-3-in-linux.html?m=1

Follow the instructions on the link below and select 32 or 64 according to your distro type.

This happened on a laptop of mine and updating kernel sorted the problem maybe this can fix your problem as well


Convert a video to a fixed screen size by cropping and resizing

Something like this should work with the proper parameters for each case:

Note: The original answer was posted in this link: How can I crop a video with ffmpeg? which originally posted by me and edited several times in order to update it to the newest options in the most recent versions of ffmpeg. Many thanks to slhck, Jonathan., Anton Rudeshko, LordNeckbeard and future maintainers.

In recent versions of FFmpeg, use the crop filter:

ffmpeg -i in.mp4 -filter:v "crop=out_w:out_h:x:y" out.mp4

Where the options are as follows:

out_w is the width of the output rectangle
out_h is the height of the output rectangle
x and y specify the top left corner of the output rectangle

Original image

Original 320x240 image

Example 1

To crop a 80×60 section, starting from position (200, 100):

ffmpeg -i in.mp4 -filter:v "crop=80:60:200:100" -c:a copy out.mp4

The audio is stream copied in this example, so re-encoding is avoided.

Example 2

To crop the bottom right quarter:

ffmpeg -i in.mp4 -filter:v "crop=in_w/2:in_h/2:in_w/2:in_h/2" -c:a copy out.mp4

This is the same as:

ffmpeg -i in.mp4 -filter:v "crop=320/2:240/2:320/2:240/2" -c:a copy out.mp4

Which is the same as:

ffmpeg -i in.mp4 -filter:v "crop=240:120:240:120" -c:a copy out.mp4

You can refer to the input image size with in_w and in_h as shown in this first example. The output width and height can also be used with out_w and out_h.

Example 3

Crop 20 pixels from the top, and 20 from the bottom:

 ffmpeg -i in.mp4 -filter:v "crop=in_w:in_h-40" -c:a copy out.mp4

The filter will automatically center the crop if x and y are omitted such as in this example.

Previewing

You can take a crop (heh heh) and preview it live with ffplay:

ffplay -i input -vf "crop=in_w:in_h-40"

This way you can experiment and adjust your cropping without the need to encode, view, repeat.

Notes

crop filter documentation
Default encoder for MP4 is libx264 (H.264 video) or mpeg4 (MPEG-4 Part 2 video) depending on your ffmpeg build. See FFmpeg Wiki: H.264 Video Encoding Guide for more info.
Instead of cropping and re-encoding, consider cropping upon playback. This is possible with any player worth using.
Ancient ffmpeg builds used -croptop, -cropbottom, -cropleft, -cropright options instead of the crop filter. If this is the case for you then get a modern ffmpeg. Development is very active and there is no reason to use an antique.


Why doesn't Ubuntu load after installing via wubi on a RAID 0 setup?

Gonna go ahead and try to answer this, because i know that people who use the Windows installer tend to be new(er) to Linux.  Also going to answer the "why"

If i recall correctly (as to say, i may be wrong)
 Wubi creates a Disk(virtual)Image "loop" file on your windows partition

  This file is then mounted at boot and Ubuntu pretends its a hard drive

and will then boot into that
- Because the raid is mounted on windows drivers (fakeraid: bios Style) The boot loader will be expecting a standard single drive.
Thus it wont boot.

On the off chance anyone reads and asks this question, I decided to answer it.
To solve it, you would have to program the bootloader to first assemble the raid (I think thats dmraid, ya?) then to mount the loop.
Which im sorry but, I dont remember how to do that.
But im pretty sure you can install Grub to a USB stick and program that to read your RAID0


JavaDocs with netbeans 7.3 not showing help incode

I figured out that it was a problem with the javaJDK that I installed from the ubuntu software center. All I had to do was uninstall it from the USC and then reinstall the java jdk from orcale and that fixed the problem.


Steam is extremely slow to load the first game

I had the same problem when I installed steam. The game was DreadOut (I wouldn't recommend it) and it used to take a couple of minutes displaying a black screen before the game actually started.

What I have done is install the graphic card manager in order to optimize the gaming settings.

I don't know what graphic card you have but in my case it was an AMD and I have ubuntu 14.04 so I installed Catalyst control center using this video

==> https://www.youtube.com/watch?v=Ka5gBMlo-zo

Optimize my gaming settings and then the problem was over.

I hope this helps,

Regards


How to install a downloaded third party software (Nero Linux 3) via command line?

Fairly importantly, I think you might not have an official copy of this and that could make what you're about to do pretty dangerous. The documentation for Nero 3 only talks about RPM and DEB installers.

If you're confident your copy isn't going to destroy your life, carry on... Otherwise try to get hold of the DEB installer. It'll make things much easier.

"Becoming root" translated to "prefix it with sudo" in Ubuntu-ese (so it becomes sudo tar ...) but there might be a better way of handling this. Alien can convert binary tgz packages like this into a DEB. This simply makes it easy to remove. Alien will also install the package at the same time as creating it.

sudo apt-get install alien
sudo alien -di nerolinux-3.5.1.0.tgz

And then you should be able to run nero (I'm not sure if it installs launchers; the documentation claims /usr/share/applications/nerolinux.desktop will be created).

Because we've used alien removing it should be as simple as looking for nerolinux in your favourite package manager, or just running sudo apt-get remove nerolinux from a command line.

Though I'm not sure that Nero 4 doesn't do multi-session. There are a lot of people saying they've had problems and a similar number of posts suggesting an update fixed it (this is back around 2010). In my experience this is as much to do with the media and hardware as it is the software.


Ubuntu 17.04 - Installing TLP asks for additional dependencies like postfix

Install it with --no-install-recommends if you are using apt, it is smartmontools that is installing postfix.

Posting comment as answer per reqeuest


Can't boot from HDD after install of Ubuntu 14.04 on Lenovo V570

Maybe assigning HDD as first boot device can help?


To remove squid, and all configuration files:

sudo apt-get purge squid

To then install squid

sudo apt-get install squid

When editing system configuration files, I highly suggest you first back up the original.

sudo cp /etc/squid/squid.conf /etc/squid/suid.conf.orig

When editing files, do not delete anything, use comments

#Original line(s)
#Date / reason for edit(s)
New line(s) with edit(s)

Your question about the squid conf file should be separate. As a hint, google search regular expressions.


Conky harmattan is surrounded by the previews wallpaper

I just solved this in Gnome Shell 3.08 by using the tweak tool, section Desktop, and activating the allow nautilus to manage the desktop option. Maybe the same works with Unity, with unity-tweak-tool or similar, I haven't tested it.


Same problem here. The only help that I found is for windows...http://www.conewago.k12.pa.us/uploads/2/1/2/9/21299964/how_to_turn_on_kyocera_job_accounting.pdf


Why I need several boot partitions (EFI and bios grub)?

Short answer: What Timur Fayzrakhmanov wrote is right, replace the /boot-partition with an EFI partition.

What I know or found out:

For booting UEFI you need a FAT32 EFI partition, one for each drive is sufficient and can handle several operating systems (this depends mostly on your UEFI firmware).
For booting Linux in legacy mode on a GPT drive you need a BIOS-GRUB-partition without any filesystem and flagged as BIOS_GRUB.
For booting another legacy operating system from a GPT partition table the general advice is that you need a separate BIOS-BOOT-partition. To my experience and as far as I can remember just installing Windows 7/8 in legacy mode will create the necessary partitions (IIRC MSR, BOOT and OS).
The /boot-partition that is sometimes suggested for advanced setups (RAID, Full Disk Enrcyption, etc.) is really just for advanced systems. With UEFI a boot partition for Linux isn't really necessary for advanced setups either, because the EFI partition can be configured hold the kernel and initrd images as well. The gummiboot developers published a specification how they like to see it implemented and published a new version just a few days ago that would combine all the necessary files and configuration in one file.

So for UEFI and MBR booting you would at least need an EFI partition (all EFI bootable OS) and a BIOS_GRUB partition (GRUB PC manages all legacy OS). Don't remove or reuse any existing MSR partition. You can try to install a Windows 7 EFI loader to the EFI partition with bcdboot, the Windows 8 version has some more improvements like the /f uefi option.

Booting a /, /boot, swap and /home 4 partition layout from GPT in BIOS as well as UEFI mode is not possible, you need a partition for each mode. However with GPT there is no real limitation.

I posted further details/instructions in Is it still possible to install Ubuntu to an external harddrive with UEFI?


Note that .pam_environment does not use the normal syntax. You should strictly follow the pam_env.conf syntax.

In particular if you want to set the JAVA_HOME and PATH variables you can put this content into your .pam_environment:

JAVA_HOME DEFAULT=<the-path-to-java-home
PATH DEFAULT=${PATH}:extend/the:path

Following Rinzwind answer will most likely brick your login[1]. In which case you can re login into a TTY  using Ctrl + Alt + F1 and remove the .pam_environment file with the command:

/bin/rm ~/.pam_environment

[1] At least on my computer with Kubuntu 12.04


Visual Code Error: Debugger adapter process terminated. Please Help

I had exactly the same problem on a Ubuntu 16.10 machine with .NET Core 1.1 (from official Microsoft site www.microsoft.com/net/core) and Visual Studio Code > = 1.7.0

Installing the newest C# extension (1.6-beta3) helped.
See:
https://github.com/OmniSharp/omnisharp-vscode/wiki/Installing-Beta-Releases

executing 'dotnet --info':
.NET Command Line Tools (1.0.0-preview2-1-003177)

Product Information:
 Version:            1.0.0-preview2-1-003177
 Commit SHA-1 hash:  a2df9c2576

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  16.10
 OS Platform: Linux
 RID:         ubuntu.16.10-x64


A video recording app that will create a timestamp and title on video

OBS Studio supports adding all kinds of information and overlays onto videos live while they're recording/streaming.  You should check it out and browse the available addons/extensions it has.

Also, if it's acceptable to add the overlays after the fact, I know that various video editors like shotcut (available as a snap) have effects and overlays for things like timestamps that can be added to a video, at which point you would just re-export it after adding the info you want.


I had to install libpango1.0-dev to get the header files.


Look at this line:

Depends: libdrm2 (= 2.4.52-1) but 2.4.56-1~ubuntu1 will be installed.

It says the libdrm-dev to be installed is 2.4.52-1 and requires its dependencies all versioned in 2.4.52-1. But your apt-get only has 2.4.56-1~ubuntu1 available.

Thus, you may try to 'upgrade' the version of libdrm-dev, that is version 2.4.56-1~ubuntu1, as same as its newer dependencies in your case. Now if you google again with keywords libdrm-dev 2.4.56-1~ubuntu1, and within a few clicks, the download link may pop up and wget it like so:

wget http://launchpadlibrarian.net/192227986/libdrm-dev_2.4.56-1~ubuntu1_amd64.deb

Then, make sure the dependencies are installed:

sudo apt-get install libdrm2 libdrm-intel1 libdrm-radeon1 libdrm-nouveau2

Now install the freshly downloaded libdrm-dev:

sudo dpkg -i libdrm-dev_2.4.56-1~ubuntu1_amd64.deb
rm libdrm-dev_2.4.56-1~ubuntu1_amd64.deb

Hope everything goes smoothly!


How to play HTML5 or Flash games offilne in Ubuntu?

Some (but not all) Flash games store their game data in your temporary internet files folder. The catch is the file is not going to be named anything normal, so you have to search through all the .swf files in your temporary folder to find it. As far as I know you can't do the same thing with HTML5 however.


Xubuntu 14.04 - Confirmation dialog box doesn't appear after hitting shift + del shortcut

Apparently it's a bug that's been fixed upstream but not in Xubuntu yet. I think the best thing to do right now if you're having this issue is go to the Launchpad bug report and let them know the bug is affecting you:

https://bugs.launchpad.net/ubuntu/+source/xfdesktop4/+bug/1315716

That should bring more attention to the bug which should hopefully help it get fixed sooner.


Session started with startx disappears after switching virtual console

It is on the next console up from the default graphical session

Do:

ctrl + alt + F8

http://en.wikipedia.org/wiki/Virtual_console

  If several sessions of the X Window System are required to run in parallel, such as in the case of fast user switching or when debugging X programs on a separate X server, each X session usually runs in a separate virtual console.

Basically so you can see what is going on behind the scenes.


ubuntu resize partition after installing

You installed Ubuntu on a 500 GB partition.To resize that partition,you need to boot ubuntu live disk.
After booting ubuntu live disk,open gparted.
Right-click on the 500 GB partition and then resize it.
After resizing an unallocated space was created.
Create a new ntfs or ext4 partition(whatever you want) from that unallocated space.

By doing the above,you doesn't loose any datas.


I would recommend PlayOnLinux if you're going to use Microsoft Office 2010 with Ubuntu.

Install PlayOnLinux:

sudo apt install playonlinux

After PlayOnLinux is installed, run the application.  Click on the Install button.

Then in the search box you can type in Office 2010 and it will show you the installations.  Click on the correct one, then click Install in the lower right corner of the window.  PlayOnLinux should then download all required packages to try to make Microsoft Office 2010 work with Ubuntu.

Hope this helps!


The error on /dev/sr0 indicates that it's highly likely that you have a corrupt CD/DVD.

First use this page to understand how to check your .iso file (https://help.ubuntu.com/community/HowToMD5SUM), Then make sure you use the verify option on your CD burning software to ensure that the CD is actually correct.

With a new CD (without errors) it should work a whole lot better.

I don't think it's an issue with the CD drive or driver as it's showing up in a later sector (158960), so it's more likely data corruption on download or writing the Disc.


(Got no data packets from target network!) error in aircrack-ng ubuntu

The output of the aircrack-ng states

  No data - WEP or WPA

this means that all the captured packets are just beacons (AP announcement packets) and no real useful AP-client data was captured.

Moreover, not all the AP-client data can be used for WPA2 cracking, just the 4-way handshakes.

You just have to do a successful access to the WPA2 network with another device while capturing with airodump-ng and a

  WPA handshake: aa:bb:cc:dd:ee:ff

will appear confirming the acquisition of the useful data.


Swap taking more ram memory, my system running slow

Your system has only 1 GB of RAM, which is fully used. In addition, you have 3 GB of swap, which will be userd by your system once it needs to free RAM for something.

Your system probably is slow because it has to swap files from the (fast) RAM to the (slow) hard disk where your swap resides.


Wired network fails with DHCP, appears to work but does not with static IP

At the end I found a solution.

As described in this link, the problem seems to be linked to the WoL (Wake on LAN) feature in Windows 10 side.

To solve the problem then I made the following step:

In Windows 10, in Device Manager, update the drivers of the Network Card.
Enter in the Properties of the Network Card -> Power Management: disable all the properties.
Enter in the BIOS/UEFI of the PC.
Search and change the properties as follows:

PCI-Express Native Power Management - Disabled
Intel Lan Controller - Enabled
Intel PXE OPROM - Disabled
Power-On by PCI-E - Disabled

Apply the changes and restart the PC.

Now everything should work also on Ubuntu.


The issue is due to the AppArmor profile of Evince, which restricts the file resources available to Evince.

Because TexLive fonts are made available to the system, they might get picked up by Evince under certain circumstances (on my system, there is a rule defined in /etc/fonts/conf.avail/30-metric-aliases.conf which binds "Tex Gyre Heros" and "Helvetica". Because I don't have the Helvetica font installed, Tex Gyre Heros gets picked up by fontconfig instead).

The error message is somewhat misleading, but if you looked at the kernel logs (type dmesg in the console, or tail -f /var/log/syslog), you would see error messages such as:

[345695.334701] type=1400 audit(1462672575.673:72990): apparmor="DENIED" operation="open" profile="/usr/bin/evince" name="/usr/local/texlive/2015/texmf-dist/fonts/opentype/public/tex-gyre/texgyreheros-regular.otf" pid=31050 comm="EvJobScheduler" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0

To give Evince read access permissions to your TexLive fonts, you can add the following rule in the file /etc/apparmor.d/local/usr.bin.evince:

/usr/local/texlive/**/public/** r,

Save the file and reload the rule by issuing (in a terminal):

sudo service apparmor reload

and quit any open instance of Evince. The next time you open your PDF file in Evince, it should display your PDF correctly, having access to the needed fonts.


I can recommend to install Kazam from repositories (available since 14.04 LTS as version 1.4.4) with all dependencies by the commands below:

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

and then test it.

If its functionality is not enough, then try to use your source-based version. It will start normally as all dependencies were installed.


I suggest you blacklist and unload the driver for the internal device:

sudo -i
echo "blacklist wl"  >>  /etc/modprobe.d/blacklist.conf
modprobe -r wl
exit

Then fix the USB as described here: NETIS WF2120 Wifi Adapter Drops Signal Within Seconds


How to publish my project on the software center?

Go here : https://myapps.developer.ubuntu.com/dev/agreements/new/?next=/dev/apps/new/

Then it will redirect you into : https://myapps.developer.ubuntu.com/dev/apps/new/

Then fill those details & its easy process.


You could try this:

inkscape yourFile.pdf --export-plain-svg=yourFile.svg

It will take the first page of the PDF and all the default import
options.

You could also try pdf2svg to export svg file from pdf.

pdf2svg <input.pdf> <output.svg> [<pdf page no. or "all" >]


Poor System performance on my machine running Ubuntu 12.04(Beta 2 updated to the present moment)

You have used 3 different versions of 11.10 and now you move to 12.04 with the same result. This may be telling you something. I don't know of all the variables here and don't intend to diagnose your hardware issues.

I would suggest however, that if your computer's performance level was satisfactory using 11.04 move back to it. Not all hardware and configurations are the same on each and every computer therefore not every computer will react the same to the installed OS.

This link about about system configurations and how to improve performance should help.


After digging many sites now I have solved the problem with the following commands in terminal. Hope this may help someone who is having the same error message.

1. sudo rm /var/lib/apt/lists/* -vf
2. sudo apt-get update
3. sudo apt-get upgrade


How to get the revision history of a branch with bzrlib

I've now found out how to do it. I'm adding code to check out a local copy of the branch, although not strictly necessary (the revision info can be read from a checked-out, local copy directly). The important bits are the all_revision_ids(), get_revisions() and get_apparent_authors() methods.

import os
from bzrlib.branch import Branch
from bzrlib.plugin import load_plugins

# The location on your file system where you want to check out
# the branch to get revisions for
local_path = '/path/to/local/checkout'

# The name of the project you want to get the branch from
project_name = 'launchpad-project-name'

# Load the bzr plugins - the "launchpad" plugin
# provides support for the "lp:" shortcut
load_plugins()

remote_branch_url = 'lp:{0}'.format(project_name)
remote_branch = Branch.open(remote_branch_url)

# Check out and get an instance of the branch
local_branch = remote_branch.bzrdir.sprout(
                   os.path.join(local_path,
                   project_name)).open_branch()

# Get all revisions from the branch
all_revision_ids = local_branch.repository.get_revisions(
    local_branch.repository.all_revision_ids())

# Set up a set of unique author names
authors = set()

# Iterate all revisions and get the list of authors
# without duplicates
for revision in all_revision_ids:
    for author in revision.get_apparent_authors():
        authors.add(author)

print 'Authors:', authors


How to theme gnome.shell calendar panel button

The style_class for this particular field is #panel .clock-display

examples:

#panel .clock-display { color: yellow; text-align: center; font-size: 11pt; }

#panel .clock-display { color: yellow; text-align: center; font-size: 20pt; }

#panel .clock-display { color: magenta; text-align: center; font-size: 10pt; }

In my opinion and after several attempts,

since 1st line & 2nd line are from Clock Override Extension..
the alteration you are looking for 1st line & 2nd line is not possible unless this extension or gnome-shell system files are edited to match to separate those two lines.


If you are getting fast speed in the browser and only slow speed for installing packages, the network mirror might be having a problem.
You can use netselect package, as it guarantees the fastest mirror selection.

The netselect package is not available within Ubuntu's standard repository by default, so we will need to download it from Debian stable repository. So, run these commands

wget http://ftp.ru.debian.org/debian/pool/main/n/netselect/netselect_0.3.ds1-26_amd64.deb
sudo dpkg -i netselect_0.3.ds1-26_amd64.deb

Once you have the netselect command available on your Ubuntu system use it to locate the fastest mirror based on the lowest ICMP latency. The netselect output will be relative to your location. The output will show the top 20 apt Ubuntu mirrors ( if available ):

sudo netselect -s 20 -t 40 $(wget -qO - mirrors.ubuntu.com/mirrors.txt)

Manually alter your /etc/apt/sources.list file to reflect the above netselect results

sudo nano /etc/apt/sources.list

or use sed command, where the lower score number on the left represents a higher mirror transfer rate. Example:

sudo sed -i 's/http:\/\/us.archive.ubuntu.com\/ubuntu\//http:\/\/ubuntu.uberglobalmirror


Copy over a large number of files with new names

The following script should get the job done. Try it and when you are satisfied with the results, remove the comment # in front of cp -p "$oldpath""$f9" "$newpath""$new" to do the actual job.

The script will create a file in your home directory called ls_file.txt. This file is needed to store the output of the ls -l "$oldpath" command and the script will need to read from it during execution. After the script finishes executing, the ls_file.txt file is no longer needed and you can delete it.

Always back up

To create and use the script file, please follow these steps:

Create and edit the script file in your home directory by running the following command in the terminal:

nano ~/my_script.sh
Copy and paste the following code into the editor changing /full/path/to/old/directory/ with the full path to your /dir1 directory and /full/path/to/new/directory/ to the full path to your /dir2 directory:

#!/bin/bash

oldpath="/full/path/to/old/directory/"
newpath="/full/path/to/new/directory/"

ls -l "$oldpath" > "ls_file.txt"

while read f1 f2 f3 f4 f5 f6 f7 f8 f9
                do
                        mod="${f6}${f7}${f8}"
                        mod2=$(echo "$mod" | tr -d ' :')
                        name="${f9%.*}"
                        ext="${f9##*.}"
                        new="$f3""_""$name""_""$mod2"".""$ext"
                        echo "$f9"" ---> Will be renamed ---> ""$new"
                        echo "----------------------------"
#                       cp -p "$oldpath""$f9" "$newpath""$new"
                done < "ls_file.txt"

Save the script file and exit the editor by pressing Ctrl + X then press Y.
Make the script file executable by running the following command in the terminal:

chmod +x ~/my_script.sh
Run the script by running the following command in the terminal:

bash ~/my_script.sh

Done

How it works?

Running the script from my home directory on a test directory dir1/ which contains one file file.txt and a test directory dir2/ which is empty while specifying oldpath="/home/raffa/test/dir1/" and newpath="/home/raffa/test/dir2/", the following process is an example of how the script works:

The command ls -l /home/raffa/test/dir1/ is executed and the output is written to a file named ls_file.txt which will then contain the attributes and the names of the files in dir1/ in this case one file file.txt like so:

-rw-r--r-- 1 raffa raffa 0 Jan 25 19:49 file.txt

-rw-r--r-- is the file mode.
1 is the number of links.
The first raffa is the name of the owner.
The second raffa is the name of the group.
0 is the file size.
Jan 25 19:49 (three fields) is the date and time of the last modification.
file.txt is the name of the file.

.
 2. The script will read the contents of dir1/ from ls_file.txt line by line and split each line into fields (nine in total) and assign the value of each field to a variable f1 f2 f3 f4 f5 f6 f7 f8 f9.

mod="${f6}${f7}${f8}" will assign the last modification date and time stored in the variables f6 f7 f8 to the variable mod so it will contain a value like so:

Jan2519:49

mod2=$(echo "$mod" | tr -d ' :') will take the value of the variable $mod, delete any spaces and colons : and assign it to the variable mod2 so it will contain a value like so:

Jan251949

name="${f9%.*}" will assign the file name without the extension to the variable name so it will contain a value like so:

file

ext="${f9##*.}" will assign the file extension without the name to the variable ext so it will contain a value like so:

txt

new="$f3""_""$name""_""$mod2"".""$ext" will format the new file name as owner_name_lastmodified.extension and assign it to the variable new so it will contain a value like so:

raffa_file_Jan251949.txt

cp -p "$oldpath""$f9" "$newpath""$new" will copy the original file file.txt from dir1/ to dir2/ renaming it to raffa_file_Jan251949.txt and will try to preserve the original attributes of the file during this process, so it will execute like so:

cp -p /home/raffa/test/dir1/file.txt /home/raffa/test/dir2/raffa_file_Jan251949.txt

This process will be repeated for all the files in dir1/ with any extension.

Another time format:

If you prefer the last modification date and time format to be like this 20200125133815 where 2020 is the year and 01 is the month and 25 is the day and 13 is the hour in 24 format and 38 is the minutes and 15 is the seconds so your copied filenames will look like this raffa_file_20200125133815.txt, then please replace the script code above with the following code:

#!/bin/bash

oldpath="/full/path/to/old/directory/"
newpath="/full/path/to/new/directory/"

ls -l --time-style="+%Y%m%d%H%M%S" "$oldpath" > "ls_file.txt"

while read f1 f2 f3 f4 f5 f6 f7
                do
                        mod="${f6}"
                        name="${f7%.*}"
                        ext="${f7##*.}"
                        new="$f3""_""$name""_""$mod"".""$ext"
                        echo "$f7"" ---> Will be renamed ---> ""$new"
                        echo "----------------------------"
#                       cp -p "$oldpath""$f7" "$newpath""$new"
                done < "ls_file.txt"

Notice:

In some cases parsing the output of ls might be better avoided.


How to make ubuntu alert me visually when the battery is critical?

Your NotifyOSD may be corrupted or set to do-not-disturb mode for some reason.

You can reinstall it by entering this command in the terminal:

sudo apt-get --reinstall install libnotify-bin notify-osd

Restart your system and from now on You'll get notifications when the battery is running out of power.


Setting up teska K40 withATI radeon. End up with black screen while installation on ubuntu 14.04

I managed to setup with slight modification of above instructions which I got in this nvidia forum 1

While installing NVIDIA drivers nvidia-libgl(or nvidia-gl) overwrites mesa-libgl. This results AMD GPU based GUI to broke. In order to prevent this I installed nvidia with --no-opengl-files option.

sudo ./NVIDI* --no-opengl-files

However later when installing cuda I couldn't install CUDA samples. Because It could not find libGLU.so and libGL.so.

Installing libglu1-mesa
Making symbolic link.
Reinstalling nvidia drivers

didn't solve the issue.

I just ignored installing CUDA samples since I successfully run Caffe examples on GPU which required CUDA.


It makes no real difference if you use the alternate or server iso.
IMHO is the only difference between desktop and server installation the set of installed packages. Since 2011(?) the special server kernel is dropped.
To install an ubuntu system with LVM you have to take attention at the partitioning step in the installer. This is the point where you introduce your LVM configuration selecting pysical volumnes, volumne group and logical volumnes.
After creating this assets you continue in the usual way assigning the logical volumnes in the same way as a traditional partition to a mountpoint.
As a little trick it can be useful to switch from the installer to the shell and invoke the necessary LVM commands inside the shell (e.g. copy&paste from your note-book).
Recomendation
No Server without underlying mdraid below the LVM layer.
This will be a significant improvement to the data security (raid 1,5 or 6 assumed).


Backlight will not dim using function key

You are running a Samsung notebook, so probably you can fix all (depending on model) function keys by installing the samsung-tools package from http://www.voria.org/forum/

EDIT: here are more specific instructions.


.xpi files are just zip files,you can create it using the zip command.

i.e zip /path/to/foo.xpi file1 file2 file3

See the extension packaging guide here.


You can upgrade an Ubuntu release only to its successor:

For normal releases, this means the next release, whichever it may be. For 13.04, that would be 13.10.
For LTS Releases, this has two meanings: the normal release following it, and the next LTS release. So Ubuntu 12.04 can be upgraded to 12.10 or 14.04.

Ubuntu 13.04 cannot be upgraded to 14.04 directly. That's why the installer has greyed out the upgrade option. It will have to be upgraded to 13.10, and then upgraded to 14.04.


Changing first day of week using GUI in Unity

Setting this at the system level should also affect the calendar in Unity.


As @Allan commented, this is pretty large question. Therefore, I'll give rather short answers.

Hardware

It depends how you are going to stream it. If you mean just sharing files, then almost anything with big enough hard disks. If you want to stream HD movies, then you'll need plenty of power.

As of wireless: either you'll need wireless card (PCI or USB), or if you can connect it to your wireless access point, then just cables.

Tutorials

Google is your friend. For example

http://www.makeuseof.com/tag/using-your-linux-computer-as-a-media-center-part-1/
http://www.makeuseof.com/tag/5-great-linux-media-cente-distributions-transform-tv/

Security

General rules apply. Use secure passwords. Keep your software up-to-date. Do not allow random computers to your LAN (use WPA for wi-fi and so on). If you want it to be really more secure, you can use IPSec to encrypt connections between devices. However, most probably that's quite big overkill.

Emails

You can setup for example postfix and dovecot to allow IMAP access from other computers. You can found tutorials for this for example from here. If you need specific help with setting up email server, add separate question. If you don't have really huge amount of emails (talk about hundred gigabyte or so), then common hardware can handle it easily.


How to boot to the recovery mode if it is not listed in Grub?

The instruction Remove existing kernel options from the linux line and add single refers to changing the line

linux /boot/vmlinuz-3.5.0-26-generic root=<uuid> ro ipv6.disable=1 quirt splash $vt_handoff

to

linux /boot/vmlinuz-3.5.0-26-generic root=<uuid> single

which will boot up and show a text-mode terminal with root permissions ("single-user mode") from which fixes can be made.

The Ubuntu recovery mode is entered by setting linux options thusly:

linux /boot/vmlinuz-3.5.0-26-generic root=<uuid> ro recovery nomodeset

This provides a menu which automates some common system fixes, or lets you access a root shell as the single option would.


Run the below commands to keep only Gnome-Classic session and remove other sessions completely..

sudo apt purge gnome-session
sudo apt purge ubuntu-session
sudo apt autoremove && sudo apt autoclean
sudo apt install ubuntu-desktop

Still you will have Ubuntu and Ubuntu on wayland entries along with gnome-classic..
those things can be removed manually..

the sessions are stored in /usr/share/xsessions/ and /usr/share/wayland-sessions/ but removing them manually is not suggested as some other dependent files will still be there in other folders.

i have manually deleted the files just to let you know the situation but it is not recommended..

in the above pic there is no gear-icon meaning i have only one session..


You have mpltoolkits.basemap installed for Python 3.
Are you using Python 2 to run your program?
Make sure you type
python3 <filename>


Copy directory from a USB drive to another USB drive fails

Copy at the file level

You should copy between the mountpoints

cp -pr /media/ubuntu/rootfs/max7219 /media/ubuntu/rootfs1/

or if you need elevated permissions to write

sudo cp -pr /media/ubuntu/rootfs/max7219 /media/ubuntu/rootfs1/

The prefixes /dev/sdb2 /dev/sdc2 should be removed.

Clone at the partition level

If you clone, you should use the device names of the partitions (but then there should be no file paths)

sudo cp /dev/sdb2 /dev/sdc2

But this is a very risky operation, because a minor typing error can make you overwrite valuable data in some other partition.


Is it possible to define a list in the terminal?

You can also use array; the simplest method of creating an array variable is to assign a value to one of its indices:

TEST[0]=zero
TEST[1]=one
TEST[2]=two

or, with:

TEST=(zero one two)

now, you access it as follows:

${TEST[index]}

ie

echo "First Index: ${TEST[0]}"

or you can access all the items in an array in one of the following ways:

${TEST[*]}
${TEST[@]}

For more help, read this usefull guide


Wifi driver is not installing and wifi is not working

You can try opening "Software Sources", or "Software and Updates" from the dash. Then, go to the "Additional Drivers" or "Proprietary Drivers" tab, and see if you can enable the driver your wireless card there.

If that doesn't work, try installing the appropriate driver for your computer's wireless card from the list here http://wireless.kernel.org/en/users/Drivers.


Ubuntu Desktop 20.04 shutdown from GUI doesn't work

Try this:
sudo poweroff

This should work.


Uninstalled Postgres but still staus shows output

You probably did not stop progress before you removed it.

Find the process using ps -ef | grep postgres  to confirm it is still running. Then kill it with kill -9 {process_id} or pkill -9 postgres.


We have 2 types of drivers:

Generic
3rd party

The generic drivers are used to install your system and generally are enough to get daily tasks done.

For high graphics usage,  gaming, you probably need the 3rd party driver.

All 3rd party drivers that have been tested and are deemed working are installable from the 'additional drivers' option.

If you then still have issues I'd advice to start looking at the logs and look for errors. Other drivers are probably not what you need. Or .... there are likely no better drivers other than you already can install.

Also: AMD is working on new drivers for linux. Users with an AMD card are advised to stick with 14.04. If yours is an AMD, consider downgrading.


I fixed it by running dejadup from a live USB and restoring the backup like that. Worked perfectly


It sounds like the JPEG files in question are actually corrupt: they aren't valid JPEG files.

You'd want to troubleshoot more by trying it on a different computer, in a different (micro) SD card reader. If the problem persists, then I'd say the card is at fault, and you should probably get a new card.  If other cards work in the card reader, then there is likely no problem with the card reader.

You can try using Photorec (the file recovery software) to recover more photos from the card but in the case you describe it's unlikely to be useful, as it sounds like the operating system can see all the files in the directory, it's just that some are corrupted.


Ubuntu Linux Parted Error: Input/output error during write on /dev/sde

If it is a physical disk, either it's failing or mounted read-only. If it's a virtual disk, it's most likely read-only.


Gnome 3.10 doesn't show login, Ubuntu 13.10

(re)install gdm:

sudo apt-get install gdm

and choose gdm, works for me.
Best, R.


Mounting HFS+ drive on Ubuntu Server 16.04?

That filesystem driver doesn't seem to be installed in certain Ubuntu Server base images, particularly the kind you might get from SoftLayer or another VPS/cloud provider. To install HFS+ plus a bunch of other goodies, install the linux-image-extra package:

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

Much of the modules in this package will be unnecessary for VMs (e.g., USB device drivers). It's really a shame that they're packaged together with filesystem drivers, but oh well!


Need for gksudo for "Install new software" in eclipse

This is no longer the case if you install from repository.  Tested on 12.04 LTS Beta.

See this question with screenshots for verification.


As it turned out, this is a bug issue with kernal 5.3.0.53 (seems 52+ are affected) in amd64 processor (Ryzen) systems with integrated graphics.

For detailed information, see Failing to shutdown/power off or reboot on AMD Ryzen CPUs on kernel versions 5.3.0-52 and later

Looks like it will be fixed in the next kernal release. For now I am using 5.3.0.51 which works correctly.

--UPDATE--

This has been fixed as of 5.3.0-59


remote desktop through xtightvncviewer share clipboard

In the menu you get when you press F8 you can select to copy the clipboard from one to the other and vice-versa.


What are the reasons to have strong password at home?

Not a lot. A threat might be a malicious website that installs software on your system that includes something that probes for your sudo password and sends it out to the world. But modern browser will prompt you if something tries to install software. And the average Linux user tends to be more informed than the average Windows users. Plus there is also the idea that we should know where to go and where not to go. In general Linux users do not download from random websites. We use the repositories and can assume these are safe.

Addition: if you want to convert users to Linux there is one thing you should teach these users. Force them to use the Ubuntu software center and warn them not to search for installation files on the web. The biggest reason for virusses on windows is the fact of visiting nasty websites and downloading malicious installation files. Using Ubuntu software center will reduce that risk a lot.

Just an idea: the one big threat we have is when someone manages to install corrupted software into the Ubuntu repositories. If someone gets something malicous accepted into the repositories like an altered chrome or firefox we are all screwed. Is that likely to happen? Naaa.

Even running local services would not matter. A local webserver with no outside connection enabled (ie. running on localhost) will be safe. Only if you run it not local you will be taking a risk: the scripts created to run your website might be flawed. But I would not call that a home computer anymore.

Your 1st and best safeguard on a home system is your router.

And if you are scared it is always the better option to make regular backups where you detach that harddisk from your system when not making backups.

If an attacker has physical access you are in trouble on a normal system. 1 reboot into a live dvd and your sudo password can be changed. Encrypting the disk would be an option. But that will not prevent a formatting.


Accidentally deleted many system folders and files

Quite honestly - reinstallation will be probably your easiest and quickest option. You can do that without re-formatting partitions, which may prevent your current data (or what's left of it)

For the beginning anyway use LiveCD maybe and backup whatever's left from your important stuff.

You can try recovery mode and run some actions, maybe apt-get reinstall will help you - but if you're not really sure what's been exactly removed, that may not be your easiest solution.


External monitors randomly stopped working together this morning

Working together, we (the OP and I) discovered that the issue lay in user configs, since both guest user and new test user accounts worked normally, but the original account still failed to work.  Removing the .Xauthority file did not fix the issue.

Finally, it was suggested that the OP try to find files in the .config user folder which had been modified recently using something along the lines of:

find -cmin -1000

...using the number of minutes the OP suspected the file had been corrupted for instead of 1000.  Doing so showed few suspicious files except a file called monitors.xml.  Opening the file, there was nothing which aroused particular suspicion, but on the chance, the OP renamed the file and restarted the computer.

The problem is totally resolved.


More wifi issues - Qualcomm Atheros QCA6174 ath10k_pci

I think you may be suffering from a couple different issues.  I want you to reinstall the Ubuntu package linux-firmware as that may be more up to date than kvallo's github site

sudo apt-get install --reinstall linux-firmware

A recent change to network manager enables wifi powersave by default, to disable this do

sudo sed -i 's/wifi.powersave = 3/wifi.powersave = 2/' /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf

Reboot


How do I change the date language in the terminal?

I'm assuming, from another question by you, that you're using Kubuntu 19.10. (This is somewhat important because some settings move around from one version to another.)

In Kubuntu 19.10 with the kubuntu-backports ppa installed, I'm on

Operating System: Kubuntu 19.10
KDE Plasma Version: 5.17.2
KDE Frameworks Version: 5.62.0
Qt Version: 5.12.4

In this system, open System Settings > Regional Settings, and click on the Formats icon in the left panel. In the image below, I chose a time format setting for Malta from the dropdown next to Time, logged out and logged in again. On opening konsole, I see this

To change to something else, I just go through the process again, log out and log back in:

One point to note is that just because you see something in the dropdown (in System Settings > Regional Settings) and can apparently choose it, that doesn't mean it's actually available.

To get mt_MT.utf8 on my system, I had to "uncomment" the relevant entry in /etc/locale.gen and then run sudo locale-gen.


(Dual monitors) Indicators displaying in panel on both monitors

Unfortunately I think this is classed as a feature in Unity. I personally don't like it either.

You can 'affects me also' or add your opinion to launchpad bug 754337


I'm not sure if that is what you want. But if you want to change your keyboard layout using Alt+Shift then you could go about it this way:

Go to "Keyboard Preferences" either using the keyboard indicator or dash. Than select the "Layout" pane. There click "Options" which will open the "Keyboard Layout Options". Under "Key(s) to change layout" you can check the box next to your desired shortcut.

I think this is outdated, but maybe worth a tray:

# In /etc/X11/xorg.conf

Section "InputDevice"
    Identifier      "Keyboard"
    Option          "XkbModel"      "pc105"
    Option          "XkbLayout"     "us,de" # de stand for german, replace this with your layout!
    Option          "XkbOptions"    "grp:alt_shift_toggle,lv3:ralt_switch"
EndSection

Edit:
As stated in the comments: I didn't have a Greek keyboard layout in his layout list and had to add it like this:


Music player that sorts by date modified

There's no GUI program that I know of but you can sort your files on command line, put them in a list and give that list to a music player.

cd ~/Music
ls -t > MyMusic.txt
mpv --playlist=MyMusic.txt

ls -rt will sort it by oldest first.


Ubuntu 12.04 x86 inside vmware workstation 8

No, it shouldn't take that long unless your internet connection has dropped (which is hasn't because you're posting here).  So I would start over from scratch, chances are it'll work fine this time.


First use sudo apt-get update command before using sudo apt-get install software-center. If it still shows the same error, try to enable the main component of Ubuntu official repository. Get help from this similar question How do I enable the "Universe" repository?

Though the main part should always be enabled.


where or how to compile or download libzdb-devel

To get a libzdb-dev which works on Ubuntu, please add this repository by adding this line to the end of your /etc/apt/sources.list file:

deb http://debian.nfgd.net/debian unstable main

This only has zdb packages, so it shouldn't mess up anything else.

Then, run sudo apt-get update && sudo apt-get install libzdb-dev.

(Source)


After that you have to configure your server for SVN.

Server Configuration

This step assumes you have installed above mentioned packages on your system. This section explains how to create SVN repository and access the project.

Create SVN Repository

There are several typical places to put a Subversion repository; most common places are: /srv/svn, /usr/local/svn and /home/svn. For clarity's sake, we'll assume we are putting the Subversion repository in /home/svn, and your project's name is simply 'myproject'

There are also several common ways to set permissions on your repository. However, this area is the most common source of errors in installation, so we will cover it thoroughly. Typically, you should choose to create a new group called 'subversion' that will own the repository directory. To do this

Choose System > Administration > Users and Groups from your Ubuntu menu.
Click the 'Manage Groups' button.
Click the 'Add' button.
Name the group 'subversion'
Add yourself and www-data (the Apache user) as users to this group

(Note: in order to see www-data you may need to see FixShowAllUsers)
Click 'OK', then click 'Close' twice to commit your changes and exit the app.

You have to logout and login again before you are a member of the subversion group, and can do check ins.

Now issue the following commands:

   $ sudo mkdir /home/svn
   $ cd /home/svn
   $ sudo mkdir myproject

The SVN repository can be created using the following command:

   $ sudo svnadmin create /home/svn/myproject

And use the following commands to correct file permissions:

   $ cd /home/svn
   $ sudo chown -R www-data:subversion myproject
   $ sudo chmod -R g+rws myproject

The last command sets gid for proper permissions on all new files added to your Subversion repository.

If you want to use WebDAV as an access method described below, repeat the chmod -R g+rws myproject command again. This is because svnadmin will create directories and files without group write access. This is no problem for read only access or using the custom svn protocol but when Apache tries to commit changes to the repository linux will deny it access. Also the owner and group are set as root. This can be changed by repeating the chown and chgrp commands listed above.

Credit goes to Ubuntu-Community

for more information : subversion

information about adding users/groups : Ubuntu -Community


The wireless internet does not work and the internet driver does not update

What is your wireless card name details

You can find by running this

sudo lshw

Mostly default drivers should work , which driver you trying to install manually

System Settings > Software and Update > Additional drivers
Does it show any options for additional drivers?


You need to start nautilus -n process. Desktop icons are managed by file manager, openbox provides only windows.  If you want to spawn that command on startup, follow instructions as explained in openbox documentation.

You'll need to have ~/.config/openbox/autostart file.
Basically you can run:

$ printf "nautilus -n &\n" >> .config/openbox/autostart

After that you can just copy /usr/share/applications/google-chrome.desktop to your desktop folder, log out and log back in - and you're done.


The way it's supposed to work is as follows:

In the Edit menu, select Preferences, click the Plugins tab, and select Piwigo.  Hit close.
Select the photo(s) you want to publish.
Click Publish.  Select Piwigo in the combo box at the top of the dialog, type in the details (URL, username, password) and click Login.

From there the publishing dialog should offer options to upload the photos.

(Note that this is entirely handled within Shotwell; Ubuntu Online Accounts does not support Piwigo.)

Does this help?  Or do any of these steps not work as expected?


Try this.  Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below.

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

And then try installing again.

If the above doesn't help, you can always install Adobe flash using:

sudo apt-add-repository "deb http://archive.canonical.com/ $(lsb_release -sc) partner"
sudo apt-get update && sudo apt-get install flashplugin-installer

Source:Install Adobe Flash


How to delete "blank links"/"dead links" from Dash search?

You can use Main Menu (alacarte). To install it you can search for alacarte in Ubuntu Software Center or from the command line with:

sudo apt-get install alacarte

After installing it, look for "alacarte" or "Main Menu" on Dash, the following window will open:

Select an item to remove
Click on "Delete" to remove the item and click close.


Solved: in /usr/local/lib was a second set of libva and i965 drivers. After deleting /usr/local/lib, problem was solved.


You need to compile your program before you can run it. To do this, you'll need a C compiler, like gcc. You can install this with:

sudo apt-get install gcc

Then, to compile your program, creating an executable called file:

gcc -Wall -o file file.c

Which you should then be able to run:

./file


Due to the lack of memory and processing power of the chromebooks, it is probably closing kde to save you memory. You can start it again using the command sudo startkde.

I'm not  100% sure how chromebooks handles crouton and I know that this might not be the ideal answer but I hope that this will at least help you get back to your desktop without having to restart it.


Gtk3+ keyboard shortcuts without signal matching

Instead of using accelerators, you can connect the key-press-event signal of your TreeView to a function and check if it was the Delete key that was pressed.

def on_treeview_key_press_event(self, widget, event):
    key = Gdk.keyval_name(event.keyval)
    if key == 'Delete':
        self.remove_items()


Problems to login in Ubuntu 14.04 after new update (Friday)

Sorry, I cannot comment your question (not enough reputation point) and this is not a complete answer.

I have the exact same problem. It seems related to nvidia driver update (when reinstalling nvidia-driver you can see an error for not finding systemctl that might explain the issue).

I uninstalled all nvidia package with:

sudo apt-get remove -purge nvidia*

It allows me to login again, but of course I do use only the Intel graphic driver.

Any solution to get back the ability to switch between Intel and Nvidia would be welcome ;-)


Files such as the Portable Document Format (PDF), images, audio and video files the metadata you are interested in  can be viewed by right clicking the file, click properties and then click on the relevant tab to see the kind of metadata you asked about.

For PDFs click the Document tab

For images click the Image tab

For audio click the Audio tab

For video click the Audio/Video tab

For some Office documents you will not be able to view the kind of metadata you asked about by right clicking, you can install the utility called extract from the repositories and and run it from the command line, the metadata, if any is contained in the file, will be displayed in your terminal.

Example for using the  extract utility:

I have an OpenOffice.org spreadsheet called 555.ods,
From the directory where the file is located I run;

extract 555.ods

The result below is the metadata in the file printed to stdout.

keywords - Electronics
subject - Electronics Engineering
title - 555 Timer Calculations
creator - Shabaka Sellasie
date - 2011-03-03T00:48:04
creation date - 2006-03-03T00:48:02
software - OpenOffice.org/3.2$Linux OpenOffice.org_project/320m19$Build-9505
mimetype - application/vnd.oasis.opendocument.spreadsheet

Currently, libextractor supports the following formats: HTML, PDF, PS, OLE2
(DOC, XLS, PPT), OpenOffice (sxw), StarOffice (sdw), DVI, MAN, MP3 (ID3v1 and
ID3v2), OGG, WAV, EXIV2, JPEG, GIF, PNG, TIFF, DEB, RPM, TAR(.GZ), ZIP, ELF,
REAL, RIFF (AVI), MPEG, QT and ASF.

  you can install the utility called extract

This is a simple Nautilus script that invokes extract and displays the result with zenity, then with a right-click I can get that info. If you want, the script I wrote is this (please note that I'm not sure that the line "IFS=$'\n'" is actually required, a bash expert could comment on that)

#!/bin/bash
for item ; do
   echo "$item"
   /usr/bin/extract "$item"
   echo
done | zenity --text-info --title="extract" --width=300 --height=600


lubuntu won't display on both monitors at the same time

I actually got this to work using the proprietary drivers

sudo apt-get install figlrx
sudo aticonfig --initial
sudo reboot now

monitors work fine now


search and replace inconsistency between vim and sed

sed and vim are not related (well sort of, but it's far out). Their substitution commands are similar, but far from identical. Both of them use basic regular expressions, but vim has its extensions for it, and GNU sed has other extensions for it.

\d matches a digit in vim, in GNU sed it matches a d. To match a digit in sed, use [[:digit:]] or [0-9] (and those will also work in vim).

\+ is also an extension in both vim and GNU sed. The standard way to match one or more is to use \{1,\} instead.


Cron not working, although the command works

Are you sure cron is not working? If you add a line like

 */1 * * * * touch /tmp/foobar123

to your crontab, then does the file appear in /tmp?

If that file won't appear after a minute or so, then

ps auxw | grep cron

or

sudo service cron status

If cron is not running, then try to start it with

sudo service cron start

But I guess the problem with your command above is, that gsettings needs to have its environment set up correctly in order to run, which it probably does not have, when run from cron.


What application do the same what shazam or soundhound does on android?

OK so it is a little bit of a hack.

First go to:

Directly to the flash program on the Midomi site

This will be annoying probably because you cant click on the accept microphone button because adobe is annoying. Using Tab you can move around but it still doesn't seem to let you allow with Enter. So enter on the "?". Adobe flash player has seen you have interacted with this dialogue.
Now go to the settings manager page of the Adobe site

The picture is not a picture but settings. This one works and you can tell it to always allow midomi. This should be here because of using midomi before. (If not play with the stupid broken dialoge on the midomi site 1-2 more times then restart firefox). Once you have selected Allow for midomi on the Adobe page restart firefox and fo back to the flash program and it should work!


Ubuntu 14.04 freezes when I watch movies online.

If that happens both in Ubuntu and XP it could be a faulty memory module. I would run a memory test (from GRUB) for a few hours, to see if it finds anything...


Sony Vaio PCG-71315L "Wireless is disabled by hardware switch" Help!

If Windows is installed along Ubuntu, try login into Windows and switch in that OS.
In an occasion I switch off wifi in Windows and it locked the hardware switch in Ubuntu.


Odd. Try running this instead:

sudo su
sudo mkdir -p /users/testing

If you are trying to add an account, you can just open User Accounts and add an account from there.


One of many answers to your question is dbus.


Cannot update Intel G31/G33 Graphics Controller

PARTIAL SUCCESS: I opened "Activities", typed in "Displays", clicked on "Color", clicked on "Default Monitor", clicked on "Add Profile" at the bottom of the menu. On the drop-down list was Samsung SyncMaster. And I just happened to have an older Samsung SyncMaster monitor. I put a checkmark on that option. And I was able to get that monitor to work in the right resolution (1280 X 1024). :)   The 1280 X 1024 option even showed up in the "Displays" menu :)  The first monitor still will not start with the right resolution, but if I start the computer with the Samsung monitor, then switch the cable to the other monitor, it will also work in the right resolution. However, I still must boot-up the computer from the recovery menu in GRUB. It's after midnight. I'm going home.


Problems with Steam on Ubuntu 16.04 32-bit

That version of steam must be horrendously outdated. Are you sure that you cannot access the steam download page? The download is here. After that, open up the Downloads folder and rename the file to "steam.deb" or something like that. Press CTRL+ALT+T and type cd Downloads

After that, type the following:

sudo dpkg -i steam.deb

Or whatever you named it.
Steam should be installed. If it says that steam is already installed, enter sudo apt purge steam* and it should uninstall the previous version of steam. If this does not fix your problem, there is probably something wrong with steam itself.


Another question about Netflix on Ubuntu

I hate to be a buzz-kill but spoofing DRM is illegal. Have you tried the netflix-desktop app? It's a specialized version of wine made just to run netflix/silverlight.

http://www.iheartubuntu.com/2012/11/ppa-for-netflix-desktop-app.html


AMD had decided to use AMDGPU-Pro drivers now (fglrx is done). From the official AMD site:
Do a system update:

sudo apt update
sudo apt dist-upgrade
sudo reboot

Once you reboot, now check if you have the 'latest' AMDGPU-Pro driver installed:

dpkg -l amdgpu-pro

It could be that you already have the AMDGPU-Pro driver installed. If it says no packages found, then it's not installed. Then go to the site I linked and follow the instructions to install the latest AMDGPU-Pro package as described there.
There might also be an issue with your CPU downclocking to save energy. That can at times have a performance degrading effect.


You could try using PulseAudio. Simply install pavucontrol package and then play with volume levels through the settings menu of the regular volume control in the panel.


How do I set Nautilus/Files view preferences?

People trying Ubuntu for the first time, or switching from another flavour, may not realise, or may have forgotten (as I had) that in 18.04 the menu items that traditionally appear on the horizontal bar at the top of am application window, appear instead at the left of the top bar of the whole screen. On a multi-monitor setup, this can mean that the menu bar is nowhere near the application window, and seems to be "missing".


If you added it with.

echo "deb https://deb.etcher.io stable etcher" | sudo tee /etc/apt/sources.list.d/balena-etcher.list

Then to remove it you need to append deb also.

sudo add-apt-repository --remove "deb https://deb.etcher.io stable etcher"
sudo rm /etc/apt/sources.list.d/balena-etcher.list
sudo apt update


Conky does not work properly on Ubuntu 16.04 GNOME

I had the same issue lately with conky 1.10.1 on Ubuntu 16.04.1. I did not roll back conky. I fixed the issue by changing the line

own_window_type = 'desktop',

in my .conkyrc to

own_window_type = 'dock',

After all, my .conkyrc for Ubuntu 16.04.1 reads

os.execute("sleep 1")

conky.config = {
    background = true,
    double_buffer = true,
    alignment = 'top_right',
    border_width = 1,
    cpu_avg_samples = 2,
    default_color = 'white',
    default_outline_color = 'black',
    default_shade_color = 'black',
    draw_borders = false,
    draw_graph_borders = true,
    draw_outline = false,
    draw_shades = false,
    net_avg_samples = 2,
    no_buffers = true,
    out_to_console = false,
    out_to_stderr = false,
    extra_newline = false,
    own_window = true,
    own_window_type = 'dock',
    own_window_transparent = false,
    own_window_argb_visual = true,
    own_window_argb_value = 64,
    own_window_colour = 'black',
    own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
    minimum_width = 170, minimum_height = 0,
    stippled_borders = 0,
    update_interval = 2.0,
    uppercase = false,
    use_spacer = 'none',
    show_graph_scale = false,
    show_graph_range = false,
    use_xft = true,
    xftalpha = 0.1,
    font = 'Droid Sans:size=11',
    color0 = 'white',
    color1 = 'EAEAEA',
    color2 = 'FFA300',
    color3 = 'grey'
}

conky.text = [[
${font AvantGardeLTMedium:bold:size=11}${color Tan1}System ${color slate grey}${hr 2}${font}
${color1}Computer name      ${alignr}${color}${nodename}
${color1}Kernel version     ${alignr}${color}${kernel}-${machine}
${color1}CPU frequency      ${alignr}${color}${freq_g}GHz
${color1}Load (average)     ${alignr}${color}${loadavg 1}
${color1}CPU temperature    ${alignr}${color}${acpitemp} degrees Celsius

${if_existing /sys/class/power_supply/BAT0/uevent}${font AvantGardeLTMedium:bold:size=11}${color Tan1}Laptop battery charge ${color slate grey}${hr 2}${font}
${color1}Battery charge     ${alignr}${color}${battery BAT0}${endif}
${if_existing /sys/class/power_supply/BAT1/uevent}${font AvantGardeLTMedium:bold:size=11}${color Tan1}Laptop battery charge ${color slate grey}${hr 2}${font}
${color1}Battery charge     ${alignr}${color}${battery BAT1}${endif}

${font AvantGardeLTMedium:bold:size=11}${color Tan1}Processors ${color slate grey}${hr 2}${font}
${color1}Kernel 1     ${color}${cpu cpu1}%  ${cpubar cpu1}

${font AvantGardeLTMedium:bold:size=11}${color Tan1}Memory (RAM) ${color slate grey}${hr 2}${font}
${color1}Memory free / total ${alignr}${color}${memeasyfree} / ${memmax}
${color1}Now in use   ${color}${memperc}%   ${membar}
${color1}Virtual memory (swap)  ${alignc}${color}${swap} / ${swapmax} ${color}${alignr}${swapperc} %

${font AvantGardeLTMedium:bold:size=11}${color Tan1}File system ${color slate grey}${hr 2}${font}
${color1}Root or /       ${alignc}${color}${fs_used /} / ${fs_size /} ${color}${alignr}${fs_free_perc /} %
${color}${fs_bar 5,300 /}
${color1}Home or /home   ${alignc}${color}${fs_used /home} / ${fs_size /home} ${color}${alignr}${fs_free_perc /home} %
${color}${fs_bar 5,300 /home}

${font AvantGardeLTMedium:bold:size=11}${color Tan1}Wireless network ${color slate grey}${hr 2}${font}
${if_existing /proc/net/route wlp3s0}${color1}Wireless access point ${alignr}${color}${wireless_essid wlp3s0}${endif}
${color1}Signal strength     ${alignr}${color}${wireless_link_qual_perc wlp3s0}   ${wireless_link_bar 10,100 wlp3s0}
${color1}Data traffic down / up   ${alignr}${color}${totaldown wlp3s0}  ${color1}/  ${color}${totalup wlp3s0}
]]

My .conkyrc produces output as follows:


How do I fix "Grub Rescue"? Uninstallation?

(From within rescue mode)

Command: ls

It will list all your drives and partitions, like:

(hd0) (hd0,msdos2) (hd0,msdos1)

If you don't know your Ubuntu boot partition, check them one by one:

ls (hd0,msdos2)/
ls (hd0,msdos1)/

When you hit the right one, you'll get a line mentioning "lost+found" and so on.

Assuming (hd0,msdos2) is the right partition:

set prefix=(hd0,2)/boot/grub
set root=(hd0,2)
insmod normal
normal

Now you'll be able to boot into Ubuntu. Once you do, execute the following commands:

sudo update-grub
sudo grub-install /dev/sda

Voila.


ATI Radeon X1200 Series(RS690M) graphical drivers problem

I have had this same problem with my Toshiba Equium P200D which has the RS690 radeon X1200 chipset and I now have the standard radeon driver to working, 3D and everything no problems.

To fix this I played with the radeon driver settings by adding the radeon-kms.conf file to the /etc/modprobe.d directory. Simply create the aforementioned file with the following entries:

options radeon noaccel=0
options radeon exavsync=0
options radeon colortiling=1
options radeon exapixmaps=1
options radeon enablepageflip=1

Hope this helps somebody else.


How to restore Windows boot option in grub2

Grub2 should be able to find windows using sudo update-grub. If that does not work, maybe your partition table is damaged and you should use a livecd or a tool like super grub disk to recover it.

More info: http://ubuntuforums.org/showthread.php?t=1657134

Edit: You cannot have both OS with different boot system. If one is with EFI/UEFI, the other should be installed using the same system.


Sound hardware is detected but keyboard buttons, panel icon buttons don't work

Here is what i tried...
1. rm -rvf ~/.pulse/

Reboot

No success

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

Run this command
sudo apt-get update;sudo apt-get dist-upgrade; sudo apt-get install linux-sound-base alsa-base alsa-utils gdm ubuntu-desktop  linux-image-uname -r libasound2; sudo apt-get -y --reinstall install linux-sound-base alsa-base alsa-utils gdm ubuntu-desktop  linux-image-uname -r libasound2; killall pulseaudio; rm -r ~/.pulse*; sudo usermod -aG cat /etc/group | grep -e '^pulse:' -e '^audio:' -e '^pulse-access:' -e '^pulse-rt:' -e '^video:' | awk -F: '{print $1}' | tr '\n' ',' | sed 's:,$::g' whoami

as I was having 11.10

Reboot

Guess what.. it worked like ever before :)

Kamal


Alternative for real-time audio program Voice Meeter

It is possible to mix audio in Puseaudio similar to voicemeeter, but not so easy to add noise gate that i know of.

Better to use JACK sound server for mixers and effects.

For mixer that will also host effects try: non-mixer


Configure fingerprint-gui so that it does not ask for fingprint authentification on sudo

This can by done by editing /etc/pam.d/sudo and deleting the line permitting usage of fingerprint-gui:

auth        sufficient  pam_fingerprint-gui.so

This command will do that:

sudo sed -i.bak '/fingerprint-gui/d' /etc/pam.d/sudo


sudo update-grub is not affecting the grub menu

Please try sudo grub-install /dev/sda within terminal and check output.


Home Microserver using Ubuntu and ZFS: about ZFS

Create a striped mirrored zpool (effectively RAID10). If you're on a budget you can also get away with a raidz (effectively RAID5, but safer due to zfs checksums).

ZFS likes lots of RAM so be sure to fill up your server. With four disks you should easily saturate a 1Gbps LAN (sequential reads) and with only two computers on your network your read performance should be fine, but you can also consider getting an SSD for L2ARC (read caching)


How to setup Ubuntu with a web browser, and no pre-installs:

Download Ubuntu 13.04 - Server X86-64
http://releases.ubuntu.com/raring/ubuntu-13.04-server-amd64.iso (or you can download the 32-bit version if you prefer)
Burn the ISO to a DVD
Boot the DVD and begin the installation process
When you get to a list of software to install, choose "manual package selection"
After installing Ubuntu Server, boot it up
In the terminal type: sudo apt-get install xfce4 , this will install xfce desktop environment. If you prefer you can install unity, gnome, kde, mate, or something else.
In the terminal type: sudo apt-get install gdm, this will install gnome display manager (aka your login screen), if you prefer you can install something else, like kdm, or lightdm.
In the terminal type: sudo halt -p, this will shut down the computer
Turn the computer on, and login, now install the web browser you want.

The size will vary depending on which desktop environment and desktop manager you install, but you will be looking around the 2400-2600 MB mark excluding temporary files.

PLEASE NOTE: There will be a few things preinstalled, like a terminal emulator so you can install other programs, and a file manager, but nothing major. You will see a menu entry called web browser, but there is no web browser installed until you install one.

PLEASE NOTE: If you decide to install a desktop environment other than XFCE, make sure the command you use is going to install just the desktop environment and not the full package that includes other recommended software.

PLEASE NOTE: If you prefer to not use the terminal to install software you can install the Ubuntu Software Center by typing: sudo apt-get install software-center.

Source: http://candlelight.any.djun.net/x/1/index.php?topic=586.0