Why does it display "Filesystem root" almost full when I have almost 35GB worth of free space? I tried unzipping a 37MB RAR file, but system says root is full.
I used sudo baobab / to check, and it shows that / takes up 14.1GB. It acknowledges the fact that the free space exists, but it still shows root as full.
I ran sudo du -h in root and it shows 19GB.
I ran sudo df -i and it shows:
Filesystem      Inodes  IUsed   IFree IUse% Mounted on
/dev/sda5      3244032 321772 2922260   10% /

I ran sudo df -h --total and it shows:
Filesystem      Size  Used Avail Use% Mounted on
udev            1.9G     0  1.9G   0% /dev
tmpfs           394M  1.5M  393M   1% /run
/dev/sda5        49G   14G   33G  29% /
tmpfs           2.0G     0  2.0G   0% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           2.0G     0  2.0G   0% /sys/fs/cgroup
/dev/loop0      221M  221M     0 100% /snap/code/63
/dev/loop1      208M  208M     0 100% /snap/code/65
/dev/loop3       99M   99M     0 100% /snap/core/11081
/dev/loop2      100M  100M     0 100% /snap/core/10958
/dev/loop5       56M   56M     0 100% /snap/core18/2066
/dev/loop4       56M   56M     0 100% /snap/core18/1997
/dev/loop6      218M  218M     0 100% /snap/gnome-3-34-1804/60
/dev/loop7      219M  219M     0 100% /snap/gnome-3-34-1804/66
/dev/loop8       65M   65M     0 100% /snap/gtk-common-themes/1514
/dev/loop9       66M   66M     0 100% /snap/gtk-common-themes/1515
/dev/loop11      52M   52M     0 100% /snap/snap-store/518
/dev/loop10      52M   52M     0 100% /snap/snap-store/498
/dev/loop12      33M   33M     0 100% /snap/snapd/11588
/dev/loop13      33M   33M     0 100% /snap/snapd/11841
/dev/sda1       511M  4.0K  511M   1% /boot/efi
tmpfs           394M   60K  394M   1% /run/user/1000
total            58G   15G   40G  27% -

I used xdiskusage in two different ways:
sudo xdiskusage / , which showed 13.11GB, and
sudo xdiskusage and then chose from the graphical interface the disk / is mounted on, which showed 48.6GB, from which 32.94 is (free), 2.49 is (inodes) and the rest is the actual root.
sudo fdisk -l

Disk /dev/sda: 50 GiB, 53687091200 bytes, 104857600 sectors
Disk model: VBOX HARDDISK
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xee2b9e47

Device     Boot   Start       End   Sectors  Size Id Type
/dev/sda1  *       2048   1050623   1048576  512M  b W95 FAT32
/dev/sda2       1052670 104857599 103804930 49.5G  5 Extended
/dev/sda5       1052672 104855551 103802880 49.5G 83 Linux

The system is running on VMBox. It was initially allocated at 25GB but I expanded the partition into 50 using GParted. The problem started before I messed with the partitioning. I have rebooted the system, in case open but not deleted files are there. No large log files are present (only 349MB).

I had a root partition report full on Mom's computer (Kubuntu 16.04).  The solution was to run:  sudo apt autoremove
In that case the update program never cleaned out the old files.  Now running 20.04, it runs fine.


Changing permissions and setting up paths I would like to know is there a way to change to change priorities for folders in /usr/share directory, so that we can work with it a with ordinary folder? I have texlive, and it is very annoying using super user mode to work with it. I've tried searching for solution, but nothing worked.

Also I know that program can not remember anything by itself, and it has to make a file, to write to it new parameters, so it can use them instead of default, so I like to know location of the file, where paths are written.

Did you mean permissions for a file instead of priorities??

If you are the only user on your system changing permission should be safe. But it's usually a better idea to use your home folder for the files you are working on. So, you can copy those files in your home folder.


How to get GRUB to be the default bootloader instead of Windows Boot Manager on a UEFI laptop? I've got an HP Pavilion Touchsmart notebook that came with Windows 8. I've upgraded to 8.1, and now I want to dual-boot an Ubuntu distribution with Windows 10. When dual-booting with Windows 8.1, the Windows Boot Manager always took priority, even after installing GRUB. What do I need to do to get GRUB to be the default bootloader instead of Windows Boot Manager?

This is the longest post I've ever made on a StackExchange site, but this process requires a lot of explanation and attention to detail. It's also somewhat specific to the hardware in question, which requires more explanation.

After a lot of headache, two accidental hard drive reformattings, and lots of frustration with HP's buggy firmware implementation, I finally got Xubuntu and Windows 10 running nicely side-by-side. I've done this with Windows 10, but it should also work with Windows 8.1. Both of these newer operating systems use the new(ish) UEFI firmware system, instead of the traditional BIOS system, which is where most confusions with dual-booting seem to arise. I read lots of things from lots of places with instructions for dual-booting with a BIOS system, that talk about UEFI as if it's just a different kind of BIOS, or an optional layer between BIOS and an OS. UEFI and BIOS are not the same thing; a UEFI is not a BIOS, and a BIOS is not a UEFI. They're completely different. There are some things that need to be done differently when dual-booting with a UEFI system.

Firstly, do not use EasyBCD. I've seen a lot of outdated dual-booting tutorials that recommend EasyBCD, but it is designed to work with traditional BIOS firmware used by Windows 7 and Windows Vista, and it does not work well with newer UEFI firmware (Windows 8, 8.1, or 10). If you have already fiddled with EasyBCD, don't worry- the worst it probably did is make a mess in your EFI boot entries by writing things to the MBR. We'll clean that up in step 4. Speaking of MBR, avoid that like the plague. The Master Boot Record is what's used in traditional BIOS firmware as a list of bootloaders stored in the boot partition (or, if written by Windows, in whichever partition is first) of your hard drive. It's meant to list the operating systems on the hard drive, and tell the firmware which one gets booted first. This does not work well with HP's UEFI firmware. It seems that if there's any MBR modification done, HP's UEFI firmware gets confused and runs back to the Windows Boot Manager, which will completely bypass GRUB.

What you'll need:

A live USB or installation CD with your preferred Ubuntu distribution.
Installation media for your Windows OS. If you're upgrading from Windows 8.1, you can do it without downloading the full 3+ GB .iso for Windows 10- there is a web installer that downloads it as it installs- but, for this method, you need the .iso extracted to a CD or USB drive. It's also a good idea to have it on hand for the future, so you might as well create it now. Since this question is about dual-booting with a UEFI system, you'll need the 64-bit OS.

Make sure you have your Product Key, or you won't be able to upgrade/install.

Optional, but highly recommended: A drive large enough to back up your current Windows files.
Enough space on your hard drive for both operating systems, a boot partition (only 200 MB), and a linux-swap partition (usually the same size as your physical RAM).

Step 1: Make a backup

Back up all of your Windows files and folders that you don't want to lose. As long as you have enough free hard drive space for your new Ubuntu partition, this process should not interfere with Windows files. Should is a risky word, though.

Windows 8.1 has a "make a recovery disk" tool, but I found it useless and non-functional when it came to restoring the backup I made with it. The most straightforward way to preserve the files you don't want to lose is to just open Windows Explorer, and copy them to a backup disk. It takes forever, but it's worth it.

Step 2: Disable Fast Startup, and shut down your computer

You'll need to be logged in as an administrator to do this.

It's very important to disable Fast Startup before installing GRUB, because whether the Ubuntu installer can detect Windows' presence depends on how Windows represents itself in the boot partition. With Fast Startup properly disabled, it should be detected. Detection will be covered in step 4.

Windows 8, 8.1, and 10 use this fancy new thing called Fast Startup, which tells your firmware to load a special bootloader that restores the system to its pre-shutdown state very quickly. Pretty cool, huh? Well, because it changes the EFI system's next-boot option, this feature will have to be disabled while you're installing GRUB. This can be done by doing the following:

Open Control Panel (Windows+X->Control Panel from the desktop in Windows 8+) (apparently Microsoft hates power users, so searching the Start Menu for "Control Panel" is now the fastest way to open it)
Navigate to Power Options
Click "Choose what the power button does"
Click "Change settings that are currently unavailable"
Make sure the box that says "Turn on fast startup (Recommended)" at the bottom is not checked.

More detailed instructions can be found here. You can re-enable Fast Startup after installing GRUB, and it seems not to cause any problems with Ubuntu/GRUB booting. Just make sure it's disabled during the installation.

After you've disabled Fast Startup, shut down your computer. Since Fast Startup is disabled, Windows will do a complete shutdown, and not change the next-boot option in the firmware's EFI manager. (Layman's terms: Windows won't tell your HP system to boot its Fast Startup file when it's next turned on, so it will use the EFI boot manager's list, as it should. GRUB will place itself first on this list.)

Step 3: Set up the partitions with gparted

Before installing Ubuntu, you'll want to use your live CD/USB to make a separate partition for it. That way, it *won't overwrite Windows.

*Make sure you've got a backup. No guarantees- this depends on what Windows has decided to do in your boot partition, and it may also depend on which Ubuntu version/distribution you're using- I haven't used them all.

To make the partitions, you need to boot to your live CD/USB, and open gparted. There are plenty of tutorials on using gparted, and it's pretty easy to figure out, so I'll leave the specifics up to you and the Internet.

You will need 4 partitions:

A boot partition. If you already have Windows installed, you shouldn't need to do anything- it should already be one of the first partitions in your drive. Sometimes Windows also makes another small partition at the beginning of the disk called Recovery. Just leave this alone.

If you're doing a new installation, and you want to start everything from scratch (this will wipe out all of your data), go ahead and delete all of the partitions on your drive, and then make this partition. It should be the first partition; its format should be FAT32; and it should be at least 200 MB in size. If gparted has an option to label it, just call it boot. If there's not label option, don't worry about it. You must, however, set the "boot" and "esp" flags on this partition ; without them, the Ubuntu installer will just ignore it and use a legacy mode install, and Windows (10) will refuse to install altogether with the error "we couldn't create a new partition or locate an existing one". Or not. It seems to depend on how Windows feels that day...

A Windows partition. Again, if you already have Windows installed, this partition should obviously be here, after the boot and Recovery partitions. This is where you want it, but you need to resize it to make room for your Ubuntu partition, and the linux-swap partition. Use gparted's resize/move option to do this. Ubuntu needs at least 5 GB, and the linux-swap partition should be at least half the size of your physical RAM, so Resize the windows partition to make enough room for that. gparted will warn you about potential data loss- shrinking your partition should not destroy or corrupt any data, as long as you don't shrink it down into the space being used.

If installing both operating systems from scratch (again, this will wipe out all of your data), Microsoft says you'll need at least 20 GB for the 64-bit OS, so this partition needs to be at least 20 GB. You'll probably want more than that, though: I just used half of the space after the boot partition for Windows, and half of it for Ubuntu and linux-swap. If you're going from scratch, this partition needs to be formatted as FAT32. When you install Windows, it will format it to NTFS. Do not do this with gparted; Windows' implementation of NTFS is different than gparted's implementation, and Windows may not be able to recognize the partition. In the Windows 10 installer, you should have the option to select which partition to place Windows 10 on. If it's formatted as FAT32, Windows should be able to see it and install itself there. If you can label this partition, label it Windows. That will make it easier for you during the Windows install. Speaking of the Windows installer- don't begin that yet. If you're doing new installations of both Ubuntu and Windows at the same time, instead of upgrading from 8 or 8.1 to 10, it's much easier to install Ubuntu first.

A Linux partition. Like the Windows partition, this can vary in size, but Ubuntu's website recommends at least 5 GB. Again, you'll probably want a lot more than that. If you're upgrading instead of doing a fresh install of both operating systems, you should be able to create this partition in the new "unallocated" space shown in gparted. Make it as big as you like but remember to leave space for a linux-swap partition if you plan on using one. It should be formatted as ext4. ext2 or ext3 should work too, if you prefer those for some reason.

If installing from scratch, make your Ubuntu partition just as described above. Make sure it's formatted as ext4, ext3, or ext2. This will allow Ubuntu to use it, but keep the Windows 10 installer from recognizing it, which should cause it to default to the FAT32 partition you made in step 3, which it can read.

Optional, but recommended: a linux-swap partition. At least half the size of your physical RAM is a good start, but I recommend reading the details. I've got 8 GB of RAM, and a 1TB hard drive, so I just made this partition the same size as my physical RAM.

Step 4: Install Ubuntu first

Whether you're upgrading to Windows 10 from an existing Windows OS, or installing both Windows 10 and an Ubuntu distribution to a new or newly-repartitioned hard drive, it's a lot easier to install Ubuntu first. Ubuntu uses GRUB 2 as its bootloader, which does things the way an EFI bootloader should. Windows 10 uses Windows Boot Manager, which does things... well, the way Windows does them... If you install Windows first, you likely won't be able to boot to Ubuntu without holding down a special key during the boot process to stop the Windows Boot Manager from loading, because Windows Boot Manager doesn't respect GRUB when it's added to its list of bootloaders. So instead, install Ubuntu and GRUB first, then add an entry to GRUB for the Windows Boot Manager.

Step 4.1: Cleaning out old EFI entries (optional)

Please be careful here. Deleting the wrong thing can cause huge problems.

Before installing Ubuntu, we want to make sure that the ghosts of past OS installations aren't going to come back to haunt us in the future. In a UEFI system, operating systems use EFI (extensible firmware interface) files to tell the firmware: "Hey, I exist. This is where you can find me." When a new OS is installed, it adds an entry to the EFI Boot Manager's list, which gives it a unique entry number, and tells the EFI Boot Manager where it's EFI file(s) is/are (Windows registers several different EFI files- one for regular boot, one for a recovery boot, one for Fast Startup- possibly more depending on your firmware and your OS version). The EFI Boot Manager also keeps track of the boot-order: a list of entry numbers that specify what gets booted first. If you've been using EasyBCD; bcdedit; Windows' Boot Repair or Recovery tools; boot-repair in a Linux OS; or even if you've updated Windows or reinstalled it, there's a good chance that your EFI entry list now has some duplicates. At least, that was the case with mine. Having duplicates here can bog down your booting process, as the firmware sifts through the out-of-date or wrong-file entries until it finds a bootloader that works. It can also cause a boot-loop, where bootloader A points the firmware to bootloader B, which points it back to A, and then things start to take a very, very long time...

Anyway, to view your EFI entry list and see what needs to be cleaned, use the efibootmgr package with your live CD/USB. You'll need to install it using sudo apt-get install efibootmgr in a terminal, then run it using sudo efibootmgr. By default, you'll get a list of entries that looks something like this:

When I first used this tool after fiddling with EasyBCD and bcdedit trying to get things to boot in the right order, I had over a hundred entries here, most of them duplicates.

If your boot manager list isn't too cluttered, or if you're not comfortable deciding what can be deleted and what shouldn't be deleted, just skip to step 4.2.

To clean out any entries you don't need, use efibootmgr -b <hex_number> -B, where hex_number is replaced by the number listed with the boot entry. So, to remove the USB Drive (UEFI) entry (numbered Boot2001) in the picture above, I'd use sudo efibootmgr -b 2001 -B. You'll notice that I left some duplicates (all of the 3000+ numbered entries). You can use efibootmgr with different options to view some other attributes of the entries, such as the file paths they point to. Those entries look like duplicates, but they all point to different files used by my HP laptop to update its BIOS. Please be careful what you remove. It can be very difficult or impossible to replace things here. You can also use efibootmgr to change the BootOrder, which it displays. See the man page for more information on this useful tool.

Step 4.2: Installing Ubuntu

After you've cleaned up the EFI Boot Manager entries, if you chose to do so, it's finally time to install Ubuntu. With your live CD/USB loaded, select the install option from the bootloader menu, or launch it from the desktop after logging in. Choose your options on the first page of the installer. The second part will look something like this: (I'm using Xubuntu 14.04, so your installer may vary, but the options should be pretty similar.)

If your installer doesn't detect your Windows installation (like mine), you'll need to select the "Something else" option. From there, you'll get a screen that looks similar to the gparted menu you used to set up your partitions. Simply select the partitions you made, and assign them to the correct mount point by selecting a partition and clicking "Change".

If you're installing both OSes from scratch, do the same thing. Do not use the automatic installation option. You need to make sure Ubuntu gets installed in the ext2/ext3/ext4 partition, not the FAT32 Windows partition.

Step 5: Update or install Windows second

You should have an installation disk for Windows 10. Before you start installing, make sure you have your product key nearby, or you won't be able to install/upgrade. When you boot to the installation CD/USB, the installer is pretty simple. A bit too simple for my comfort- the only button was "Install Windows 10" or something like that, and Windows 8, 8.1, and 10, are infamous for their behind-the-scenes installs, where it simply says "We're getting things ready", and provides no details about what it's actually doing to your system. If you've followed these instructions so far, it should be OK to begin installation regularly.

If you're upgrading from Windows 8 or Windows 8.1, you shouldn't have to do anything special with the installation process. Get through the (very long) installation, and proceed to step 6.
If you're doing a fresh install, the installer will ask you where you want to install Windows 10. Make sure you select the FAT32 partition you made in step 2, and not another partition, or that partition will be wiped and formatted. Because Ubuntu is already installed, Windows 10 should be respectful of the boot partition and not reformat it. Having the rubbish entries cleaned out of the EFI Boot Manager's list will also free up space in the tiny 200 MB boot partition, lessening the chances that Windows will get confused and angry and clear the whole thing for itself.

Step 6: Update and (optionally) customize GRUB

After installing or upgrading to Windows 10, you'll need to reboot to Ubuntu to update GRUB so it includes Windows Boot Manager on its list. Before you do this, disable Fast Startup again. This is done very similarly to how you did it in step 2. The control panel and settings UI are a bit different, but most of the options are still there.

After you've disabled Fast Startup again, reboot your computer.

If Windows boots by default, you will need to hold down the special key for your laptop to get to the system's firmware menu. On my HP Touchsmart, that key is Esc. Other common keys are F12, Delete, F10... Your computer's manual should be able to help you out here. From the firmware menu, boot into GRUB. There should be an option to "select a boot device" or something similar, and Ubuntu or GRUB should be listed there. If it's not listed, look for an option to boot from an EFI file, and browse to /EFI/ubuntu/grubx64.efi or (if you have Secure Boot enabled), EFI/ubuntu/shimx64.efi instead. The actual paths of these files may vary depending on your options, and how your boot partition is set up, but the file names should be the same. Selecting one of these .efi files should boot to GRUB, where you can then boot to your Ubuntu distribution. Once you've logged in, open a terminal and type sudo update-grub. This will run the os-prober script that GRUB uses to compile grub.cfg, which tells grub's EFI file which entries to include, what colors to use, etc. The os-prober script should identify Windows Boot Manager, and automatically add it to the list.

Optionally, you can install Grub Customizer to change the order of menu entries and change the behavior and the color and background of the GRUB menu. You can install this from a terminal using sudo apt-get install grub-customizer, and then run sudo grub-customizer.

When using GRUB on a UEFI system shared with a Windows OS, DO NOT install to MBR. Some tutorials list it as a crucial step to use Grub Customizer's "Install to MBR" option under the File menu. You should not do this on most UEFI systems. The MBR (Master Boot Record) is designed for BIOS firmwares, and is still used by the Windows Boot Loader to some extent. Adding GRUB to the MBR, when it's already in the EFI entry list, can cause lots of hairballs.
If you need to make sure that GRUB is the first entry in the boot-order list (i.e. if Windows is always booting, even though you did everything right), use efibootmgr (see step 4.1) to view/edit the EFI Manager's boot order.

Notes

I haven't mentioned Secure Boot at all, because it should normally not affect Ubuntu's installation. Many dual-booting tutorials talk about disabling it, but that's usually not necessary with a current 64-bit installer. However, each PC is different, and Secure Boot is fairly new (2012), so different firmwares may implement things differently. For example, the version of my HP firmware includes a "legacy boot" option, which disables Secure Boot and treats installed OSes as though it were BIOS firmware: some people recommend enabling this for installing for dual-boot. Installing Ubuntu in legacy boot mode on my system prevented GRUB from adding itself to the EFI entry list, so all it could do was add itself to the MBR, which Windows Boot Manager had full control of. Windows Boot Manager took a lot of tweaking to even display the list of entries, and after all that, it would only boot the Windows entries, making GRUB unusable without manually selecting its EFI file every time I powered on.

See here for more information on Ubuntu and Secure Boot and Legacy Boot, and information about the difference between UEFI and BIOS installations in general.

I found a much simpler solution, which worked on an HP laptop (355 G2) which had windows 10 installed

Press escape while booting
Press F9 for boot options
Select the USB option that is not UEFI (on mine it was the bottom in the list) and hit Enter
You will then get an error message screen. However, you just have to type 'live' to try out the OS or 'live-install' and hit enter to install it, and all should go swimmingly....


How can I use Java Mobile Phone's camera as a Webcam? In windows there is a software called "Mobiola webcam" for use a mobile cam as a webcam . Is there any way for Linux (ubuntu 12.04 LTS) ?

For Android you can use Droidcam.

Here is a nice tutorial how to install and configure in Ubuntu


ubuntu up-to-date but still showing updates I ran the following command to update my ubuntu machine: sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade --fix-missing -y

After installing updates, it still shows the following when I log in:

Can I remove this somehow?

Message Of The Day (MOTD) is not refreshed each time you login... what you are seeing is normal though incredibly annoying. If after apt update && apt upgrade you see that everything is good to go, your MOTD is simply out of sync.

You can force a MOTD update with the following command.

sudo /usr/lib/update-notifier/update-motd-updates-available --force

cd /etc/update-motd.d

90-updates-available is a script containing a link to a file containing the message. I deleted the file: /var/lib/update-notifier/updates-available. This solved my problem.


How to run crontab as user:www-data? My LAMP is setup to work as user:www-data and all files and folders are created with that permissions.

I have setup for crontab as user@ubuntu.

So i do crontab -e and use this command:

*/5 * * * * php /var/www/public/voto_m/artisan top >/dev/null 2>&1

Basically that command just creates cache file in specified place (no problems with that), but that cache file is created with user:user permissions not user:www-data permissions.

How can i make that it will by default create file with user:www-data permissions?
I can't go and chown each time file is recreated.

Thanks.

You can also run crontab with the -u argument to edit a crontab for a specific user:

sudo crontab -u www-data -e

I would like to add another approach. As other people mentioned, Ubuntu (16.04 here) and www-data crontab seems to be unreliable (maybe it's a security thing?).

Anyway, in our company we like to have all cronjobs on a server easily accessible, so you don't miss anything. At the same time we don't want to run everything (anything really!) as root.

Therefore we run

sudo crontab -e

As you normally do, and then we specify the command as

* * * * * /bin/su - www-data -s /bin/bash -c '/path/to/command'

This will execute /path/to/command as www-data while keeping the cronjob in root cronjobs file (and that will always run correctly). It has the nice benefit of being able to write the logfiles as root (for max security) using pipes.

Note that we are passing our prefered shell, this could also be /bin/sh for a simpler shell (we just like full bash capabilities). Www-data doesn't have a shell specified so you will get errors without it. Normally cron runs jobs with /bin/sh only.


Receiving error while trying to debug in QtProject I installed the latest version of the QtProject so now I can debug C++ code.

While trying to debug for the first time I got this error:

ptrace: Operation not permitted.

Could not attach to the process. Make sure no other debugger traces this process.
Check the settings of
/proc/sys/kernel/yama/ptrace_scope
For more details, see /etc/sysctl.d/10-ptrace.conf

On Ubuntu versions after 10.10 you'll run into this in more related applications, such as QtCreator. It is a security feature of Ubuntu that prevent the debugger to attach to processes not owned by him.

This is filed as a bug #3509 against QtCreator. To work around this issue, do this:

temporary solution (won't survive a reboot):

 echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope

In a file /etc/sysctl.d/10-ptrace.conf (should already exist), change the value of kernel.yama.ptrace_scope to 0 and then reload the configuration: sudo sysctl -p.

I'm explicitly posting the temporary solution, as you probably don't want to keep this feature disabled on a regular machine for security reasons.

Just open QtCreator via a Terminal with root permissions; it worked for me.

sudo qtcreator


Cannot access internet due to tampering with resolv.conf I'm running Ubuntu 13.10 and attempted to fix an issue with running wicd through the instructions from this answer.

After following these instructions, the program wicd works, and my wired and wireless connections are fine, but I cannot use the Internet anymore. My browsers give me errors as if I am not connected.

Are there suggestions to "undo" the command line steps I made?

To undo the damage, do

sudo rm -f /etc/resolv.conf
sudo dpkg-reconfigure resolvconf

try this as the ONLY thing in the file

nameserver 8.8.8.8
nameserver 8.8.4.4

in the future cp resolv.conf resolve.conf.bak
Now you have a backup file to restore.


Installing Canon LBP2900b printer in 12.10 I installed  Canon LBP2900B 's driver from canon's support page in Ubuntu 12.10. In printers section it is showing my printer as LBP2900 (not as LBP2900B). I can open its properties, can send a command for printing. What's wrong, however, is that in the printing process, it is shown as processing. Suffice it to say that my printer is not working.

https://help.ubuntu.com/community/CanonCaptDrv190?action=show&redirect=CanonCaptPrinterDriver open this link and install from 12.04

and please confirm the true answer some newbies forget this

I've searched for you this driver and I found it in this page:
http://www.canon.co.uk/Support/Consumer_Products/products/printers/Laser/i-SENSYS_LBP2900B.aspx?DLtcmuri=tcm:14-846492&page=1&type=download

However, I don't know where do you live, so if you click here
http://www.canon.co.uk/Support/Consumer_Products/products/printers/Laser/i-SENSYS_LBP2900B.aspx?type=download&page=1
you can choose your own language for this driver!
Unfortunately I have not tried to search the guide for install the printer. If you have any problems write here, even if I'm a beginner of Ubuntu I'm trying to help all of you!


How do I detach a screen session from a terminal? I know how to start a screen, and how to list different screens:

screen -ls

or to attach:

There are screens on:
        2477.pts-0.server1      (Detached)
        2522.pts-0.server1      (Detached)
2 Sockets in /var/run/screen/S-root.

$ screen -r 2477.pts-0.server1

But what is the key combination to detach from a screen session and keep it running?

Ctrl+a followed by d. Note the lower case. The [screen manpage] has a long list of these shortcuts under "DEFAULT KEY BINDINGS".

Some systems remove certain bindings by default.  So it is best to look at the online keybinding page: Ctrl-a ?.  You can also use the command prompt in screen: Ctrl-a :detach.  Myself, I generally remove the key bindings for 'detach' and 'powerdetach', except on remote systems.


How to downgrade to a specific PPA version of LibreOffice? Since 2012 I have been using LibreOffice provided by this PPA. But yesterday, I made an upgrade which contains a bug that messes with all my Sheets.

While I wait for a fix, I want to downgrade from the current version 4.2.0.4 to the previous version 4.2.0.3.

I've found several articles to downgrade from the PPA to "default" version 3.6 but none that downgrade to a specific PPA version:

How to "properly" downgrade LibreOffice versions
Remove all packages installed from a PPA?

Is it possible to do a version downgrade using standard apt commands?

One way to do this would be to manually download the necessary .deb files from the PPA, then using sudo dpkg --force-downgrade -i your_libo_package.deb. Be careful with this option and be sure to have read man dpkg before using it.

For a more detailed account of this downgrade procedure see:

How can I downgrade packages without removing their dependants?

I'm going to risk answering the question, if you don't mind using another software then try Kingsoft Office, personally I think it's much better than LibreOffice.

However, if you insist on using LibreOffice, then grab the version you want from here, then stop it from updating, follow these instructions.

And if you  insist on using apt-get, then see this.


Extract all files after wget download I'm using wget to download a list of files from a URL, here is my command:

wget --user='username' --password='mypassword' -i  url.txt

This downloads a list of .gz files

What I need to do is:

Before downloading, delete all files in directory
After downloading, unzip all files and delete zipped ones

Is there a command or list of commands which might accomplish this which I can insert into a cronjob? I need to run this once a day.

Thanks

Let's try a one-liner :

rm -rfi * && wget -q -O - --user='username' --password='mypassword' -i  url.txt | wget - && find . -name "*.zip" -exec "unzip && rm" {} \;

Don't hesitate to edit/adapt : this could be really wrong as I'm not always very at ease with the - pseudo-descriptor and how each application handles it.

Some details

Clear current directory.

rm -rfi *

Get the list, but instead of sending the contents to a file, redirect it to stdout (using -q, -O and the pseudo-descriptor -).

wget -q -O - --user='username' --password='mypassword' -i  url.txt

Download files names of which are being sent from the previous wget call. Again, - makes refers to the standard input, which is also the previous command's output.

wget -

Find all zip files in the directory, and execute unzip and rm on each of them.

find . -name "*.zip" -exec "unzip && rm" {} \;

This is more of a *nix question, than Ubuntu-centric.

In general you'd write a script (using the bash language, or perhaps Python) that handles the task you describe.  One line of the script would be your command, above... the rest would handle the inspection of the directory, deletion, unzipping etc.

Then you'd just use cron (google up crontab) to set the script to run at specific times.


How to make Thunderbird open links in Firefox? I'm trying to use Thunderbird again, but I can't make it use Firefox to open links. I'm using KDE and Firefox is my default browser. I tried the network.protocol-handler method but it doesn't work.

To open links in thunderbird so that they will open firefox or chrome or opera, you open preferences, attachments, and click on use other and navigate to the browser that you want to use.

It seems that thunderbird uses sensible-browser, that actually tests for the following alternatives: gnome-www-browser and x-www-browser; so what you need to do is manage your altenatives with:

sudo update-alternatives --config gnome-www-browser
sudo update-alternatives --config x-www-browser

And the choose Firefox for those.

Probably you'd only need to update x-www-browser since you're using KDE.


Unable to access drive with installed ubuntu on dual boot system I was using windows 8.1 for some days which was installed in C drive. I totally had 4 drives C, F, G, H. I installed Ubuntu as dual boot with windows 8.1. Now my only problem is that, I can't access F drive because I installed Ubuntu on that drive.
My question is => am I able to get my F drive(files) back or is it lost. Is there any chance of getting that drive by uninstalling ubuntu?.

If yes, how can I uninstall Ubuntu. Or Even by using ubuntu alongside how can I get my files(F drive) back.

If you've picked an existing partition to install a new OS on, then it will have overwritten that partition & put all it's own files there. This means that the partition has been, in effect, removed & replaced, and formatted, and data written to it.

The old partition most likely had data stored toward the beginning of it; depending on your luck, historical usage, and amount of space used, it is possible that some data might have survived even this treatment! If there wasn't much prior use of the drive then you're likely out of luck by now.

The odds of getting much back are thin; however, if there was important stuff there, you could try the following:

Reboot from a live system, ie CD or USB.
Download a forensic tool such as testdisk, or foremost - I use foremost, and the other question referenced above, used testdisk, so I'll talk about foremost:

Run this, using a partition other than the target to store found data - an external drive is good - with the target as your old 'F' drive.

Type in foremost -o /path_to_destination_storage -i /dev/sda4, replacing sda4 with the correct designation for your old 'F' drive.
This will produce a mess of randomly named files, classed by type, representing the files it found and recognised including the "blank" parts of the drive which not not be as blank as expected!

You can then set about playing found media, viewing pictures, searching text files, to see if you got anything back.

When you install Ubuntu on a drive, it will format the drive. That means you lose all data at this step.

So in your case, sorry I have to say that you cannot get back your data.

EDIT by ByteCommander: It is theoretically possible (but difficult) to recover data of a formatted partition, but once it got overwritten with other data (which it did during the Ubuntu installation - at least parts of it) it is gone to the nirwana.


File System Root - Low Disk Space - PARTIAL folder I use Ubuntu at work and recently I have been receiving a message during boot up that states the file system is low on disk space and at one point the desktop would not fully load.

After using Disk Usage Analyzer, I narrowed the bulky folder down to /var/lib/apt/lists/partial.  The partial folder has like 60 to 80 gigabytes of data in it which is the bulk of the problem. Inside this folder is tons of archive.ubuntu.com files and the largest is archive.ubuntu.com_ubuntu_dist_vivid-updates_main_binary-i386_Packages and other smaller similar files.  Are these related to the update process? Important? Need a little light shine on it.

Thanks in advance.

They are not important to the update system, because that are the partially downloaded package lists. And you can clean the cache of apt with sudo apt-get  clean.

Open a terminal and write the following

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install bleachbit
sudo bleachbit

And delete all the unuseful files on Ubuntu


How can I change the date modified/created of a file? Is there a way to change the date when a file was modified/created (which is shown in Nautilus or with the ls -l command)? Ideally I am looking for a command which can change the date/time stamps of a whole bunch of files to a certain amount of time earlier or later (e.g. +8 hours or -4 days etc.).

As long as you are the owner of the file (or root), you can change the modification time of a file using the touch command:

touch filename

By default this will set the file's modification time to the current time, but there are a number of flags, such as the -d flag to pick a particular date.  So for example, to set a file as being modified two hours before the present, you could use the following:

touch -d "2 hours ago" filename

If you want to modify the file relative to its existing modification time instead, the following should do the trick:

touch -d "$(date -R -r filename) - 2 hours" filename

If you want to modify a large number of files, you could use the following:

find DIRECTORY -print | while read filename; do
    # do whatever you want with the file
    touch -d "$(date -R -r "$filename") - 2 hours" "$filename"
done

You can change the arguments to find to select only the files you are interested in.  If you only want to update the file modification times relative to the present time, you can simplify this to:

find DIRECTORY -exec touch -d "2 hours ago" {} +

This form isn't possible with the file time relative version because it uses the shell to form the arguments to touch.

As far as the creation time goes, most Linux file systems do not keep track of this value.  There is a ctime associated with files, but it tracks when the file metadata was last changed.  If the file never has its permissions changed, it might happen to hold the creation time, but this is a coincidence.  Explicitly changing the file modification time counts as a metadata change, so will also have the side effect of updating the ctime.

If you simply just want to update the file date to "right now", you can:
echo "" >> man.jpg

This should work for any extensions.
Also, while touch -d "2 hours ago" or touch -a -m -t 201512180130.09 doesn't have effect to Windows filesystem files, the method does. (like when you're using WSL Linux Bash)


USB mouse does not work I have installed lubuntu 14.04 both on my desktop computer and on my laptop.
On my desktop computer, I have an old ball type ps2 mouse, which now starts to fail (cable problems).
My optical usb mouse which works perfectly on my laptop, will not work on my desktop computer; I tried all different usb ports , tried pluggin in before and after boot .. the light is on, the mouse does not work.
Any idea?

you need to try other usb device at first as flash usb or any other , if they also stopped so you need to check your BIOS option to active usb control

start your computer and press Delete key when you see the first black screen then (if you have other option to open bios do it) then choose > integrated peripherals , go to usb controller by keys up down and press enter then make it enabled press enter and save your BIOS f10 , it will work


rsyslog Disable $RepeatedMsgReduction for specific filter I have the following in my rsyslog configuration. It works well.

:msg, contains, "<switch2>" /var/log/switch.log
& ~

I need to disable RepeatedMsgReduction for log messages that are routed by this rule, while leaving it enabled for all other messages.

How can I do this?

(originally asked in ServerFault but no responses)

Edit /etc/rsyslog.conf

and change RepeatedMsgReduction from on to off.


Ubuntu 14.04 Desktop install stuck in loop at Where Are You I'm installing Ubuntu 14.04 64-Bit Desktop.  I'm using all defaults and after accepting "Erase disk and install Ubuntu" I click the "Install Now" button.  Immediately, the "Where are you?" form comes up with a small error window showing "??? ???" in both the error window's text and header.  The pointer is still active.  The "Continue" button seems to be active but ignores clicks.  I can't click anywhere on the entire screen with the exception of the "OK" button in the error window.  Once I click that I'm taken back to the previous "Install Now" button.  Seems like I'm stuck in a loop.
Thanks,
Curt

i5
Asus Z97-ar mobo
16GB RAM
2 x 4TB hard drives

My Ubuntu 14.04 installation hung when I entered Montreal in response to the question, "Where are you?". When I entered, New York, which is in the same time zone as Montreal, the the installation proceeded normally.


Ubuntu 16.04 Xfce unable to start display setting Within the screen, going to APPLICATIONS -> SETTING then DISPLAY the response is
Unable to Start the Xfce display settings
This system is using RandR 1.1. For the display settings to work version 1.2 is required at least

I've been bumping into the same "Unable to start the Xfce Display Settings" popup while xrandr --version reports program & server versions 1.5.0 & 1.5, respectively. So this error isn't necessarily related to xrandr versioning.

It appears the presence of any xorg configuration file (/etc/X11/xorg.conf, or in /etc/X11/xorg.conf.d/) causes the error during xfce4-display-settings startup.

Remove any xorg config files, log-out, log-back-in, and you should be able to access the xfce display settings as intended.

...the catch is, if you actually need the existing xorg config, its unclear how to write-out/meld changes applied by xfce settings with your own xorg.conf. For example, I need a second xscreen to exist (display=:0.1), but don't want the xfce desktop doing anything to it.
So this is more of a workaround than a solution...

Since the problem seems to be an outdated RandR, I would try running

sudo apt-get update && sudo apt-get upgrade

to try and update RandR.


What exactly is a script? I am having some difficulty understanding what a script is. As far as I understand, it's a set of commands in  a shell. And what's the difference between a bash script and a shell script? can somebody explain this concept?

from http://en.wikipedia.org/wiki/Shell_script:

  A shell script is a computer program designed to be run by the [Unix] shell, a command line interpreter. The various dialects of shell scripts are considered to be scripting languages.

In other words: a bash script is a shell script, but a shell script not necessarily a bash script.

Unlike an application, a script is usually executed as a series of commands, from A to Z (although it can run in a loop). A script hardly takes any user input once it has started and is usually written to fulfill a single job.

While modern applications usually are written in classes to fulfill a wider range of tasks, depending on what the user decides, a script mostly executes its commands from top to bottom, to exit once the job is done.

There are numerous scripting languages, of which bash is just one. To mention some which are used on Linux: python, bash, perl, awk, sed

The classical difference between scripts and programs is that scripts are interpreted while programs are compiled and provided in exectuable form.

The definition is blurred today as you can compile scripts if you really want (eg: PHP compiled by Facebook) and modern programming languages use interpretation at lower levels (eg: Java with JVM, .NET and IL)

Shell scripts are scripts that use the Shell Command Language (sh). sh is a specification which has multiple implementations. bash started as a sh implementation but it grew to be quite different, though it supports a sh compatibility mode.


How can I use Netflix on Ubuntu? Is there a way to stream Netflix content to my Ubuntu machine?

Important:

  Please note that Ubuntu releases 12.04, 14.04 and newer now support
  native Netflix playback via
  HTML5.

  The solution in this answer should only be used in cases where native
  playback is not possible (e.g. unsupported Ubuntu releases, browsers
  other than Google Chrome).

  Also note that as of Firefox 49, Netflix playback is natively supported.

As of December 7th, 2012 the following works on 12.04 and 12.10 (at least).

Note: For new instructions --as of October 2013-- on how to install (Windows-)silverlight (ultimately useful to watch Netflix) in Firefox see at the end.

Open a terminal (Ctrl-Alt-T), an type:

sudo apt-add-repository ppa:ehoover/compholio
sudo apt-get update
sudo apt-get install wine-staging
sudo apt-get install netflix-desktop

Are PPAs safe to add to my system and what are some "red flags" to watch out for?

This will install around 254MB of packages, mainly it will install wine-compholio (a custom version of wine that is able to run Silverlight) and dependencies. If wine is not installed already you may need to agree to use Microsoft fonts (in the text mode window use arrow keys or tab to reach the red "ok" button in text mode when it appears). The download/installation takes around 15 minutes.

Then run the newly installed "netflix-desktop" application from the menu (or from the command line).

If something went wrong in the installation (third party links are involved), don't panic: netflix-desktop will detect that something is missing and try to reinstall it, if that also fails, start over.

When you run it for the first time it will initialize wine and probably ask about installing Mono and Gecko wine packages (I accepted and installed them just in case).

The netflix-desktop application opens up, login to your Netflix account.

The window will open in fullscreen, which is very elegant, but if you want to have control over the window press F11 right away to exit fullscreen mode. (It may also ask to install a Firefox extension --specially designed-- that makes fullscreen mode more friendly.)

Use Netflix as you would normally do.

It worked flawlessly in my Ubuntu 12.04 and 12.10 (I have a Core i7).

(As you may have realized at this poin, the netflix-desktop is really Firefox 17 running on wine without menubars. Press F10 to gain control over the Firefox menu and navigation.)

Credits and references: This information was originally taken from http://www.webupd8.org/2012/11/how-to-use-netflix-in-ubuntu-through.html. Although this is a result of a campaign initiated by www.iheartubuntu.com in http://www.iheartubuntu.com/2012/02/netflix-on-linux-contest.html, resulting in this achievement http://www.iheartubuntu.com/2012/11/ppa-for-netflix-desktop-app.html (by Erich Hoover) which also contains a link for donations to support the development. There is also  https://launchpad.net/netflix-desktop

Bonus: By running this you have a fully functional Firefox 17 (Windows version) with working Silverlight that can be used to navigate other sites, by pressing F10 -> View -> Toolbars -> Navigation menu on the main window you can access any site and be able to use Silverlight.

Alternative Method: Install Windows-Silverlight in Linux-Firefox

Alternatively, it is now possible to install Silverlight inside (Linux) Firefox as if it were a native plugin.  (you can see http://fds-team.de/cms/pipelight-installation.html for more info)

sudo add-apt-repository ppa:pipelight/stable
sudo apt-get update
sudo apt-add-repository ppa:ehoover/compholio
sudo apt-get update
sudo apt-get install wine-staging
sudo apt-get install pipelight-multi
sudo pipelight-plugin --enable silverlight

Then install the UAControl Firefox add-on (UAControl - neko.tsugumi.org) and convince movies.netflix.com that your browser is a Windows one, for example "Mozilla/5.0 (Windows NT 6.1; rv:23.0) Gecko/20131011 Firefox/23.0".

Then go to www.netflix.com.

Source: Pipelight: Use Silverlight In Your Linux Browser To Watch Netflix, Maxdome Videos And More ~ Web Upd8: Ubuntu / Linux blog

Try running these commands:

sudo apt-add-repository ppa:ehoover/compholio
sudo apt-get update && sudo apt-get install netflix-desktop

Then find netflix in the launcher and it should work.

BUT if it doesn't work the first time, like it didn't for me, try this:

rm -Rf ~/.netflix-desktop
sudo apt-get install netflix-desktop

I got my answers from here: http://www.iheartubuntu.com/2012/11/ppa-for-netflix-desktop-app.html

It has some further troubleshooting notes that I didn't post here so check it out if this doesn't work for you.


Ubuntu software-center not installed I'm new to Ubuntu. I installed Ubuntu 12.10 version. Ubuntu software-center not displayed on my left panel. I searched for it, but nothing displayed. Can any one help me to solve this problem. Is there any other way to install software-center in my machine?

Thanks & Regards,
Lokesh

Try running this command:

sudo apt-get install software-center

In the terminal.

Start the terminal with with Ctrl+Alt+T.

From terminal type:

sudo apt-get install software-center

To access terminal, simply search for it or press CTRL + ALT + T.


What is default password? What is the difference between default and login?
And what does Default Keyring mean?

When I run some applications(Emphaty etc), Unlock Keyring window launched first, then it requires me password. Why?

This is a screen-shot when I run Emphaty.

Why does it require me a password? It's a just messenger. It makes me crazy.

I was able to find this Window.
I guess this Windows could give me a solution.
Before trying something to fix it, I'd like know about what they are.

Please explain them to me.
P.S My login password is not equal to default password now.

It's been a while since I've seen a default keyring - what version of Ubuntu is that?  Open up the default keyring to determine what applications are stored in there.  If there's only one or two, you might want to consider just deleting that keyring and storing everything in the login keyring instead.

It's possible that you have default keyring because your login keyring is out of sync with your login password.  Depending on your security requirements, you might want to consider changing the password on your login keyring to a blank password (called "unsafe storage") which ensures that all future passwords are stored in the login keyring.

I'd only advocate this approach if a) you're using encrypted home or b) you don't care about security.

Are you asking what is the GNOME keyring in general? This is from Wikipedia

  GNOME Keyring is a daemon application
  designed to take care of the user's
  security credentials, such as user
  names and passwords. The sensitive
  data is encrypted and stored in a
  keyring file in the user's home
  folder. The default keyring uses the
  login password for encryption, so
  users don't need to remember yet
  another password. GNOME Keyring is
  implemented as a daemon and uses the
  process name gnome-keyring-daemon.
  Applications can store and request
  passwords by using the
  libgnome-keyring library. GNOME
  Keyring is part of the GNOME desktop.


Help with creating a symbolic link I'm confused with how symbolic links work. I hope someone can guide me in the right direction.

I want to put a demo online from our software, which normally only runs locally on a Mac Mini. So I put all the files in the var/www from my Ubuntu 12.04 server installation.

There are a lot of hardcoded links in the software which point to /Applications/XAMPP/xamppfiles/htdocs/narrowcasting

Of course, I could change all these code on my html/php files in /var/www, but that would be quite annoying. I hope I can fix this by creating a symbolic link. For example, I have a directory called thumb in /var/www/thumb. The PHP code is trying to put an image in /Applications/XAMPP/xamppfiles/htdocs/narrowcasting/thumb.

Can anyone give me a tip how to achieve this with a symbolic link?

use the  ln  command to do symbolic links.

 ln -s <real folder> <link folder>

in this example, you will create link folder that will actually contain what  real folder  have, and if you save something to link folder it will actually save it into real folder

You can verify the link with the command ls -l which will show an arrow to where the link points.

Note that the folder containing the link must exist, so you would have to create it first.

So in your situation, the commands that you are looking for are

sudo mkdir /Applications/XAMPP/xamppfiles/htdocs/narrowcasting

sudo ln -s /var/www/thumb /Applications/XAMPP/xamppfiles/htdocs/narrowcasting/thumb

Again, you can verify that the link was actually made with

ls -l /Applications/XAMPP/xamppfiles/htdocs/narrowcasting/thumb

if you want to create a SOFT or symbolic link from

/Applications/XAMPP/xamppfiles/htdocs/narrowcasting/link-file

to

/var/www/destination-file

yo do:

$ ln -s /var/www/destination-file /Applications/XAMPP/xamppfiles/htdocs/narrowcasting/link-file

Try to use absolute paths because if not, the paths should be writen not from your current directory but from the directory the link-file will be


Adobe Flash Player Installation Fails I am using Ubuntu 11.10. The Firefox error message says

"A plugin is needed to display this content:
Adobe Flash Player Installer"

So I install it. Then it says "Installed - restart FireFox" I restart Firefox and the same error message appears.

This problem doesn't happen with Windows 7 (IE, Chrome & Firefox are fine) or my previous version of Ubuntu.  Problem occurs when I access CallOfRoma.com

If you have a 64 bit O.S., you should try installing this package in Software Center:

Hope it helps.

How do I install Adobe Flash player?

Download the following zip file and extract it

  ftp://www.daba.lv/pub/MultiVide/MacroMedia/x64/install_flash_player_11_linux.x86_64.tar.gz

after extracting you will get a file name

  libflashplayer.so

copy the file in

  /usr/lib/firefox/browser/plugins

then restart the firefox


Setup DKIM (DomainKeys) for Ubuntu, Postfix and Mailman I'm running Ubuntu 12.04 with Postfix and Mailman. I want to set up DKIM. DomainKeys Identified Mail, or DKIM, is the successor to Yahoo's "DomainKeys". It incorporates Cisco's Identified Mail.

What are the steps for setting this up?

Is opendkim recommended?

The only reference I have is HowToForge, but I prefer to get help here (even if it is just a confirmation of the steps at that link). Actually, I think the info at HowToForge is outdated because it mentions dkim-filter instead of opendkim.

openDKIM and Postfix on Ubuntu Server 12.04LTS

I'll try to come back and format this better. But since there was a request to post my answer, I wanted to post it now rather than wait until I had time to format it properly. Due to lack of time, I wrapped my entire answer in a blockquote. I hope this solution is helpful.

These are my references:

man opendkim-testkey
man opendkim.conf
http://www.serveridol.com/2012/02/17/opendkim-configuring-dkim-keys-on-postfix/
http://stevejenkins.com/blog/2010/09/how-to-get-dkim-domainkeys-identified-mail-working-on-centos-5-5-and-postfix-using-opendkim/
http://blog.example.com/tag/opendkim/
http://blog.tjitjing.com/index.php/2012/03/guide-to-install-opendkim-for-multiple-domains-with-postfix-and-debian.html

and Wikipedia has a good entry on the subject

At a minimum you will need:

Root access to your mail server
Access to update the dns records for your domain

Install opendkim from the repositories:

# sudo apt-get install opendkim opendkim-tools

You must decide on what “selector” you wish to use.  The selector is essentially a word to describe the key you wish to use.  Here I am going to use the selector 201205 as the key became valid in May 2012 (cunning eh?). I give two examples for variety, which will hopefully add clarity. You only need to generate ONE key. However, I am giving both examples so you can compare them.

201205 (1st key)
my_selector (2nd key)

My domain will be example.com, but I'll use a subdomain for my second example:

example.com (1st key)
mail.example.com (2nd key)

I decided to work in the following directory:

# mkdir /etc/opendkim/
# cd /etc/opendkim

Generate the keys in the current directory, using your chosen selector and domain.

# opendkim-genkey -s 201205 -d example.com

You may or may not need to change ownership. See details in my example for the 2nd key below for what ownership and permissions should be.

First you should check if there is a opendkim user (your user/group IDs may be different):

# grep opendkim /etc/passwd
opendkim:x:108:117::/var/run/opendkim:/bin/false

And you probably need to do this:

# chmod 700 /var/run/opendkim

NOTE: These next two commands are NOT needed on Ubuntu 12.04. But if the command above didn't show that user opendkim was set up properly, do it similarly to this:

# useradd -r -g opendkim -G mail -s /sbin/nologin -d /var/run/opendkim -c "OpenDKIM" opendkim
# chown opendkim:opendkim 201205.private
# cat 201205.private
-----BEGIN RSA PRIVATE KEY-----
ABCCXQ...[long string]...SdQaZw9
-----END RSA PRIVATE KEY-----

Now check the public key and notice that there is a bug (in openDKIM 2.5.2 on Ubuntu 12.04)! Where is contains, ;=rsa;, it should contain ;k=rsa;. The k is missing. Please insert it.

# cat 201205.txt
201205._domainkey IN TXT "v=DKIM1;=rsa; p=WIGfM..[snip]..QIDIAB" ; ----- DKIM 201205 for example.com

After being fixed, it will look like this:

201205._domainkey IN TXT "v=DKIM1;k=rsa; p=WIGfM..[snip]..QIDIAB" ; ----- DKIM 201205 for example.com

Furthermore, you probably need to escape the semicolons like this. If you don't want the ending comment, just delete it. Also note that you should add the t=y flag to indicate to receiving servers that you are testing DKIM but not actively using it yet. You are left with a viable resource record:

201205._domainkey IN TXT "v=DKIM1\;k=rsa\;t=y\;p=WIGfM..[snip]..QIDIAB"

You must publish the content of the above public key to your authoritative DNS server. I recommend using a TXT record. There seems to be a bit of controversy on whether to use an SPF record or both types. After a bit of reading, I elected to stick with the TXT record type exclusively, although I don't believe this is the final word on this topic.

You should use a short TTL (time to live) so that you can change the key without waiting ages for it to propagate though DNS. I used 180 seconds.

The second example of generating a key pair was a bit trickier for me. I'll describe what I did. The first element is that I used the domain value "example.com" even though the key will be used for "mail.example.com". I arrived at this via trial and error. It works, while using "mail.example.com" did not work. Unfortunately, I am not aware of the reasons behind this. This is really the only difference I encountered, but it was troubling enough that I felt I should document my experiences with using subdomains. None of the other beginning level tutorials I found did this. Generate a second key:

opendkim-genkey -s my_selector -d example.com

check ownership and permissions of the private key, as above. Here's what they should look like:

# ls -la /etc/opendkim
-rw-------  1 opendkim opendkim  891 May 10 07:44 my_selector.private

After publishing the DNS record, check it with dig. It should return exactly what you entered in the resource record (RR).

$ dig 201205._domainkey.example.com txt +short
"v=DKIM1\;k=rsa\;t=y\;p=WIGfM..[snip]..QIDIAB"

Now, test the key. The commands below assume you are in the directory where the key resides (/etc/opendkim for me).

# opendkim-testkey -d example.com -s 201205 -k 201205.private -vvv
opendkim-testkey: key loaded from /etc/opendkim/201205.private
opendkim-testkey: checking key '201205._domainkey.example.com'
opendkim-testkey: key not secure
opendkim-testkey: key OK

These results are expected. The "key not secure" does not indicate an error. It is an expected consequence of not using DNSSSEC. DNSSEC is coming, but it isn't ready for prime time yet, according to my reading.

Example with 2nd key:

# opendkim-testkey -d example.com -s my_selector -k /etc/opendkim/my_selector.private -vvvv
opendkim-testkey: key loaded from /etc/opendkim/my_selector.private
opendkim-testkey: checking key 'my_selector._domainkey.example.com'
opendkim-testkey: key not secure
opendkim-testkey: key OK

Note that opendkim is reporting that the key is not secure.  This relates to the fact that DNSSEC is not implemented on my DNS server and theoretically somebody could intercept the DNS lookup and replace it with their own key.

Edit the OpenDKIM config file:

# nano /etc/opendkim.conf
# cat /etc/opendkim.conf
# This is a basic configuration that can easily be adapted to suit a standard
# installation. For more advanced options, see opendkim.conf(5) and/or
# /usr/share/doc/opendkim/examples/opendkim.conf.sample.
#
Domain                  example.com
KeyFile                 /etc/opendkim/201205.private
Selector                201205
#
# Commonly-used options
Canonicalization        relaxed/simple
Mode                    sv
SubDomains              yes
# Log to syslog
Syslog                  yes
LogWhy                  yes
# Required to use local socket with MTAs that access the socket as a non-
# privileged user (e.g. Postfix)
UMask                   022
UserID                  opendkim:opendkim
#
KeyTable                /etc/opendkim/KeyTable
SigningTable            /etc/opendkim/SigningTable
ExternalIgnoreList      /etc/opendkim/TrustedHosts
InternalHosts           /etc/opendkim/TrustedHosts
#
Socket                  inet:8891@localhost
#EOF

If you are using my 2nd key example, with the targeted domain “mail.example.com” the entry would still only reference the main domain:

Domain                  example.com
KeyFile                 /etc/dkim/my_selector.private
Selector                my_selector
-----

Note from one of my sources: If you run multiple instances of Postfix you need to add this to the opendkim.conf for each instance (or the ones you want to use opendkim)

Create a file with your text editor /etc/opendkim/TrustedHosts:

Add domains, hostnames and/or ip’s that should be handled by OpenDKIM. Don’t forget localhost.

127.0.0.1
localhost
example.com
mail.example.com
192.168.1.100 #(IP address of your server, if applicable)

(the last line above probably won't be needed. If you do have an IP address to add, make sure you use your own, not the example above.)

Edit /etc/default/opendkim:

Uncomment this row and use port 8891:

SOCKET="inet:8891@localhost" # listen on loopback on port

Make sure your firewall (iptables) allows loopback on localhost:

sudo iptables -A INPUT -i lo -j ACCEPT

Next, Create a file with your text editor /etc/opendkim/KeyTable and add the domain to the KeyTable

Add line:

#EXAMPLE showing my 2nd key:
my_selector._domainkey.example.com example.com:my_selector:/etc/opendkim/my_selector.private

Next Create a file with your text editor /etc/opendkim/SigningTable and add the domain to the SigningTable

I show both examples. Note that for my 2nd key, I now have to use the full domain name "mail.example.com":

example.com 201205._domainkey.example.com
mail.example.com my_selector._domainkey.example.com

Note that in OpenDKIM 2.0.1 domain names are case sensitive. In this example we're using a newer version of OpenDKIM and this does not appear to be a problem.

Configure postfix.  Edit /etc/postfix/main.cf and add the lines to the end

milter_default_action = accept
milter_protocol = 2
smtpd_milters=inet:localhost:8891
non_smtpd_milters=inet:localhost:8891

Also change the hostname:

#myhostname = localhost         #original
myhostname = mail.example.com

You should also change the corresponding entry in /etc/hosts.
These changes are effective after a reboot (although you can set it immediately with the command: hostname NEW_NAME).

Restart postfix and opendkim if you didn't reboot:

# service opendkim restart
Restarting OpenDKIM: opendkim.
# service postfix restart
 * Stopping Postfix Mail Transport Agent postfix   [ OK ]
 * Starting Postfix Mail Transport Agent postfix   [ OK ]

Testing

The best way to check that your signed mail is being authenticated and that your DNS records are properly set up is to use one of the free testing services. I used these:

Brandon Checketts Email Validator - http://www.brandonchecketts.com/emailtest.php (my favorite)
Send a signed email to: check-auth@verifier.port25.com (my favorite also)
Send a signed email to: sa-test@sendmail.net (you can put all of the test email addresses in the To: field of a single outgoing message to test)
Send a signed email to: autorespond+dkim@dk.elandsys.com <--- BROKEN!!! Don't use this one.

Each of these will tell you if things are working properly, and give you some pointers on troubleshooting if needed.

If you have a Gmail account, you can also send a signed message there for a quick and easy test.

Once you are happy that all is well, you can remove the testing flag in the DNS TXT record and increase TTL.

Done!

http://wiki.zimbra.com/wiki/Configuring_for_DKIM_Signing

I always make sure to cross ref a few guides on anything. This tut on set-up works, I just verified it and it validates this one. But, you might want to display an example TXT for the domain record to be detailed. People might get confused and explicitly put everything of the key itself into the p value, which I am not entirely sure is correct. ie...including -----BEGIN PUBLIC KEY----- and  -----END PUBLIC KEY----- . That may lead some to be confused. Just make sure to put just the encryption part and not the markers.


Missing AMD GPU firmware issue on Ubuntu 17.10 While running sudo apt-get update && sudo apt-get upgrade, I get the following error while upgrade process is processing triggers at the end. How to fix it?

I am on Ubuntu 17.10 default configuration. I already have installed available drivers using "Softwares and Updates".

W: Possible missing firmware /lib/firmware/amdgpu/raven_gpu_info.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/raven_rlc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/raven_mec2.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/raven_mec.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/raven_me.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/raven_pfp.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/raven_ce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/raven_sdma.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/raven_vcn.bin for module amdgpu

You can safely ignore those lines.

What you noticed there aren’t "errors". Instead, you’re looking at "warnings" (which you can recognize from the fact that those lines are prepended with a w).

The reason you’re seeing those warnings (and what they don’t tell you) is that all AMD graphics will now load up with llvmpipe and spit out that message (especially in development version).

Anyway, those warnings can be safely ignored.

Nota Bene: What you do not want to do is to fetch the files apt warns about from sources like people.freedesktop.org/~agd5f/radeon_ucode/raven/ as that might introduce a potential attack vector. If you embrace your personal security, don’t simply trust unknown binaries from random sources which can not be verified to be benign.

I'll tell you how to quiet the warnings!

Put the names of the "missing" files with full paths in a temp file. I called my temp file 'myraven'.

Give the command:

sudo touch $( cat myraven )

Done. (You can remove the temp file, of course.)


Is there an equivalent to Adobe Creative Suite? Adobe has the creative suite - are there any alternatives for Ubuntu?

As far as I know, there isn't such thing as a "Creative Suite". What you have instead are several alternatives to the different programs in Adobe's suite:

Gimp vs Photoshop
Inkscape vs Illustrator
Scribus vs InDesign
Tons of editors and IDE's (such as Netbeans, Eclipse or Bluefish; or Kompozer, which is a WYSIWYG HTML editor, or Bluegriffon which is its rewritten although harder to use version) instead of DreamWeaver
etc

Those programs might fulfill your needs individually. The thing that they miss, though, is the great integration between Adobe's suite products (same icons, same GUI, easy to share things between them and so on).

I have an Imac with Adobe CS3, which I was considering to upgrade except for the cost. I rather spend the money on a new computer with more RAM.

I have opted to try Corel Draw Creative Suite 6. I picked it up for 50 bucks on Ebay, the only catch is it only runs on Windows which I can run on a virtual program. I haven't tried it yet because I'm waiting for the new computer with more RAM. That's something you may want to consider.

I'm pretty sure you can run a virtual program with your operating system. Read up on the system requirement for whatever virtual program you use. There is a free one called virtual box, but I don't know how good it is.


Why can't I access my Ubuntu web server or ssh from the internet? I am new to ubuntu server and i have installed ubuntu server on a vm and installed LAMP etc but my problem is that my website is not visible outside.

i have port triggering and added port 21,22 and 80. i really don't know what am doing, i am totally lost! I have a dynamic ip but i can access the server through 192.168.25.1 no matter how many times i restart the modem and from my public ip.

I get redirected to my router settings what should i do??

I am able to listen to all my ports

tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:110             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:143             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:993             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:995             0.0.0.0:*               LISTEN
tcp        0      0 192.168.25.129:22       192.168.25.1:46599      ESTABLISHED
tcp6       0      0 :::110                  :::*                    LISTEN
tcp6       0      0 :::143                  :::*                    LISTEN
tcp6       0      0 :::22                   :::*                    LISTEN
tcp6       0      0 :::25                   :::*                    LISTEN
tcp6       0      0 :::993                  :::*                    LISTEN
tcp6       0      0 :::995                  :::*                    LISTEN

I see that you are getting your router's config page, and this means that your port 80 is not forwarded. Also, you can access it from 192.168.25.1 as that IP is inside your network and never changes(Think of an apartment building that moves around and has its street address change but the apartment numbers are constant). Consider http://freedns.afraid.org to give your network a constant domain name. There is a dynamic DNS link there that gives you a small shell script you can run from a cronjob.

Please enter your router settings and try to use an option like "Port Forwarding" or "Enable Applications". Do not use port triggering. Use static port forwarding. From here, the process is very dependent on you router, so consult its instructions for more help. You can forward the following ports:

80 for HTTP
22 for SSH
443 for HTTPS, if you have a certificate you are using it with

most of the internet service providers doesn't allow traffic from outside in this case you may not be able to access your machine from outside,if your isp allows you and if you are able to do ssh or telnet from outside, please check the port status by using the command netstat -nta and check whether your server port is listening on 192.168.25.1 or 0.0.0.0


Synchronizing 3 servers over IP I'm setting up a medical server for a hospital that has doctors located in 3 different locations, meaning there would be 3 servers (1 in each location). All 3 servers would just have the following software:

Ubuntu Server 12.04 minimal
MySQL, PHP 5, Apache
The medical software which would read/write to the MySQL database
Remote admin apps like Nagios & Webmin
Rsync for backup (rsync-over-ssh) as a cron job

and the doctors at each location would access patient & billing data from their respective servers.

What I'd like is, that each of these servers all have synchronized info (especially the mySQL database's) - let's say on an hourly basis each of these servers synchronize data to a common remote server and the data is then brought down to each of the servers.

I know an easier way would be to have the medical app running on a remote web server, but since this is medical that we're talking about and knowing how common it is in our area for the net to go gown, I wouldn't like a web based scenatio.

Is such a setup possible?
Would this be the right way to do things or is there a better way to this?

Would really appreciate views and comments (or how to set this up) on this.

For your mysql databases take a look at this:

https://www.percona.com/software/mysql-database/percona-xtradb-cluster

Percona XtraDB Cluster with Galera on Ubuntu Server 12.04 LTS 3 nodes

Percona XtraDB Cluster is a high availability and high scalability solution for MySQL users. XtraDB Cluster integrates Percona Server with the Galera library of high availability solutions in a single product package. XtraDB Cluster enables users to save money through:

Less downtime and higher availability

Reduced investment in high availability architectures

Lower DBA training and education costs

No investment in third-party, high availability solutions

For HA (High Availability) solutions see

Heartbeat

Pacemaker

Corosync

DRBD


How can I uninstall Ubuntu 12.04/13.04? Is it possible to uninstall Ubuntu 12.04/13.04 and if so how?

I am currently dual booting it with Windows 7 (and it wasn't installed via Wubi and I don't have a system repair disk.

Thanks

You can unninstall by formatting the partition where Ubuntu is. You can do this by either downloading a partition manager software for Windows(like Magic Partition Manager) or by using gparted live-cd. You maybe wil have to use Windows installatio disk to repair the boot of Windows or you can use a Ubuntu live cd and install grub again on the disk. Recommended the use of Windows installation disk.


The ADT tools bar does not work? I download the ADT ball from the Internet and unpack it on Ubuntu 13.10.but the menu bar doesn't work,it cannot show any content when I click it.

Try to run eclipse as sudo.

In my case I tried with:

    sudo /home/iocio/Desktop/adt-bundle-linux-x86-20131030/eclipse/eclipse

and the problem is solve it.

Edit: Why do you put me -1 point?? Thank you guy.


Scanner not detected - invalid argument It seems my Brother MFC-9120-CN is not detected whenever I want to scan an image.
The printer works fine, however. The device is directly connected in my local network.

➜  ~  scanimage -L
device `brother3:net1;dev0' is a Brother MFC-9120CN SCANNER_BROTHER
➜  ~  scanimage --test
scanimage: open of device brother3:net1;dev0 failed: Invalid argument
➜  ~  scanimage
scanimage: open of device brother3:net1;dev0 failed: Invalid argument

Same result with simple-scan.

What should I do?

I had this same problem and just stumbled upon this solution https://bugs.launchpad.net/ubuntu/+source/simple-scan/+bug/848575/comments/3

Brother provides packages brscan, brscan2, brscan3, ..., which contain necessary drivers. Unfortunately, the shared libraries (drivers) are stored below /usr/lib64 and /usr/lib64/sane, but scanimage tries to load them from /usr/lib and /usr/lib/sane.

So, the solution is to copy or link these files to the proper directories

ln -s /usr/lib64/sane/libsane-brother* /usr/lib/sane
ln -s /usr/lib64/libbrscandec* /usr/lib
ln -s /usr/lib64/libbrcolm* /usr/lib

The 32 bit version doesn't have this problem, because the shared objects are stored in the correct location.

To see result you ought to type in terminal next:

scanimage -d brother3:net1:dev0 --resolution 150 --mode Color --format=tiff > /tmp/test.tif

P.S. Don't forget to put some paper into scanner to be scanned. Then you see result of scanning into /tmp/test.tif file.


Keyboard shortcut to a sudo-script How do I create a keyboard shortcut to a script that needs sudo privileges?
I tried to create shortcuts via Ubuntu Keyboard Settings GUI to scripts

  "sh script.sh"
  "sudo sh script.sh"

They don't work.

sudo requires a terminal to get the password from. Use gksudo instead; it asks for the password via a gui dialog box.

gksudo -- script

This Only work for kde desktop.

If You dont want enter your password any time use shortcut you can Use this:

echo <password> | sudo -S <script>


Ubuntu 16.04 boot freezes intermittently at boot Recently I've installed Ubuntu 16.04 LTS on my desktop, the specs are:

Processor:
AMD Phenom(tm) II X4 965 Processor × 4
GPU:
Radeon HD 5850

And sometimes, right after I press enter on grub (I dual boot with windows), the screen goes blank and the computer freezes, the only way out is to reset it. The weird thing is that it only happens like, 50% of the time. Sometimes it works as usual. After boot, the system works as expected.

I suspect it has something to do with the video card, but I have no clue on how to investigate it. I don't know how can I access some kind of log of the crash, because it happens on the boot start and I get literally no input.

Do you guys have any idea on how to solve this? I will be glad to provide more information, if needed.

Thanks.

If its happening after the loading of grub, its unlikely to be a hardware issue so much as a driver issue. If the freezes are causing corruption you can use something like http://www.supergrubdisk.org/ to scan and fix boot partitions.

If its a driver issue I would highly recommend using the open source Radeon driver NOT the AMD Catalyst driver if you can support it. https://help.ubuntu.com/community/RadeonDriver

Outside of this the only real way to test graphic card failures, is try the system with a different card and see if the problem goes away, but if its happening intermittently that may not be easy to check unless you have another graphics card laying around.

If you install Ubuntu on your PC and it don't boot, answer me: does the local disk is appearing during boot?
If not, then it means that you installed Ubuntu on your boot partition, you should check it out


Webcam not working on Ubuntu 20.04 after recent kernel update My builtin webcam stopped working after a kernel update issued after 22 April 2020 . Before this date i was able to take pictures on cheese and video call etc , and for a while i didn't use my webcam until yesterday i noticed that my webcam is getting detected as "usb 2.0 web camera" but its not working at all . Cheese shows a black screen when opened and Firefox asks for permission and then nothing happens . So i changed the kernel to version 5.0 and webcam started working properly . But i need to work it on the latest Ubuntu kernel . Any help will be thankful .

output of sudo lshw:

*-usb:1
    description: Video
    product: USB 2.0 Web Camera
    vendor: Alcor Micro, Corp.
    physical id: 2
    bus info: usb@1:1.2
    version: 0.08
    capabilities: usb-2.00
    configuration: driver=uvcvideo maxpower=200mA speed=480Mbit/s

issue got solved with kernel 5.4.0-37-generic .
https://bugs.launchpad.net/ubuntu/+source/linux-signed/+bug/1881757

For me there was permission issue.
The group and permissions for your /dev/video* files were icorrect. The group root for your /dev/video* will deny access to the camera for users outside this group.
The output of ls -l /dev/video0 should look like this:
crw-rw----+ 1 root video 81, 1 Apr 19 22:25 /dev/video0
crw-rw----+ 1 root video 81, 1 Apr 19 22:25 /dev/video1
Try fixing the group by running:
sudo chown root:video /dev/video*
Then fix permissions by running:
sudo chmod 666 /dev/video*
It worked!!


How to recover the root password on ubuntu server I lost my root/super user password on Ubuntu server.
I tried to boot in a recovery mode and select option drop to root shell.

But it is always asks for:

Give root password for maintenance (or type Control-D to continue)

and I don't remember it.

Try Control-D when it prompts you for the root password. If that doesn't work, then try this:
http://www.howtogeek.com/howto/linux/reset-your-forgotten-ubuntu-password-in-2-minutes-or-less/
Then scroll down to "Alternate Root Shell Method".

There is no root password in Ubuntu.  This is a security feature:  it's impossible to log in as root, no password means there is no password that can be cracked.

When prompted for the password in recovery mode, just hit [enter].


How to search entire hard drive for a file? Trying to locate a file, how can I search the entire hard drive for a file?

A simple find / -type f -name "" would do the trick if you know exact filename.

find / -type f -iname "filename*" if you want to match more files (ignore case).

Avoid -type option if you want to search for directories etc. See manual of find for more information. To see the manual, issue the command:

man find

If need to find nested in some dirs:

find / -type f -wholename "*foo/bar/filename"


Is there any tool for converting from .pdf to .chm? I googled this title and all I encountered was chm -> pdf searches. Isn't it possible from pdf to chm ? Or if it is possible which tools do this ?

I know this may not be what you're looking for, but the only way I know how to do it, is using PDF2CHM.

The only problem it only available for windows.  So your option is to run it under Wine.

You can try chm2pdf, to get it:

sudo apt-get install chm2pdf


Uninstall empathy without affecting dependencies I am trying to uninstall empathy from my Ubuntu 12.10. So I issued the following command

sudo apt-get purge empathy
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:

  account-plugin-identica account-plugin-twitter gir1.2-messagingmenu-1.0

Use 'apt-get autoremove' to remove them.

The following packages will be REMOVED:

  account-plugin-aim* account-plugin-jabber* account-plugin-salut* account-plugin-yahoo* empathy* **gnome* gnome-core*** mcp-account-manager-uoa* nautilus-sendto-empathy*

0 upgraded, 0 newly installed, 9 to remove and 0 not upgraded.

After this operation, 8,664 kB disk space will be freed.

Do you want to continue [Y/n]?

It is trying to remove gnome and gnome-core by default. Will it really uninstall gnome as well? How do I uninstall empathy without affecting gnome?

EDIT: As suggested by vasa1 in the comments, I tried marking the packages as manual using

  sudo apt-mark manual gnome gnome-core

That also didnt help.

If, as appears to be the case, gnome and gnome-core depend on empathy (or some other package that depends on it), even if you manage to uninstall empathy without removing packages that depend on it, whatever depends on it won't work and you'll (in this case) wind up with a system that, at best, will boot to a command line.  It may not even complete booting to a text login prompt, depending on what else depends on empathy, through whatever length chain.

Open synaptic package manager and type empathy in the search box and remove that single package.

Vasa1 gave us CLI way and I am giving GUI way .


ASCII art generator with OCR What program can turn an image into ASCII-art, but also replace any text with the actual text with OCR. For example, for converting a comic to ASCII art.

ASCII art generators:

aa3d
AA-project
libcaca
GIMP

For OCR there are many options, depending on the goals, but not something that will directly output ASCII-art. In any case check out the OCR page at the Wiki.


How to verify if a repository is already added I have two repository that I want my script to verify if they are on the system. How can I verify by command line if a repository is already added to the system and, if not, add them?

You can see all repository enabled in terminal with this command below (It will print all repository line starting with deb or deb-src)

find /etc/apt/ -name *.list | xargs cat | grep  ^[[:space:]]*deb

Explanation: first find find all files with .list extension in /etc/apt directory and feeds xargs the list, which in turn print all text on all of those files to the display device i.e Monitor. Then grep select those lines of which starts with deb. I have used extra step to include those lines also which starts with whitespace characters instead of deb.

If you want to see only the repositories with binary packages not source packages (deb-src), use another grep to exclude entries with deb-src like this one:

find /etc/apt/ -name *.list | xargs cat | grep  ^[[:space:]]*deb | grep -v deb-src

To add the repository using command line, just use this kind of command:

(I am assuming your repository source line is like this deb http://mydomain.com/ubuntu precise main )

echo deb http://mydomain.com/ubuntu precise main | sudo tee -a /etc/apt/sources.list

This command uses tee program which is used to read and write from standard input to standard output. Here, it takes the echoed repo line and put that line at the end of /etc/apt/sources.list file which is the main repository source file.

Please note that without using -a option for tee the entire sources.list will be replaced with the just echoed line.

Alternatively you can use your own file for the custom repo without touching sources.list file. For example,

echo deb http://mydomain.com/ubuntu precise main | sudo tee -a /etc/apt/sources.list.d/teles.list

It will create a file in /etc/apt/sources.list.d directory with name teles.list containing line deb http://mydomain.com/ubuntu precise main.

Note that, to add repository source to the system your script need to be run with root priviledge

I dont know if this is what you need but typing

software-properties-gtk

in a terminal or in dash-command windows will open a list of software sources.

Use this command to add your PPA

sudo add-apt-repository ppa:YOUR PPA HERE

Hope that helps

EDIT: You can edit the file with sudo nano /etc/apt/sources.list if that's needed. nano is a terminal text editor you may have to do this first

sudo apt-get install nano

to install it.


Accessing Ubuntu-based VPS from my Ubuntu 14.04 LTS PC I just installed Ubuntu 14.04 on my PC alongside Windows 8.1. My problem is, I want to connect to my Ubuntu VPS using my Ubuntu PC but it's not working.

I tried ssh root@vps-ip-add but nothing happens.

Is the command correct? or do I need to install something? Thanks for the info.

My vps is freshly-installed with Ubuntu 12.04. I am using a proxy to connect my pc to the internet.

You must install openssh-server on your ubuntu-vps

sudo apt-get install openssh-server

https://help.ubuntu.com/12.04/serverguide/openssh-server.html


bash: "Y": command not found I have installed some tools on my Ubuntu 18.04 and apparently something went wrong.

There are a couple of phenomenons.

The first is that Ctrl+Alt+t does not open a terminal. In order for me to open a terminal, I need to right click the desktop and press the "Open a new terminal" button.

Additionally, whenever I run a script that prompts with a question and waits for an answer, the script crashes. For example, the below happens when I run SQLmap:

eliko@ubuntu:~/Desktop/Tools/sqlmap$ ./sqlmap.py -u
https://nice.app.com/forgot_password?email=rob@bob.com&key=cc
[4] 2652
eliko@ubuntu:~/Desktop/Tools/sqlmap$
[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program

[*] starting @ 08:46:58 /2019-12-29/

[08:46:59] [INFO] testing connection to the target URL
[08:46:59] [CRITICAL] previous heuristics detected that the target is protected by some kind of WAF/IPS
[08:46:59] [INFO] testing if the target URL content is stable
[08:46:59] [WARNING] target URL content is not stable (i.e. content differs). sqlmap will base the page comparison on a sequence matcher. If no dynamic nor injectable parameters are detected, or in case of junk results, refer to user's manual paragraph 'Page comparison'
how do you want to proceed? [(C)ontinue/(s)tring/(r)egex/(q)uit] Y
bash: Y: command not found

[4]+  Stopped                 ./sqlmap.py -u

From my understanding, there's both an issue that the process is created in background or something (I'm not a Linux master, but I think because it shows "[4] 2652" and then continues).

The bash: Y: command not found error occurs for any letter inserted including solely hitting ENTER.

I assume the above described set of issues are related to one problem probably caused by tools installations.

I already tried to copy the .bashrc by executing (I saw on some thread this may help):

cp /etc/skel/.bashrc ~/.bashrc

and also tried to restart the machine.

This is the output I get from echoing PATH:

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

What can I do to fix the issue? I cannot use any tool that receives input and seems something is wrong with bash probably.

The issue is likely the & character in your URL - which is causing the shell to place the command in the background (as indicated by the [4] 2652 job number / pid).

Try quoting the URL string:

./sqlmap.py -u "https://nice.app.com/forgot_password?email=rob@bob.com&key=cc"

"Y" is not a valid response to
how do you want to proceed? [(C)ontinue/(s)tring/(r)egex/(q)uit]

Choose either C to continue (Normally the uppercase is the default, so a return should also continue).
Guessing for the lower case letters:
 s stands for a string, which is passed to bash to run as a program (so Y is not a valid program, so, not found).
r stands for a regular expression, expanded then probably treated like a string,
 or q stands for the special string "quit"


How do I make my native Windows 8 Lenovo laptop boot grub? I like to think I'm not a novice on this issue but this situation is proving me wrong. I've been trying for about two days to figure out a way for my Lenovo S415 to install Ubuntu. I have disabled SecureBoot, turned on Legacy support, and I have gotten it to the point of having the USB appear in the list of boot options. But when I do try, it says missing operating system and kicks back over to the main Windows boot controller.

I cannot even get grub to appear at all. I don't think it's a problem with the flash drive; I've tried every USB creator more than once and it solves nothing. The BIOS settings are changed to everything that seems reasonable. I want to completely wipe the drive and replace it with Ubuntu. I don't care about keeping Windows on here.

If all else fails, I have another computer here to use and I don't care if I have to wipe this one in the process. How would I install Ubuntu from scratch?

It's been a long two days and I greatly appreciate the help!

I have a Lenovo S415 with the AMD A6 processor. I was able to boot into a live USB install of Ubuntu (and Mint as well). Here's what I did...

In BIOS Boot window,

Boot Mode: Legacy Support
Boot Priority: Legacy First
USB Boot: Enabled

After setting the above in the BIOS Boot window, I powered off the laptop, plugged in the USB containing Ubuntu, and then pressed the Novo button (on the side of the S415 laptop near the regular power button).
Laptop powers on, shows me a "Novo Button Menu" with 4 options, one of which is "Boot Menu". I choose that and press Enter.
A new "Boot Manager" screen opens up and I see

SATA HDD
Generic USB Flash Disk
Network Boot: Realtek PXE
Windows Boot Manager
EFI USB Device (Generic USB Flash Disk)

I choose the last one (EFI USB device) and press Enter. I see a brief message "Secure Boot not enabled" and in less than a second, I see the GRUB menu for Ubuntu with options "Try Ubuntu without installing", "Install Ubuntu" etc.

Hope this helps! Good luck.

just in case any one else finds this like I did, here's what I did.

Put the ISO on a thumb drive.  interrupt the boot, tell it to boot to USB (this was a pain, i just kept not getting it to work, until the windows 8 menu came up to "reboot to startup menu" or some such choice)

boot.  install.


Can switch bluetooth profile only after 3 times restarting bluetooth I have a August EP650 bluetooth headset and problems with swichting the audio profile.

I switch between telephony (HSP/HFP) and music listening (A2DP) a lot, so this is quite annoying.

Each time I boot my system, I can switch the profile using the GUI:

In the syslog I get:

Aug 16 08:59:20 orange pulseaudio[7711]: [pulseaudio] bluez5-util.c:
   Transport Acquire() failed for transport
   /org/bluez/hci0/dev_00_12_D0_02_90_27/fd0 (Operation Not Authorized)

I already made the modification as suggested here:

Edit the file:
/etc/pulse/default.pa
and comment out (with an # at the beginning of the line) the following line:
#load-module module-bluetooth-discover
now edit the file:
/usr/bin/start-pulseaudio-x11
and after the lines:
   if [ x”$SESSION_MANAGER” != x ] ; then
    /usr/bin/pactl load-module module-x11-xsmp “display=$DISPLAY session_manager=$SESSION_MANAGER” > /dev/null
    fi
add the following line:
    /usr/bin/pactl load-module module-bluetooth-discover

But the problem persists.

Now if I execute around 3 times sudo service bluetooth restart and my headset switches off, I can reconnect the headset and the switching works flawlessly.

How can I fix that?

edit

pacmd -> list-cards prints

profiles:
    headset_head_unit: Headset Head Unit (HSP/HFP) (priority 20, available: unknown)
    a2dp_sink: Hi-Fi-Wiedergabe (A2DP-Senken) (priority 10, available: yes)
    off: Aus (priority 0, available: yes)

But in the above case I am connected to headset_head_unit - and still cannot change to a2dp_sink

edit2

I found out, that when I remove the module loading from the x11-pulseaudio completely and then load the module after connection the headset manually via

$ pacmd
Welcome to PulseAudio 8.0! Use "help" for usage information.
>>> load-module module-bluetooth-discover

it works directly - the question is, how can I automate that?

Try it from the command line. You can use pacmd to change audio options. The command for changing the default output sink is

$ sudo pacmd set-default-sink "OUTPUTNAME"

The command for changing the input is

$ sudo pacmd set-default-source "SOURCENAME"

I think the problem could be that you may not have sudo privileges. However, I am not sure if pacmd requires root privileges. Try it and tell me if it works.

If you do not know the name of the sink you want, try listing them

$ sudo pacmd list-sinks

If you need any further help, just let me know in the comments.

i found that with my plantronics back beat pro headset connecting to a Intel Corporation Wireless 7260 on 16.04 , it will connect at first in HSP mode and will not switch to A2DP unless disconnected and reconnected , then it will allow the switch. I can do this without any real delay using the sound settings control panel applet

This seems to map to the 3 times you have suggested and is consistently repeatable , its not perfect but it does work.