No Internet Connection after macchanger i ran the following :

sudo ifconfig wlp68s0b1 down
sudo macchanger -r wlp68s0b1
sudo ifconfig wlp68s0b1 up

Then found no internet connection , in order to restore the connection i ran :

service network-manager restart

but that gives me the old MAC again

my hardware is : Broadcom Limited BCM4313 802.11bgn Wireless Network Adapter (rev 01)

any ideas ?

try dhclient after sudo ifconfig wlp68s0b1 up.


Install Times New Roman in Ubuntu 12.10 I was trying to install Times New Roman font using the commands

sudo apt-get install msttcorefonts
sudo apt-get install ttf-mscorefonts-installer

Now while implementing the first command, an agreement window appears with an <ok> at the bottom of the window which I am supposed to press. But unfortunately the <ok> has no links and it cannot be pressed or accepted hitting ENTER.

What to do ?

You need to press the Tab key to move the selection over <ok> so it's highlighted, then press enter.

If you can download it or copy it from another computer, simply make a new folder in your home entitled .fonts and paste the fonts inside (the dot before the folder name makes it hidden).


How can I stop LibreOffice from randomly crashing? Libreoffice keeps on crashing randomly.  It will do this when I am typing and when I am switching desktops or anything.  There is no patter to it.  I need some help here.  Anyone had this problem or problem similar to it?   Anyone have found a fix.  Also it seems to happen especially prominently after my screensaver has started.  I would say it happens about 97% of the time after that.  This is an annoying bug and is keeping my productivity low.

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

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

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

I fixed my LibreOffice by reinstalling it.  Ubuntu was using an unstable version of Libre and that was what probably caused it.


Win7 no longer available after installing 12.04 I have installed Ubuntu 12.04 but my Windows 7 partition seems to have been lost. It is in sda2.

Can anyone help me how to get this Windows 7 partition back without having to reinstall Windows 7?

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xd45cd45c

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048    61433855    30715904   83  Linux
/dev/sda2   *    61433856   122873855    30720000    7  HPFS/NTFS/exFAT
/dev/sda3       122873856   976769023   426947584    7  HPFS/NTFS/exFAT

Disk /dev/sdb: 203.9 GB, 203928109056 bytes
255 heads, 63 sectors/track, 24792 cylinders, total 398297088 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x03ee03ee

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *          63    20482874    10241406    c  W95 FAT32 (LBA)
/dev/sdb2        20482875    40965749    10241437+  1c  Hidden W95 FAT32 (LBA)
/dev/sdb3        40965750   398283479   178658865    f  W95 Ext'd (LBA)
/dev/sdb5        40965813    76694309    17864248+   7  HPFS/NTFS/exFAT
/dev/sdb6        76694373   108856439    16081033+   7  HPFS/NTFS/exFAT
/dev/sdb7       108856503   398283479   144713488+   7  HPFS/NTFS/exFAT

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
240 heads, 63 sectors/track, 129201 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000001

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *          63    20480543    10240240+  82  Linux swap / Solaris
/dev/sdc2        20480605  1953519119   966519257+   f  W95 Ext'd (LBA)
/dev/sdc5        20480607  1953519119   966519256+   7  HPFS/NTFS/exFAT

Try running update-grub in a terminal. It should show something like...

using custom appearance settings
Found linux image: /boot/vmlinuz-3.2.0-24-generic
Found initrd image: /boot/initrd.img-3.2.0-24-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda1
done

Another option to try is to download and install grub-customizer from the software centre and see if it's detected in there.

Here's my GRUB windows 7 config

Maybe... Here's a copy of my Windows 7 Partition GRUB config.

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sda1)" --class windows --class os {
        insmod part_msdos
        insmod ntfs
        set root='(hd0,msdos1)'
        search --no-floppy --fs-uuid --set=root 165A6AB45A6A9073
        chainloader +1
}
### END /etc/grub.d/30_os-prober ###

Perhapse this will help you know what needs to be in the config file /boot/grub/grub.gfg. of course, yours would be sda2. Also, I'm not sure what the search line represents. The number at the end may not be what is required? Hope this helps.

It seems, Window 7 Bootmanager is no longer working. And Boot is using Grub.

Try this:
You must be having window 7 disk.
Boot from it. Select Repair Console.

Type in Console(CMD)

fixmbr
fixboot

Hope, it get fixed.


How can I change the icon of a fogger app I've made several fogger apps (without any code, so basically they're just hyperlinks in the unity launcher). How can I change the icon of these 'apps'? (Do I, for example, need to make a stylesheet?)

Well you could open the Fogger-App with an editor like Scratch and change the icon. This should look like:

[Desktop Entry]
Name=Google Music
Comment=Google Music
Categories=Network;WebBrowser;
Exec=/opt/extras.ubuntu.com/fogger/bin/fogger 2c9d692a576395c5d7a2c91b5a101d09
TryExec=/opt/extras.ubuntu.com/fogger/bin/fogger
Icon=/usr/share/icons/eNumix-uTouch/apps/48/google-musicmanager.svg
Terminal=false
Type=Application
StartupNotify=true
StartupWMClass=fogapp-2c9d692a576395c5d7a2c91b5a101d09
Keywords=fogger;fogapp;

You will have to change two app files one for the Launcher and one for fogger.

I use Slingshot on elementary OS Luna and had to changes these app files:

Fogger:
    /home/USERNAME/.local/share/fogapps/

Slingshot:
    /home/USERNAME/.local/share/applications

When creating a fog app, click on the icon left to the name & url field, then select your icon. Or: drag & drop an icon to the new fog app window.
NB: If you want to add an icon to an existing app, first delete the old app and then create a new app with the icon. Replacing a fog app will not lead to an updated icon.


Dell XPS 13 (2015) Black Screen UPDATING:

I followed every step of this guide but still getting the black screen with the system alive and can't go to tty1-6. So now I'm on Ubuntu 15.04 (kernel: 4.1.3-040103-generic). I found this messages from dmesg but i don't think that are related to my main problem:

Error parsing PCC subspaces from PCCT
psmouse serio1: synaptics: Unable to initialize device.
i2c_hid i2c-DLL0665:01: failed to retrieve report from device.

Any help please?

First Post:

I bought a Dell XPS 13 (2015 - 9343)/QHD+/8GB/256SSD with Windows 8, updated BIOS to A04 and then installed Ubuntu 14.04 (kernel: 3.16). The problem is I'm getting a black screen sometimes after booting, after login and when returning from suspend. I can go to tty1-6 and then CTRL+ALT+F7 that sometimes return to normal but normally it needs a reboot.

I also already tried installing Ubuntu 15.04 (kernel: 3.19) and elementary OS Freya (kernel: 3.16) but always getting the same problem.

$ lshw -c video

 *-display
      description: VGA compatible controller
      product: Broadwell-U Integrated Graphics
      vendor: Intel Corporation
      physical id: 2
      bus info: pci@0000:00:02.0
      version: 09
      width: 64 bits
      clock: 33MHz
      capabilities: vga_controller bus_master cap_list rom
      configuration: driver=i915 latency=0
      resources: irq:48 memory:f6000000-f6ffffff memory:e0000000-> efffffff ioport:f000(size=64)

I added xorg-edge ppa and upgraded but it didn't solve the problem either.
I also installed this packages (http://www.dell.com/support/article/uk/en/ukdhs1/SLN297551/en?c=uk&s=gen&cs=&l=en) but still with the problem.

$ lshw -c network

  *-network
      description: Wireless interface
     product: BCM4352 802.11ac Wireless Network Adapter
    vendor: Broadcom Corporation
      physical id: 0
      bus info: pci@0000:02:00.0
      logical name: wlan0
      version: 03
      serial: ac:d1:b8:c1:0d:6b
      width: 64 bits
      clock: 33MHz
      capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
      configuration: broadcast=yes driver=wl0 driverversion=6.30.223.248 (r487574) ip=192.168.1.38 latency=0 multicast=yes wireless=IEEE 802.11abg
      resources: irq:19 memory:f7200000-f7207fff memory:f7000000-f71fffff

I have the exact same issue, right now the workaround is to suspend/resume or blindly open terminal through Ctrl+Alt+T and type xset dpms force off then just move the mouse and screen should be back.

I still haven't been able to find a real solution.

take a look here, quite good feedback for XPS13 setup. I'm running A03 + Ubuntu 15.04 Linux 3.19.0-25-generic #26-Ubuntu https://major.io/2015/02/03/linux-support-dell-xps-13-9343-2015-model/


Find installed documentation Where can I find the installed documentation for a library that I have installed?
For example: in synaptic package manager, I have installed opencv-doc. Where can I find this documentation.

In general each Debian package you install also will contain the resulting file location on your system after installation. Packages can be opened and viewed with the Archive Manager.

Alternatively we may also browse a package content on http://packages.ubuntu.com where all packages in the repositories should be listed. For opencv-doc this will reveal the following file list:

/usr/share/doc/opencv-doc/CMakeLists.txt
/usr/share/doc/opencv-doc/README.Debian
/usr/share/doc/opencv-doc/acircles_pattern.png
/usr/share/doc/opencv-doc/changelog.Debian.gz
[...]

This package like many other documentation files will therefore install to /usr/share/doc/<packagename>.

In terminal you can type opencv-doc --help to get the help. You can also try in the finder located on the top left corner and can search there.

Also In Synaptics Package manager, just review the components under the Installed sub-tab. You may find your installed programs there.

UPDATE

Adding screenshots for more clear flow of actions.


Why doesn't this show the hidden files/folders? I was looking through my system with du -sch ./* to find the big useless files I may have stockpiled with no reason, when I found this:

$ du -sch ./*
du: cannot read directory ‘./drbunsen/.gvfs’: Permission denied
du: cannot read directory ‘./drbunsen/.cache/dconf’: Permission denied
18G ./drbunsen
18G total

$ cd drbunsen/
$ du -sch ./*
601M ./Desktop
20K ./Documents
598M ./Downloads
4.0K ./flash
4.0K ./Music
8.0M ./Pictures
4.0K ./Public
4.0K ./Templates
4.0K ./Ubuntu One
8.0K ./Videos
11G ./VirtualBox VMs
6.9M ./workspace
12G total

How do I make hidden files visible? du -sch ./.* gives the same result as du -sch ./*.

Use

du -sch .[!.]* * |sort -h

in your home folder.

Alternatively, the command I use most frequently is

ncdu

Easy to install if needed:

sudo apt-get install ncdu

When you run that same command inside the directory, it is not including the hidden files which start with . in the count. If you have Steam for example installed, it default to installing games under ~/.local/share/Steam/ and it itself is installed there as well.

Under bash you apparently need to run du -sch .[!.]* * as it does not properly expand the .* glob. Under zsh or other shells, du -sch * .* should work, as .* should be expanded to include the list of all hidden files in the current directory.


USB turn write protection off I have a USB which is write protected:

dmesg | tail

[10098.126089] sd 7:0:0:0: [sdb] Write Protect is on
[10098.126098] sd 7:0:0:0: [sdb] Mode Sense: 23 00 80 00
[10098.126779] sd 7:0:0:0: [sdb] No Caching mode page present
[10098.126788] sd 7:0:0:0: [sdb] Assuming drive cache: write through
[10098.131418] sd 7:0:0:0: [sdb] No Caching mode page present
[10098.131425] sd 7:0:0:0: [sdb] Assuming drive cache: write through
[10098.133335]  sdb: sdb1
[10098.135509] sd 7:0:0:0: [sdb] No Caching mode page present
[10098.135515] sd 7:0:0:0: [sdb] Assuming drive cache: write through
[10098.135521] sd 7:0:0:0: [sdb] Attached SCSI removable disk

How can I turn the write protection off?

What I've tried

Checked if it has a hardware switch - no
Tried to format it on windows and on Linux (via terminal too)
Tried fdisk | chmod
Tried to fix this with several tools from Ubuntu software center
Used Google and have seen about 10,000 discussions about this problem but they were never solved

Additional information

fsck -n /dev/sdb1

fsck from util-linux 2.19.1
dosfsck 3.0.9, 31 Jan 2010, FAT32, LFN
There are differences between boot sector and its backup.
Differences: (offset:original/backup)
  65:01/00
  Not automatically fixing this.
Free cluster summary wrong (968250 vs. really 911911)
  Auto-correcting.
Leaving file system unchanged.
/dev/sdb1: 50 files, 93653/1005564 clusters

fdisk -l

   Device  boot.   Start        End      Blocks   Id  System
/dev/sdb1            32     8060927     4030448    b  W95 FAT32

umount /dev/sdb1

mkfs -t vfat /dev/sdb1

mkfs.vfat 3.0.9 (31 Jan 2010)
mkfs.vfat: unable to open /dev/sdb1

To turn off disk device`s write protect, we use the low level system utility hdparm like this:

sudo hdparm -r0 /dev/sdb

where we asume that /dev/sdb is the Physical disk device we're working on.
If the device has partitions that are mounted as read-only, you should re-mount 'em as read-write in order to write data to them.

Hope that helps.

Insert memory stick and start gparted. Select it via the button at top right. It should be obvious if you are inspecting your memory stick (Size is a good clue). Select Partition--> unmount.

Select 'Device' at top, then 'Create Partition Table' and take the default, which is msdos.

Now you should be able to create a new partition and format it f32. If you can't, it's probably bust.

HTH


Can't extend root partition even after booting from LiveUSB After doing some research on how to extend Ubuntu root partition, I tried to extend it using the GParted from a liveUSB session of Ubuntu. But I couldn't extend it. When I right click on my root partition and select resize/move, it doesn't offer me the unallocated space. Here is the screenshot of GParted showing my current partition structure:

Somewhere on AskUbuntu I read that unallocated space has to be inserted into the Extended partition. I don't know if that's true and I don't know how to move it into the Extended partition. Please help me, I spent the whole day behind this...

First of all you need to understand that sda5, sda6, sda7 and sda8 are inside sda3.

After that it looks simpler.

Boot from LiveCD. Do not mount any partitions by clicking them.
Run sudo swapoff -a
Expand sda3 left.
Move sda5, sda6, sda7 left.
Expand sda8 left.

Do not forget to press "Apply" button.

After you do it you also need to update grub this way.

sudo mount /dev/sda8 /mnt
sudo chroot /mnt
sudo update-grub
exit

Your partitioning scheme seems overambitious, but here goes. The structure of partitions on the disk has to be kept simple, since the BIOS has to be able to find something to boot. Thus, the restriction that you can only expand/move a partition to adjacent free space and cannot have fancy split partitions. Thus, if you MUST expand / (mounted on /dev/sda8), here is what to do:

Move /dev/sda5 54 GiB to the right, putting the free space between /dev/sda5 and /dev/sda6.

Move /dev/sda6 54 GiB to the right, putting the free space between /dev/sda6 and /dev/sda7.

Move /dev/sda7 54 GiB to the right, putting the free space between /dev/sda7 and /dev/sda8.

Finally, you can expand /dev/sda8 into the adjacent free space.

This will take a long time (do not do it on battery), and runs the risk of destroying ALL the data on /dev/sda5, /dev/sda6, /dev/sda7 and /dev/sda8. Not much of a risk if you are carefull, but I would be remiss if I did not suggest backup, Backup, BACKUP!


How to enable or disable services? I read about how to enable and disable services in Ubuntu and it seems that there are different possibilities to manage them.

The first method I found is update-rc.d to add new services to startup, which aims on the /etc/init.d folder and its contents.

The other one I found is to edit .conf files in the /etc/init folder.

What's the recommended way to enable / disable / add services and why?

Could you please give a short bulletproof step by step example on how to add a service in Ubuntu and enable and disable it?

There are services that can be enabled/disabled using the GUI (like the startup application) or the terminal.

For the Terminal you have several options. First, open a terminal (Type "terminal" in the dash, for example, and open it). Then:

Temporary enabling/disabling services

To stop and start services temporarily (Does not enable / disable them for future boots), you can type service SERVICE_NAME [action]. For example:

sudo service apache2 stop (Will STOP the Apache service until Reboot or until you start it again).
sudo service apache2 start (Will START the Apache service assuming it was stopped before.).
service apache2 status (Will tell you the STATUS of the service, if it is either enabled/running of disabled/NOT running.).
sudo service apache2 restart (Will RESTART the service. This is most commonly used when you have changed, a config file. In this case, if you changed either a PHP configuration or an Apache configuration. Restart will save you from having to stop/start with 2 command lines)
service apache2 (In this case, since you did not mention the ACTION to execute for the service, it will show you all options available for that specific service.) This aspect varies depending on the service, for example, with MySQL it would only mention that it is missing a parameter. For other services like networking service it would mention the small list of all options available.

SYSTEMD

Starting with Ubuntu 15.04, Upstart will be deprecated in favor of Systemd. With Systemd to manage the services we can do the following (through the systemctl action SERVICE pattern):

systemctl start SERVICE - Use it to start a service. Does not persist after reboot

systemctl stop SERVICE - Use it to stop a service. Does not persist after reboot

systemctl restart SERVICE - Use it to restart a service

systemctl reload SERVICE - If the service supports it, it will reload the config files related to it without interrupting any process that is using the service.

systemctl status SERVICE - Shows the status of a service. Tells whether a service is currently running.

systemctl enable SERVICE - Turns the service on, on the next reboot or on the next start event. It persists after reboot.

systemctl disable SERVICE - Turns the service off on the next reboot or on the next stop event. It persists after reboot.

systemctl is-enabled SERVICE - Check if a service is currently configured to start or not on the next reboot.

systemctl is-active SERVICE - Check if a service is currently active.

systemctl show SERVICE - Show all the information about the service.

sudo systemctl mask SERVICE - Completely disable a service by linking it to /dev/null; you cannot start the service manually or enable the service.

sudo systemctl unmask SERVICE - Removes the link to /dev/null and restores the ability to enable and or manually start the service.

UPSTART (Deprecated Since 15.04)

If we want to use the official Upstart way (Note that, for the moment, not all services have been converted to Upstart), we could use the following commands:

status SERVICE - This will tell us if a converted service is running or not. Note that this is deprecated in favor of start, stop, status & restart. It will also tell us if a service has not yet been converted to upstart:

A converted service would typically output the current status (Starting, Running, Stopping...) and process ID. A non converted service would give an error about an unknown job.

Some shortcuts may only work with the service command above but not with the commands below unless they are 100% converted to upstart services:

START - sudo start mysql
STOP - sudo stop mysql
RESTART - sudo restart mysql
STATUS - sudo status smbd

Enabling / Disabling a service

To toggle a service from starting or stopping permanently you would need to:

echo manual | sudo tee /etc/init/SERVICE.override

where the stanza manual will stop Upstart from automatically loading the service on next boot. Any service with the .override ending will take precedence over the original service file. You will only be able to start the service manually afterwards. If you do not want this then simply delete the .override.
For example:

echo manual | sudo tee /etc/init/mysql.override

Will put the MySQL service into manual mode. If you do not want this, afterwards you can simply do

sudo rm /etc/init/mysql.override

and Reboot for the service to start automatically again. Of course to enable a service, the most common way is by installing it. If you install Apache, Nginx, MySQL or others, they automatically start upon finishing installation and will start every time the computer boots. Disabling, as mentioned above, will make use of the service manual.

I use Stacer.
It shows services and processes also. A complete GUI system toolbox.
https://github.com/oguzhaninan/Stacer


Canon MG5320 not recognized by Simple Scan (prints fine) Displays 'No scanners detected' 'Please check if connected and power on'

Located deb files from Canon Asia, installed via software center and scangearmp runs from terminal.

You can also use XSANE, available in Ubuntu Software Center.


Can't boot Ubuntu after installing it and it looks like it isn't even installed in the disc management I Installed Ubuntu 12.10 on a 45GB partition, and when it asked me to reboot the computer, the dual boot menu didn't appear, it boot directly Windows 7.

When I checked the disc management, there was the partition where I installed Ubuntu with 23GB total & 100% free, and two other new partitions without any names, one is 20GB and 100% free and the other is 2GB and 100% free, it looks like Ubuntu isn't even installed.

I read about GRUB in some other similar problems but I didn't understood what's that, I've never used a Ubuntu or a Linux before, this is my first time.

Simple answer (for linux newbies): There may be multiple probable causes to your problem. It depends on many factors that you didn't cover. How did you created the linux partitions, how did you install Install Ubuntu? From LiveDVD? From LiveUSB? Manual or automatic? Does your PC have a BIOS or a UEFI? Is your partition table an MBR or GPT? Etc. I know all these questions scare you. It did to me too, a long time ago when i started learning linux.

First, Windows will never recognize ANY other operating system. That's the Microsoft way. Or any other partition types except their own. Windows, bootloader (winboot) will never recognize any other bootloader.

Secondly, Ubuntu (as well as other linuxes) will always recognize other operating systems like Windows and MacOS. Ubuntu's bootloader (GRUB or GRUB2)     will always recognize winboot.

Every operating system needs a bootloader - a small software that tells the PC hardware the identity of the operating system, how it works and how to load it into RAM memory. An installed operating system without a bootloader is useless, because it will never be recognized by the hardware.

What happens when we install multiple OSes (each one with its' own bootloader) on the same PC? Well, one bootloader must rule them all. A single GRUB is sufficient for multiple linuxes. For a Windows + a linux PC, a winboot must be present and a GRUB too. Preferably on different partitions (because if one fails, at least you'll have the other still available). But the GRUB must be the ruler, because it recognizes any other bootloader, and winboot does not.

How to make GRUB rule the world? First install Windows. Automatically. Don't erase/merge any partitions. Secondly install Ubuntu. During Ubuntu install process, it should recognize the Windows installation. Choose install Ubuntu along Windows option. When asking you where to install GRUB choose /sda. That means the root of your first hard-disk. Highest priority possible! Don't choose any /sda1, /sda2, etc, because that means installing GRUB in the root of the specified partition 1, 2 ,etc and may result in conflict with winboot, erase winboot or not superseding winboot.

One last thing: Although it is sometimes possible to install Ubuntu to NTFS or FAT partitions, that is only advisable to advanced and expert linux users. Any typical linux (Ubuntu included) needs AT LEAST 2 partitions: a swap partition and an ext2/3/4 partition.The swap partition is always inaccessible, it acts as virtual RAM memory, the ext partition is where your Ubuntu will be installed. For adequate usage SWAP size should be = (1.5...2) x RAM size. EXT partition can be any size you want, but no less than minimum size recommended by Ubuntu.

Tip: The Windows' Disk Management equivalent in Linux is called GParted. And you can use it before (as in liveCD) and after you install Ubuntu.
For proper viewing of ALL partitions on your disk ALWAYS use GParted!! A had an unpleasant surprise with Win8: it automatically creates a recovery partition upon install that is not visible in Disk Management, but is recognised by GParted!

The real problem is likely the UEFI system. Boot with ubuntu live and use boot repair. look at https://help.ubuntu.com/community/Boot-Repair and use 2nd option.
when it repairs system boot and after reboot, you should see the grub menu to choose between ubuntu and windows. then you may edit your partitions in your ubuntu with gparted or similar programs.


12.04 - Screen glitches / freezes after "Lock Screen" Ubuntu 12.04, 3.5.0-36-generic kernel through LTS Hardware Enablement stack. HD4600 GPU on top of an Intel Core i7-4770.

When I use the "Lock Screen" feature of the desktop, sometimes I will go back to the machine hours later and will see one of the following two glitches:

the screen is mostly black with a bunch of glitchy graphics on it. I can still move the mouse, can't click on anything though, and nothing happens.
the system looks unlocked (and if I remember correctly, the monitor is on). Whatever was on the screen before the lock is now fully visible, although you can't click on anything. This has showed my email inbox contents to the rest of the office more than once.

The OS hasn't actually frozen at this point. I usually open a TTY with (CTRL+ALT+F1) and run:

sudo stop lightdm
sudo start lightdm

and am able to resume work, even though all of the processes open before (like Firefox, skype etc) seem to be gone.

First of all, is this an known issue and can I fix it?
Secondly, is there a log somewhere I could look at to see what the specific issue is? /var/log/lightdm didn't reveal much, but I might have been looking in the wrong place.

Any suggestions would be super welcome.

Workaround I stumbled upon: If someone else is running into this issue, there's no reason to reboot the machine when it happens. I think switching to a virtual tty with ALT+CTRL+F1 and then back to ALT+CTRL+F7 seems to fix the problem. Even better, you can avoid it altogether by locking the screen in X and then switching to tty1 when you want to leave the machine alone for some time. Switch back to X when you're back. Hasn't glitched out on me yet, probably because it forces some kind of "full refresh" every time you do it.

Edit: I wrote a script that works around it by detecting the screen state and automatically switching virtual terminals (same as a manual Ctrl+Alt+F-key sequence) at the right time. Try it out and let me know if it works. I don't use lightdm but maybe we can figure out a way to patch it in. You can get it on GitHub and follow the instructions to use it:

https://github.com/appleYaks/switcher

Old method: only works on laptop lid close.

If you're on a laptop, you can make the machine switch ttys automatically when you close and open the lid. This is how I fixed it. I'm not running Ubuntu, so YMMV:

Edit the file /etc/acpi/lid.sh and put the commands chvt 1 and chvt 7 in the right places.

grep -q closed /proc/acpi/button/lid/*/state
if [ $? = 0 ]
then
    . /usr/share/acpi-support/screenblank

    # this is the line we add to switch to tty1
    # when the laptop lid closes
    chvt 1

    if [ x$LID_SLEEP = xtrue ]; then
        pm-suspend
    fi
else
    # this is the other part of the pair,
    # that switches back to tty7 when the lid opens again
    chvt 7

Those two lines with chvt are the only changes to the file. I haven't yet found a way to fix it when the screen shuts off when idle, but I'm happy with this for now.

Strange that you have issue with graphics normally it works out of the box without any issues. Install Intel Graphical Driver Installer and see if it helps

https://01.org/linuxgraphics/downloads/2013/intelr-linux-graphics-installer-version-1.0.1


Ubuntu Popcorn Time TV Stick I purchased a "PC on a Stick" Intel Atom cpu, 2gb ram, 32gb storage. It currently runs Win 8.1. I want to install Ubuntu, and have it boot straight from "power on" into Popcorn time, not allowing the user to do anything else. I am new to anything Linux. Would this be possible? How do I go about getting this done...?

Yes, this is very well possible. Just install Ubuntu, install Popcorn Time, make sure it runs OK, then add Popcorn Time to your Startup Programs. Nothing unusual here.


Unity shows through games Some native games work fine, but some don't. Mostly it happens with wine games. I play a lot of adventure games and I try to play ags games a good amount because there are a lot of them and they work great under wine.

When I play games the unity icon bar and universal toolbar show through. Sometimes on native games but always on wine games. Is there anyone else this happens to and is there a way to fix this?

[edit]
For some reason the site won't let me comment???
Yes sorry, it's when I try to fullscreen the game.

If you are having the same issue I have, and it sounds like you do, try unchecking Allow the window manager to control the windows in the Graphics section of winecfg. Works for me, no Dash or titlebar in fullscreen.

I had the same problem running full screen games on Wine. I solved this by installing the openbox.

Open terminal.
type: sudo apt-get install -y openbox and press Enter
Wait for the installation to finish.
Restart the system and in the login screen select openbox as desktop

However it is necessary to start games from terminal.


How to check serial number of NVMe disk? How to check serial number of NVMe disk?

To check serial number for sda and sdb I used:

sudo lsblk --raw -o name,type,serial

However it does not work for NVMe disks (nvme0n0, nvme0n1 etc). No information about serial number is provided.

The nvme tool provides options to obtain NVME device information, for example, to install the tool, list the NVME devices and look at the id control fields on /dev/nvme0n1, one would use:

sudo apt-get install nvme-cli
sudo nvme list
sudo nvme id-ctrl /dev/nvme0n1

another way to get drive information is to run hdparm

sudo hdparm -i /dev/sda /dev/sdb

That will give you info on both your disks

FWIW , my laptop has a built in LITEONIT LMT-512L9M-11 MSATA 512GB which does report its serial number via your command and mine. It maybe that your disk doesn't actually return it or that its newness means not enough linux developers have access to them.


Time is not displaying in the Top Bar I'm running Ubuntu 13.10 with dual boot along side Windows 8.

The top panel or bar doesn't display the time.

When I open the Clock menu, all the settings over there are grayed out
Settings > Time and date > Clock

I tried other methods (like dconf) but that didn't work.

Reinstall indicator-datetime. It should be installed by default, but just in case you have removed it unknowingly, it is best to run the install command again.

sudo apt-get install indicator-datetime

  Next, we are going to reconfigure the date time:

sudo dpkg-reconfigure --frontend noninteractive tzdata

  Lastly, restart unity.

sudo killall unity-panel-service

  That’s it. The date and time indicator will appear in the menu bar now.

(Source)

It means your chosen region is not matched to your local server.

To correct:
1/ set the time&date to your actual region (eg China)
2/ use synaptic to select the repository server for your actual region (eg China).
3/ reboot.

This should solve the issue.  Recurrence may be caused by change in location, or change in server, or update/upgrade.  If so, repeat the above.


How to use google search instead of OpenDNS search in Firefox I love OpenDNS and I love Google and I love Firefox but they do not play nicely together.

OpenDNS gives me awesome functionality beyond any other DNS server right now so that I can LOCK my internet to my desired settings. GoogleDNS is coming along but NOWHERE NEAR the functionality.

One little problem. The following standard tweak to set the Firefox URL bar to do Google searches, DOES NOT WORK

1) type about:config in url bar
2) for keyword.URL type https://www.google.com/search?btnG=Google+Search&q=
3) set keyword.enabled to true

Doing this tweak does nothing (in Ubuntu 12.04 Firefox version 20 (ubuntu for powerpc))

How can I get my Google seach back whilst keeping my beloved OpenDNS?
Firefox is the only browser that has this problem.

There is no way to do this but you can somewhat get around it by

go to www.google.com

Then right click in the search bar and select make a keyword for this searchbar

set the keyword to something like gg

Now you can start your searches with gg and search. .

I hate that there is no way to fix firefox to work WITH opendns because I love firefox and I love opendns. Why does Google Chrome work and firefox doesn't - ridiculous.

You probably have openDNS set up on your router....

You can change this on your computer by:

Searching network connections.
Then edit the connection that you are using.
Click the IPv4 Settings tab.
In the DNS servers type: 8.8.8.8,8.8.4.4
Save, then disconnect and reconnect.

Hope this helps.


How do I mount shared folders in Ubuntu using VMware tools? Experts. I've successfully installed VMware tools for Ubuntu. Everything seems to work fine, but shared folders were not mounted automatically.
How do I get them to work?

If I run vmware-hgfsclient in terminal, I get the list of shared folders, but ls -l /mnt/hgfs is empty. Actually there's no hgfs dir in /mnt. I know I should probably use the vmware-hgfsclient tool, but I realy don't know how.

P.S. I wouldn't ask if I could understand the vmware-hgfsclient help I've read.

Any suggestions?

Most other answers are outdated. For Ubuntu 18.04 (or recent Debian distros), try:

sudo vmhgfs-fuse .host:/ /mnt/hgfs/ -o allow_other -o uid=1000

If the hgfs directory doesn't exist, try:

sudo vmhgfs-fuse .host:/ /mnt/ -o allow_other -o uid=1000

You may have use a specific folder instead of .host:/. In that case you can find out the share's name with vmware-hgfsclient. For example:

$ vmware-hgfsclient
my-shared-folder
$ sudo vmhgfs-fuse .host:/my-shared-folder /mnt/hgfs/ -o allow_other -o uid=1000

If you want them mounted on startup, update /etc/fstab with the following:

# Use shared folders between VMWare guest and host
.host:/    /mnt/hgfs/    fuse.vmhgfs-fuse    defaults,allow_other,uid=1000     0    0

I choose to mount them on demand and have them ignored by sudo mount -a and the such with the noauto option, because I noticed the shares have an impact on VM performance.

Requirements

Software requirements may require installing the following tools beforehand:

sudo apt-get install open-vm-tools open-vm-tools-desktop

Others have claimed the following are required:

sudo apt-get install build-essential module-assistant \
  linux-headers-virtual linux-image-virtual && dpkg-reconfigure open-vm-tools

A workaround for this problem is to edit 'inode.c' and change the line '888' to remove 'compat_truncate' function call (that is responsible for this problem on kernels 3.8.x). This file is inside 'vmware-tools-distrib', so you need to perform the following steps:

Extract VMWare-Tools (probably you will get a folder called vmware-tools-distrib).
Then:

 cd /vmware-tools-distrib/lib/modules/source
 tar xf vmhgfs.tar
 cd vmhgfs-only/
 sudo gedit inode.c

Go to line 888:

 result = compat_vmtruncate(inode, newSize);

And change it to:

 result = 0;

Then save the file and exit gedit.

 cd ..
 rm -rf vmhgfs.tar
 tar cf vmhgfs.tar vmhgfs-only/
 rm -rf vmhgfs-only/

Now restart the installing procedure. It worked for me in Xubuntu 13.04.

Src:
http://ubuntuforums.org/showthread.php?t=2136277&page=4&p=12709627#post12709627


How to change selinux modes permissive to enforce in ubuntu 14.04 How to change selinux modes from permissive to enforcing in ubuntu 14.04.

I tried

# vim /etc/selinux/config
SELINUX=enforcing
save and quiet
# init 6

after that ... no luck.
when i execute getenforce command showing Disabled.

Simply run setenforce 1 as root. One way to do this is to run sudo setenforce 1.

You can verify that it succeeded by running sestatus and examining the output.

[root@ec2-54-183-55-79 filebeat]# setenforce 1
[root@ec2-54-183-55-79 filebeat]# sestatus
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   enforcing
Mode from config file:          enforcing
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Max kernel policy version:      28

How about this idea? Open a terminal

sudo -i
cd /etc/selinux/
gedit config

Here is what it looks like:

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=enforcing
# SELINUXTYPE= can take one of these two values:
# default - equivalent to the old strict and targeted policies
# mls     - Multi-Level Security (for military and educational use)
# src     - Custom policy built from source
SELINUXTYPE=ubuntu

# SETLOCALDEFS= Check local definition changes
SETLOCALDEFS=0

Make your changes and save as


Boot and log in without fallback to text console This is something I have noticed happening for a long time now, and I see it in various flavours of Ubuntu.  At the moment I happen to be using Ubuntu Studio.

As the system boots past grub, you get a nice graphical Ubuntu Studio animated logo for a while, but then, just before the login screen appears, it drops back to the text console, where you see various things at different times (like system startup logging - as you'd see if you pressed escape while Plymouth is displaying the logo, and even a login prompt at times), but typically it at least shows the filesystem status (as clean usually), then it switches back to graphical mode for the login dialog.

It would look very much neater if it didn't flash the text console on screen like this.  I am just wondering why it does this, and would like a fix?  I know it's no biggy.  I just get curious about odd things :)

You will always get a black screen between Plymouth and Login, unless you are using Windows 10. For myself in Ubuntu 16.04 it lasts about four seconds. In Ubuntu 18.04 it only lasts 1 or 2 seconds. You can however eliminate all text that appears on that screen.

There are a number of different things you can do for a smoother boot experience:

Reduce console messages
Reduce screen resetting
Eliminate Grub messages
Reduce fsck during boot

I've purchased a tripod for my cellphone to make videos of the various grub booting scenarios but have run into technical difficulties creating GIF to post here.

1. Reduce console messages

Based on Arch Linux's Silent Boot article you can add three extra options after quiet splash boot parameters:

quiet splash loglevel=0 vga=current udev.log-priority=3

The full article references systemd in boot in which case this can be used:

quiet loglevel=3 rd.systemd.show_status=auto rd.udev.log_priority=3

Also touch ~/.hushlogin to remove the Last login message.

2. Reduce screen resetting

From this Q&A: What is vt.handoff=7 parameter in grub.cfg? it says:

  For a smooth boot process, we want to display something other than a
  black screen as early as possible and leave it on screen until the
  desktop is ready. vt.handoff=7 is part of this. We have the boot
  loader display an aubergine background (we wanted to have an Ubuntu
  logo as well, but there are problems with different aspect ratios
  between the boot loader and the real system, so this is the next best
  thing). vt.handoff=7 then causes the kernel to maintain the current
  contents of video memory on virtual terminal 7, which is a new
  "transparent" VT type. The first time that the kernel is told to
  switch away from VT 7, either from Plymouth or manually (Alt-F1,
  etc.), these contents are lost and VT 7 reverts to text mode.

If you are grub with a graphics background image add these lines in /etc/default/grub:

GRUB_GFXMODE="1920x1080x32"
GRUB_GFXPAYLOAD_LINUX="keep"

3. Eliminate Grub messages

After selecting a menu option, or the countdown timer expires grub sometimes issues these messages:

Loading Linux %s ..." ${version}
Loading initial ramdisk ...

To eliminate these message edit /etc/grub.d/10_linux and change these lines to comments:

# June 29, 2018 hide Loading Linux message
#  if [ x"$quiet_boot" = x0 ] || [ x"$type" != xsimple ]; then
#    message="$(gettext_printf "Loading Linux %s ..." ${version})"
#    sed "s/^/$submenu_indentation/" << EOF
#   echo    '$(echo "$message" | grub_quote)'
#EOF
#  fi

And a page down these lines too:

# June 29, 2018 hide Loading inital ramdisk message
#    if [ x"$quiet_boot" = x0 ] || [ x"$type" != xsimple ]; then
#      message="$(gettext_printf "Loading initial ramdisk ...")"
#      sed "s/^/$submenu_indentation/" << EOF
#   echo    '$(echo "$message" | grub_quote)'
#EOF
#    fi

4. Reduce fsck during boot

In your /etc/fstab ensure passno is set to 0 to prevent systemd-fsck@.service from running. More details from the manpage.

Change the frequency of fsck to every 30 boots or once a month: My Ubuntu is running fsck on every bootup

fsck is run by default by the initramfs. By removing it and having systemd run fsck you will be able to redirect the output.

systemd-fsck-root.service and systemd-fsck@.service located in /lib/systemd/system will need to be copied to /etc/systemd/system/ and edit them, configuring StandardOutput and StandardError like this::

[Service]

Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/lib/systemd/systemd-fsck
StandardOutput=null
StandardError=journal+console
TimeoutSec=0

Your question has already been answered on Ask Ubuntu Here


How to resize virtual machine disk? Is there anyway to resize a virtual machine's disk? Say increasing the disk size from 32GB to 64GB. I am running KVM/Qemu on Ubuntu server 11.10 64bit. Thanks.

On Debian based distro you should use virt-resize instead. This handle pretty much everything under the hood now. Let's assume your image is called Win7 (why not?). First thing make sure your VM is shut down:

Install the tool:

# apt-get install libguestfs-tools

Get the location of your VM disk:

# virsh dumpxml Win7 | xpath -e /domain/devices/disk/source
Found 2 nodes in stdin:
-- NODE --
<source file="/var/lib/libvirt/images/Win7.img" />
-- NODE --
<source file="/var/lib/libvirt/images/Win7.iso" />

You may need to adapt /var/lib/libvirt/images/Win7.img in the following:

# virt-filesystems --long --parts --blkdevs -h -a /var/lib/libvirt/images/Win7.img
Name       Type       MBR  Size  Parent
/dev/sda1  partition  07   100M  /dev/sda
/dev/sda2  partition  07   32G   /dev/sda
/dev/sda   device     -    32G   -

Create your 64G disk:

# truncate -s 64G /var/lib/libvirt/images/outdisk

You'll need to expand /dev/sda2 (not the boot partition):

# virt-resize --expand /dev/sda2 /var/lib/libvirt/images/Win7.img /var/lib/libvirt/images/outdisk
Examining /var/lib/libvirt/images/Win7.img ...
 100% [progress bar] --:--
**********

Summary of changes:

/dev/sda1: This partition will be left alone.

/dev/sda2: This partition will be resized from 32G to 64G.  The
    filesystem ntfs on /dev/sda2 will be expanded using the
    'ntfsresize' method.

**********
Setting up initial partition table on outdisk ...
Copying /dev/sda1 ...
Copying /dev/sda2 ...
 100% [progress bar] 00:00
 100% [progress bar] 00:00
Expanding /dev/sda2 using the 'ntfsresize' method ...

Resize operation completed with no errors.  Before deleting the old
disk, carefully check that the resized disk boots and works correctly.

Make a backup just in case (or use mv if you do not want the backup):

# cp /var/lib/libvirt/images/Win7.img /var/lib/libvirt/images/Win7.img.old
# mv /var/lib/libvirt/images/outdisk /var/lib/libvirt/images/Win7.img

Now boot !

For more info: man virt-resize

#include <stdio.h>

static unsigned long auxfilesize(FILE* fp) {

    unsigned long len=0;
    int c=0;

    while ( (c = fgetc(fp)) != -1 ) {
        len++;
    }

    return len;
}

static unsigned long aux_copyNBytesFromTo(FILE* from, FILE* to,
                                    unsigned long fromSize,
                                    unsigned long bytes) {

    unsigned long iter = 0;
    while ( iter++ < fromSize ) {
        int c = fgetc(from);
        fputc(c, to);

    }
    iter-=1;
    if ( fromSize < bytes ) {
        while ( iter++ < bytes ) {
            fputc(0, to);
        }
    }
    return iter;
}

int main(int argc, char **argv) {
    FILE *from = fopen(argv[1], "rb");
    FILE *to = fopen(argv[2], "wb" );
    unsigned long l = auxfilesize(from);

    rewind(from);

    aux_copyNBytesFromTo(from, to, l, (l + l/2)) ;

    fclose(from);
    fclose(to);

}

This simple program adds N bytes to the end of the virtual image. I used Paragon partition image for Windows XP to merge the newly created images. Works OK here.


How to EFI install Ubuntu? On trying to install Ubuntu 12.10 Desktop amd64 to a desktop pc using a ga a75 ud4h motherboard (which is using an AMD 3870k APU with a new 1TB HDD) following the advice in the motherboard  manual and https://help.ubuntu.com/community/UEFI have now got to grub option screen for EFI install.
Booting live dvd in EFI mode gives "Secure Boot is not enabled" just before grub kernel option list shows.

If the option to "Install Ubuntu" or "Try Ubuntu without installing" is selected gives "can not read cd/0" and "the kernel must be loaded first" errors.
Using DVD or USB installation media gives same results and there has never been at any point an UEFI entry in bios/firmware settings or boot device list/s.
It might be helpful to say that have had an alternative non-linux OS installing EFI mode on this hardware giving a GPT installation automagically using USB installation media when the hdd space was completely unallocated space. The USB device was listed under hard drives in bios/firmware one time boot list and did not have an UEFI entry. i.e. it installed EFI although no EFI or UEFI entry was assigned to the device like what is shown in many tutorials regarding UEFI installs.
The only constructive information regarding this question is found at wiki.ubuntu.com/EFIBootLoaders and rodsbooks.com/gb-hybrid-efi but can not work out the answer.
Checking md5sum and sha256 checksums on downloaded .iso and used "Check disk for defects" to check burned .iso when booting DVD in BIOS mode. No errors found. "Check disk for defects" will not run (or any other options) when DVD booted in EFI mode.
Due to trying different distributions as well as older and newer flavours of Ubuntu all giving similar results in that no options from grub option screen in EFI mode are bootable (if getting that far) as well as spending time searching Ubuntu Forums have come to conclusion the firmware on this system is hardcoded to handle Microsoft EFI files only.
After installing Windows EFI mode here is a boot info script and here is a link to a thread i started at Ubuntu forums which may be helpful to others building a dual boot system.
Installing BIOS mode and using Boot-Repair to install grub-efi is not a complete solution due to the inability of using installation media EFI mode for recovery and maintenance due to the "you need to load kernel first" and "can not read cd/files" errors as described when trying to boot installation media using EFI.
Secure Boot is not an issue. Using msinfo32 from windows confirms Secure Boot is not supported on this hardware.
How to edit kernel or load kernel for EFI install? = How to EFI install Ubuntu?
PLEASE CONSIDER: This is not a dupe!  The linked question that is indicated to having a working answer does not have a working answer to "###How to edit kernel or load kernel for EFI install? = How to EFI install Ubuntu?" therefor the workaround of installing using BIOS then manually install grub-efi without renaming bootloaders which works to get Ubuntu booting using EFI or using boot-repair to do this (and many unnecessary "fixes" if recommended repair is not changed in advanced settings) also works.  This goes some way to confirming hardcoding of firmware is not stopping grub the boot manager seeing the vmlinuz.efi files in /casper on DVD.  I would like an answer to this so would like this question to be reopened.

It is possible that some BIOS's option is disabling the EFI correct behavior.
Have you tried to enable the EFI options in the BIOS before booting the dvd?
Also, it is possible that the signed lock is causing problems during the boot. Check these things and good luck!

Use the USB installer -> Make a USB disk
you can use a flash reader (Smart phone)
Usb drive
Harddrive on a USB port. (tho youd have to reformat it)

Once you got your USB stick with UBUNTU live on it -> boot up with the (Boot Selection) Key -> ((might be f8, or f2, or esc))
Find your stick, should say "UEFI usb stick kingston" or whatever brand.
done.

When installing you will need to make a seperate partition BUT if you do the auto "erase whole disk" thats not a problem. It will do it auto.

PENDING you cant erase the whole disk, You need to make a partition about... its either 1 or 100 MB, partition type "grub boot" at start, EXTx second partition, and swap.
Done.


How do I switch to another audio output sink in XFCE? From the command line I can easily create another pulseaudio sink and switch to that but I have not found a way how to do this using a GUI from the Xfce desktop.

In GNOME I use gnome-volume-control from audio settings to switch to another audio output sink.

Is there anything similar in Xfce?

After installing pavucontrol you have graphical access to several useful settings for pulseaudio including a choice for your output device. Choose the default output device in the Output Device tab:

A currently playing stream of a given application can also be moved to another device in the Playback tab from the dropdown menu next to Playback Stream on:

I am on Xubuntu and i also faced this problem. I installed pulseaudio's manager and it works fine!

HTH


Host is unreacheble with static networking configuration via /etc/network/interfaces while GUI NetworkManager is ok I have some trouble setting-up the network interface using the static IP configuration. I run ubuntu 12.04 kernel 3.11.0-22 with the back-ports enabled.

I followed these instructions from help.ubuntu.com but there seems to exist some conflict between the GUI approach (NetworkManager) and the command line approach.

$ sudo nano /etc/network/interfaces

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 10.1.1.50
gateway 10.1.1.10
netmask 255.255.255.0
dns-nameservers 192.168.3.45 192.168.8.10

$ sudo /etc/init.d/networking restart

I than try to ping for example google.com ping -c 3 www.google.com the response is that the host is unreachable. The icon on the top right of the desktop says: wired network disconnected.

If I work using the GUI approach (Edit Connections and so on...) all works great.

Can same one explain to me where I wrong?

$ ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 90:e6:ba:07:4a:77
          inet addr:10.1.1.50  Bcast:10.1.1.255  Mask:255.255.255.0
          inet6 addr: fe80::92e6:baff:fe07:4a77/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:39619 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18520 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:19030895 (19.0 MB)  TX bytes:2768769 (2.7 MB)

$ netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
10.1.1.0        0.0.0.0         255.255.255.0   U         0 0          0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0

Your gateway is outside of your network

address 10.1.1.50
netmask 255.255.255.0
implies network from 10.1.1.0 - 10.1.1.255

as you can see geteway 10.0.0.1 falls outside. Check the subnet on your gateway and assign ip within that range

You have to remove the network manager

  sudo apt-get remove network-manager

  Editor's note:

  For the love of all that's holy, DO NOT RUN THIS COMMAND!


No ethernet Ubuntu server 20.04 I have recently upgraded Ubuntu Server 18.04 to 20.04. 18.04 ran perfectly as an asterisk server.  When rebooted after the upgrade, there was no ethernet connection.  What is the solution to this not uncommon problem ?  This is a server installation with no GUI and a limited software installation.  No Network or ncurses.  If I wish to install them.  Where do I find my usb stick in the file system.  Asterisk installation is quite a challenge and I would rathe avoid a new install.

I am new to Ubuntu Server 20.04 and had the same problem. I was able to connect to the Internet by using an Ethernet cable directly between the Ubuntu host (a laptop which had an Ethernet port) and my router. Prior to this, I had edited the config file for networking (/etc/netplan/00-installer-config.yaml) using sudo nano so that it read as follows:
network:
version: 2
renderer: NetworkManager
ethernets:
wlo1:
dhcp4:true
enps03:
dhcp4:true
Note that wlo1 is my wi-fi card and enps03 is the Ethernet port
On rebooting, I was now on my network and could download network-manager using sudo apt install network-manager (of course, you can also install any other software you think is missing)
I am STILL not able to activate my wi-fi card but I feel I am close to a solution on that - and at least using the Ethernet cable, I have access to any packages that I might need to resolve that issue as well.
Note: (1) your config file in /etc/network may have a different name but it should be the only .yaml file in that folder; (2) you can also download net-tools (sudo apt install net-tools) which gives you access to the more familiar commands ifconfig, etc.
I hope this helps.


Can't get OpenGL to work, Games crash on launch, AMD Radeon 6670, Issues with driver? So, I got Ubuntu yesterday, and enthusiastically started to install all my linux supported steam games. Only about two of them worked, and the rest crashed instantly back to steam without error messages, with the exception of Portal, which gives a messages saying it has to deal with OpenGL. I believe this issues is caused by my graphics card drivers. I have a Radeon 6670. What information do I need to give you for you to try and help with getting the appropriate drivers and OpenGL to work?

This problem is caused by the Steam's old bundled version of libstdc++.

Possible solutions:

(from https://github.com/ValveSoftware/steam-for-linux/issues/3273) Redirect steam runtime's symlink for libstdc++.so.6 to the systems. Replace XX with the version of your system's libstdc++.
You need to update this when libstdc++ is updated.

$ ln -sf /usr/lib/libstdc++.so.6.0.XX ~/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libstdc++.so.6

(from http://chapeaulinux.org/forums/topic/steam-not-working-in-chapeau-22/) Preload the system's libstdc++ before running steam.

$ LD_PRELOAD=/usr/lib/libstdc++.so.6 ; steam

The last solution can also be put in a script:

sudo mv /usr/bin/steam /usr/bin/steam.orig
echo -e '#!/bin/sh\nexport LD_PRELOAD=/usr/lib/libstdc++.so.6\n. /usr/bin/steam.orig $*'>~/mysteam
chmod +x ~/mysteam
sudo ln -s ~/mysteam /usr/bin/steam

(from search for how-to-fix-broken-steam-linux-client-with-radeon-graphics-driver-workaround/) Create a script to run steam with the system's version of libstdc++.

#!/bin/bash
export LD_PRELOAD='/usr/$LIB/libstdc++.so.6' #Export so all child    processes are affected as well
export DISPLAY=:0
#export LIBGL_DEBUG=verbose
steam

Save this as e.g. run-steam.sh. You must start steam through this script.


Why is Unity 2D running so much faster on system with ATI 6770? I'm new to Linux in general.  I installed 11.10 the other day, and began enjoying.  I've noticed, however, that when I choose "Ubuntu" from the login menu (vs "Ubuntu 2D), the system runs noticeably slower.  Nothing major, but window movements are jerky, programs take longer to open, and log-in is substantially slower.  When I load "Ubuntu 2D", everything is snappy.

My system is an Athlon II x4 @ 3.0 Ghz and an AMD 6770.

Ubuntu tells me that the proprietary drivers are non-active, but I did install catalyst earlier.

Something tells me this has to do with drivers.  What's my next step?

If you have installed the Graphics drivers through the software center or the 'Additional driver' button in system settings I would suggest to reinstall them using the newest driver package from the amd website.
It's a pretty straight forward process and done very quickly through the terminal, just copy and paste every command I put here.

sudo apt-get remove --purge xorg-driver-fglrx fglrx*

sudo apt-get remove --purge fglrx*

sudo apt-get install build-essential cdbs fakeroot dh-make debhelper debconf libstdc++6 dkms libqtgui4 wget execstack libelfg0 dh-modaliases

sudo apt-get install --reinstall xserver-xorg-core libgl1-mesa-glx libgl1-mesa-dri

sudo dpkg-reconfigure xserver-xorg

These commands remove the previously installed drivers and make sure all the dependencies for the new drivers are included.
These next ones download and activate the driver installer script from amd

cd $HOME/Downloads

wget http://www2.ati.com/drivers/linux/amd-driver-installer-12-3-x86.x86_64.run

sudo chmod +x amd-driver-installer-12-3-x86.x86_64.run

sudo sh amd-driver-installer-12-3-x86.x86_64.run --buildpkg Ubuntu/oneiric
sudo dpkg -i *.deb

The graphical amd installer will now guide you through the driver installation (just as it would in windows for example)
After it's done just type

sudo aticonfig --initial

Now reboot your system and see if the issue is resolved.

AMD graphics drivers are very poor on Linux. Happens to me on an AMD 6850 as well. Very jerky window movement.


Is there an anonymous proxy application for Ubuntu? I've been digging around to find a proxy application something like proxifier in windows but cannot find any thing! and then tried to configure the system wide proxy setting in network section of Ubuntu’s system setting and I configure the proxy setting but it seems it does not apply anything...

here is my questions :

Is there any proxy application to use like proxifier in windows!?

If there is no proxy application how can I configure system's proxy setting manually!?

thanks in advance

"Proxifier" for Windows seems like an anonymous proxy/VPN-type-thing.

On Ubuntu then, you want Tor.

Get the Tor Bundle at https://www.torproject.org/download/download

use zenmate it's a google chrome extension


Where can I download Ubuntu 13.04 Beta release? I've heard that the Ubuntu 13.04 Beta release is out. If that's correct, where can I download it? When I look for it, all I find is the daily build, which is different from the Beta release, right? Thanks!

This link features an overview of download links for 13.04 Beta 1:

  http://cloud-images.ubuntu.com/releases/13.04/beta-1/ (Ubuntu Cloud Server)
     http://cdimage.ubuntu.com/netboot/13.04/ (Ubuntu Netboot)

  http://cdimage.ubuntu.com/kubuntu/releases/13.04/beta-1/ (Kubuntu)
     http://cdimage.ubuntu.com/kubuntu-active/releases/13.04/beta-1/ (Kubuntu Active)
     http://cdimage.ubuntu.com/lubuntu/releases/13.04/beta-1/ (Lubuntu)

  http://cdimage.ubuntu.com/edubuntu/releases/13.04/beta-1/ (Edubuntu DVD)
     http://cdimage.ubuntu.com/ubuntustudio/releases/13.04/beta-1/ (Ubuntu Studio)
     http://cdimage.ubuntu.com/xubuntu/releases/13.04/beta-1/ (Xubuntu)

You can find all the daily build iso images here:
http://cdimage.ubuntu.com/daily-live/current/


How to find still running processes in a terminal? When I try to close a tab in Gnome Terminal, it says:

  Close this terminal? There is still a process running in this terminal. Closing the terminal will kill it.

How can I find out what is still running? Note that there is nothing in the output of jobs.  Thanks.

ps T

Selects all processes associated with the terminal.

You can use htop. In Ubuntu 16.04 ( and higher), you can install it just by typing sudo apt-get install htop.

You can also use top .


problem with ubuntu 12.10 minimize animation I have a small problem with the new ubuntu 12.10 minimize animation.
I currently have a laptop and a desktop, both upgraded from 12.04 to 12.10.
The problem shows up only on the desktop.
When I minimize a window, instead of viewing the whole window fade and zoom out, the content disappear, and only the bezel complete the animation.

Here is a short screencast that shows the behavior:

http://youtu.be/9fwlimfs85A

Any ideas on where I can look for a solution?

Many thanks in advance.
Regards.

update

Looks like the open source driver works perfectly. The problem is that the performance is not so cool, and some games that push a little the graphic (like torchligt) do not even startup. Linus is right about nvidia...

Try this :

Install compizconfig-settings-manager .
Run CompizConfig and click on Animation.
Go to the "Minimize animation" tab.

For me, the minimize effect is zoom and duration is 220 and of course the enable animation option is checked, on the left hand side.

meybe you applied some changes to settings in compiz manager wich causes problems  try to reset unity

sudo apt-get install dconf-tools

dconf reset -f /org/compiz/
then

setsid unity
and restart Compiz:

setsid compiz --replace

  also you can try to restart X  Display Manager with`:

sudo -s setsid service lightdm restart

instructions taken from ubuntuhelpguy :

https://www.youtube.com/watch?v=hwFG9XpdYEg  how to reset unity


Can wubi harm my PC? I am just wondering can wubi 11.04 make windows unbootable in anyway and what harm can it do to my PC. Also, if I force shut down in wubi ubuntu can it damage windows?

WUBI is pretty safe: it creates one file on the Windows disk, and new boot menu entries, but doesn't change partitions.  You should always be able to boot back to Windows, and an abrupt shut down might corrupt the Linux filesystem but nothing outside of that.

Nothing in life is entirely without risk.  You should, as always, have backups.

The main kind of risk that Wubi mitigates is needing to repartition, or reinstall, or to install a new boot sector.  Those aren't very risky, but they can be hard to undo if you   instruct the installer to do the wrong thing (eg to delete Windows) or if you change your mind.

Yes

Ubuntu is very powerful and it makes it easier to take control.  You can just as easily be productive as destructive.  Windows (or a Mac) are designed with many more precautions that make it harder to accomplish basic tasks, but harder to hang yourself.  With Ubuntu, you kind of have to know what you're doing to a much greater degree than if you're using a commercial OS.

I probably did damage to the file system of my "safe" computer, the one I use for backups because it has a RAID 1 disk configuration.  I didn't know that RAID is not supported by Ubuntu.  Maybe I missed it somewhere, but I tried reading about the install for hours before I actually did it, and I didn't find out about this unsupported configuration until after I had done the damage and was searching through the help.

This OS definitely gives you a lot of power, but it could also give you just enough rope to hang yourself!


'Make' command not found I am having a problem that when I try to use make command.

I cannot run the Make command.

Message: bash: make: command not found

When I used

sudo apt-get remove make
sudo apt-get install make

or with

sudo apt-get install --reinstall make

it shows

Reading package lists... Done
Building dependency tree
Reading state information... Done
Package make is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'make' has no installation candidate

Do an reinstalation of the build-essential package:

sudo apt-get install --reinstall build-essential

This should fix it.

The program make isn't really called that on the package, the package you are looking for is automake


Unable to locate package, can't install software Whenever I try to install any package in Ubuntu 10, I type the command

sudo apt-get install vlc

and also the command

sudo apt-get update

but I get this error every time

unable to locate package vlc

I tried sudo apt-get update again but I still get the same error.

Please help me. Is there something I have to change in the repositories? Please give some suggestions.

Hi you can install vlc very easily in ubuntu .

open your unity dash and type software center . it will give you that named application and click it to open .

there in software center you'll find a search box at left top .

there type as vlc and you will get it .

select it and you'll get an option to install and click that install button .

there you go .

hope that helps .

Temporarily change your repositories server to somewhere else and update the apt-get list


Terminal Error: There was an error creating the child process for this terminal. Failed to open PTY: Permission denied I have an Ubuntu Server 18.04. I setup a VNC connection. When I open the terminal I have the following error:
There was an error creating the child process for this terminal. Failed to open PTY: Permission denied.

How can I solve this?
EDIT: as requested, output of cat /proc/sys/kernel/pty/max /proc/sys/kernel/pty/nr is
4096
2

I found an old bug report on launchpad for the same error on Linux Mint.
It's a long shot, but maybe worth checking out.
There Was An Error Creating The Child Process For This Terminal

I found a solution though:
sudo chmod 666 /dev/pts/ptmx fixed terminal


Can't successfully change port that Apache2 listens for I am trying to change the port that apache listens to from '80' to '8085' (or any other number).

I modified /etc/apache2/ports.conf :

NameVirtualHost *:8085
Listen 8085

And I also modified /etc/apache2/sites-enabled/000-default :

<VirtualHost *:8085>
    ServerAdmin webmaster@localhost

The last thing I did was Port Forwarding on my router.  I used to use '80' so I just changed that to '8085'.

Alas, I am unable to reach my apache homepage (the one that says It Works! and I am not sure why.  I feel like I have hit all the things that need to be changed.  Any tips?

Also, when i do netstat -tulpn | grep :8085 i get:

tcp6       0      0 :::8085                 :::*                    LISTEN      4232/apache2

The port is in RED, is it firewalled?

I have reloaded and restarted apache and the server.

Thank you in advance

EDIT

Output of iptables -L

Chain INPUT (policy ACCEPT)
target     prot opt source               destination
fail2ban-apache  tcp  --  anywhere             anywhere             multiport dports http,https
fail2ban-ssh  tcp  --  anywhere             anywhere             multiport dports 239

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Chain fail2ban-apache (1 references)
target     prot opt source               destination
RETURN     all  --  anywhere             anywhere

Chain fail2ban-ssh (1 references)
target     prot opt source               destination
RETURN     all  --  anywhere             anywhere

Hopefully you can get something out of that.
Additionally, I do not recall what I seen before I made the changes. I am not sure but I think i should be listening for IPv4.  Literally the only things I have changed are what is noted above.

I do guess that your problem is that you are trying to reach it over IPv4 and it is listening on IPv6.

Sound strange, but does look like it from what you are saying. So why not listen to 8085 on our IPv4 address?

Listen 0.0.0.0:8085

The 0.0.0.0 bein all addresses, if you have mutiple on your system then use the specific address you want instead.

But one question to finish this off, why do you have IPv6 tunred on if you are not using it?

Have you rechecked /etc/apache2/sites-enabled/000-default ? I seem to remember that you edit sites-available rather than sites-enabled, as it's the content of sites-available that gets copied to sites-enabled when you enable a site with a2ensite
Please see https://forum.linode.com/viewtopic.php?t=7873 especially towards the bottom of the page.  Restarting apache potentially overwrites what is in sites-enabled with what is in sites-available and there should definitely be a 000-default file in sites-available.


Modifying /etc/hosts does not have an effect I'm attempting to block myself from time-wasting websites but changes I make to /etc/hosts. For example:

127.0.0.1   localhost
127.0.1.1   ross-laptop

127.0.0.1   bing.com

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

I can access bing.com in a freshly opened Chrome or Firefox - why is this not working?

You'll find the browsers and the system will cache things for you. In order to get this to apply right off the bat you should make sure to clear caches and restart your browser. In order to test this out, try performing a dns check from a terminal such as

ping bing.com

You should get it replying back from 127.0.0.1. If this works then your hosts file change is good, but it's just cached in your browser.

Besides CragM's solution, remember you can use all 127.x.x.x address for this purpose, don't repeat the same address.

127.0.0.1   localhost
127.0.0.2   ross-laptop
127.0.0.3   bing.com
127.0.0.4   foo.com
127.0.0.5   bar.com
......


Nessus 5 installation not working I downloaded the Ubuntu 11.10 / Ubuntu 12.04 (64 bits):
Nessus-5.0.1-ubuntu1110_amd64.deb (25298 KB) from the following page:-

http://www.tenable.com/products/nessus/select-your-operating-system

opened up the file using Ubuntu Software Centre and clicked on the install button on it's right. It prompted for a password. I entered the password and the installation began. After the installation was completed, the install button appeared again. Tried to search the Nessus in Dashboard Home, but no success.
Help on this please !

type 127.0.0.1 in your browser. it opens scanner page for nessus.


How to trash some file from a different directory without typing the directory each times? Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

    deleted:    Assignment_3/Apriori/bodon_trie.pdf
    deleted:    Assignment_3/Apriori/farhanSir.pdf
    deleted:    Assignment_3/Apriori/output.txt~
    deleted:    Assignment_4/Comparision/report.aux
    deleted:    Assignment_4/Comparision/report.log
    deleted:    Assignment_4/FPGrowth/FPGrowth.class
    deleted:    Assignment_4/FPGrowth/FPGrowthApplication.class
    deleted:    Assignment_4/FPGrowth/Node.class
    deleted:    Assignment_4/FPGrowth/Result.class

This is the output of git status.
I want to delete this from git cache using git rm --cache Assignment_3/Apriori/boden_trie.pdf ?/farhanSir.pdf I don't want to type Assignment_3/Apriori for each file.

Use Bash brace expansion:

git rm --cache Assignment_3/Apriori/{boden_trie.pdf,farhanSir.pdf}

You can install bleachbit and it has an option for deleting files or folders.

sudo apt-get install bleachbit


How to make Thunderbird NOT use Bing as search engine? When I type something in Thunderbird's search bar, the first item that pops up is a Bing search for that term. Is there a way to remove Bing? I don't really need Thunderbird to be able to search the web.

So just removing it and leaving nothing is acceptable, but replacing it with, say, Google (or anything that's not Bing) works as well. I perused all the settings dialogs and preferences and couldn't find anything of the sort.

Well, if you want to use Google instead, simply install this add-on: Google Search for Thunderbird

Note that this kb article also explain how you can use another search engine: https://support.mozillamessaging.com/en-US/kb/add-search-engine-open-search

I don't think that it is possible to disable it completely.

Not certain if this helps or not, but a hint might be found under the settings for Thunderbird Preferences > Advanced > General > Advanced Configuration > Enable Global Search and Indexer.  Perhaps you have chosen Bing as your default search provider in browser?

Another thing to do is to open the config editor at the same location and type in "search" in the about:config dialog. Look for the keyword.URL string to see what is set there. It may be set to Bing as the search provider.

You may also wish to see if any add-on was added into Thunderbird that has altered the standard behaviour.


Unable to upgrade from 14.04 to 14.10 "Cannot Calculate Upgrades" I just finished backing up my system and when I try to upgrade to Utopic Unicorn, I get the error "Cannot Calculate the upgrades." I ran the upgrade by sudo apt-get dist-upgrade, sudo do-release-upgrade after the GUI method failed, they all gave the same error.

The feedback gives some recommendations:

This can be caused by:
* Upgrading to a pre-release version of Ubuntu
* Running the current pre-release version of Ubuntu
* Unofficial software packages not provided by Ubuntu

I am not upgrading to a pre-release version nor coming from one, I'm going from Ubuntu 14.04 LTS to 14.10. I have no broken packages and I have unchecked all my non-official software sources in the 'Software & Updates' manager.

My guess left is the Unofficial software packages not provided by Ubuntu. If anyone could give any help as to how to check for unofficial packages using Synaptic or another, my appreciation.

Are there any other factors that may be causing this error and how would I go about checking/fixing those?

Thanks.

Edit: I have no broken or held packages. Everything is up-to-date, and restarting everything or anything has no effect.

Try executing:

grep ERROR /var/log/dist-upgrade/main.log

Hopefully this will show you the names of conflicting packages. For me it was (I broken long line to be easier to read):

2014-10-25 18:15:05,915 ERROR Dist-upgrade failed:
    'The package 'postgresql-9.3-postgis-2.1'
    is marked for removal but it is in the removal blacklist.

postgresql-9.3-postgis-2.1 is conflicting package here. It will probably be different one or some for you. You can then remove it/them by:

sudo apt-get remove conflicting-package-1 conflicting-package-2 ...

Then just restart distribution upgrade.


`updatedb` cannot open file `mlocate.db` When I run updatedb from a terminal, I get this error:

updatedb: can not open a temporary file for `/var/lib/mlocate/mlocate.db'

Any ideas about how to get updatedb to work?

I realize this is an old post, but I do not see this solution elsewhere.

The problem is not the mlocate.db file, as you'd expect.  It is the permissions on the mlocate executable.  This will fix the issue:

sudo chmod 2755 /usr/bin/mlocate

This is the source of the trouble:

$ ls -lathr /usr/bin/mlocate
-rwxr-xr-x 1 root mlocate 39K Nov 17  2014 /usr/bin/mlocate

You need a setuid bit on the group to allow you to run the locate command without sudo.  Once it is fixed, your ls output should look like this:

$ ls -lathr /usr/bin/mlocate
-rwxr-sr-x 1 root mlocate 39K Nov 17  2014 /usr/bin/mlocate

Simply doing a chmod as some others recommend against the db file itself will only work until the next time someone runs updatedb.  Then the permissions will be reset.

Read man updatedb and learn how to write updatedb's output elsewhere, in a directory you have write permission for.


How to fix amvavis reporting "permission denied" for clamav I've recently noticed a frustrating niggle...  When processing email, an Ubuntu Server (with all the updates applied) reports "Permission denied" when trying to virus scan attachments.
Apr  2 14:05:20 svr amavis[6376]: (06376-01) (!)run_av (ClamAV-clamd) FAILED - unexpected , output="/var/lib/amavis/tmp/amavis-20150402T140519-06376-PZcyHfOt/parts: lstat() failed: Permission denied. ERROR\n"
Apr  2 14:05:20 svr amavis[6376]: (06376-01) (!)ClamAV-clamd av-scanner FAILED: CODE(0x30cf250) unexpected , output="/var/lib/amavis/tmp/amavis-20150402T140519-06376-PZcyHfOt/parts: lstat() failed: Permission denied. ERROR\n" at (eval 136) line 899.
Apr  2 14:05:20 svr amavis[6376]: (06376-01) (!)WARN: all primary virus scanners failed, considering backups

When I look at the directories in question, I see this:
$ ls -ld /var/lib/amavis/tmp
drwxrwx--- 4 amavis amavis 4096 Apr  2 14:16 /var/lib/amavis/tmp
$ ls -ld /var/lib/amavis/tmp/amavis-20150402T140519-06376-PZcyHfOt/
drwxr-x--- 3 amavis amavis 4096 Apr  2 14:05 /var/lib/amavis/tmp/amavis-20150402T140519-06376-PZcyHfOt/
$ ls -ld /var/lib/amavis/tmp/amavis-20150402T140519-06376-PZcyHfOt/parts
drwxr-x--- 2 amavis amavis 4096 Apr  2 14:16 /var/lib/amavis/tmp/amavis-20150402T140519-06376-PZcyHfOt/parts

I made sure the clamd user is a member of the amavisd group - but this didn't fix anything.  Can anyone tell me, specifically, which component wants what permissions - and... ideally... what to do to fix this?
Clarification:  I am not looking for explanations of the fundamentals of permissions. I am looking for a solution appropriate to this specific problem - which, at first glance, at least, looks as if a component of the amavis suite (perhaps clamd) is using the wrong umask value.  Of course, this fault may have arisen as a result of a number of bugs or configuration glitches.  I am looking, specifically, for the most appropriate resolution for this case... where a 'vanilla' amavis/clamav install fails to access the contents of temporary folders it creates as/when required to scan inbound email.
I am aware of this similar (non-Ubuntu) question.  The Redhat/Centos answer doesn't solve the problem I experience with Ubuntu.
This problem is encountered on "Ubuntu 14.04.2 LTS" - there are no pending updates.

A working solution is to change

AllowSupplementaryGroups false -> true

in /etc/clamav/clamd.conf

restart clamav-daemon

Have you tried enter this in the terminal:

       sudo -i
       gksu thunar

and if thunar is not installed enter this in the terminal:

        sudo apt-get install thunar

and make permission read and write for the directory:

       /var/lib/amavis

and this is whit thunar, and it might work fine this way.


Is a 32 bit OS sufficient for Ubuntu I've got an old pc with windows XP 32 bit, and I wanted to turn it into a home based server.  I am thinking of installing ubuntu as an OS.  I'm a networking novice so I'm not quite sure if it will work good.  My other computers are all running windows 7 64 bit.  So, will it be sufficient to turn this 32 bit box into a server to hold all my files and backups, while the 64 bit pc's just exchange the data?  Please let me know, or educate me on the subject.  Thanks in advance.

You have a processor that is capable of 64-bit, so go ahead and use a 64-bit version of Ubuntu.

You stated elsewhere that your PC has a "Pentium Duo Core" chip.  Intel has never released a dual core chip called "Pentium" that doesn't support 64-bit apart from the "Yonah", a re-branded version of the Pentium M that is for laptops.

It depends on the hardware how much ram/cpu and disk space you have, for example
if you have 512mb of ram and Pantium 4 cpu with sufficient disk space let's say 80gb
an Ethernet card, that should enable you to have a decent server, with BackupPC that will make it easy to make backups


How can I delete files based on (flac) metadata? I have several folders with both FLAC 24/96 and 16/44.1 files.

I want to delete the 24-bit/96 KHz files, but leave the others. How do I do this from the command line? Is there a way to systematically sort files by metadata and then use that list with rm?

For the sake of completeness, it's worth too mention that it's also very easy to open a directory and it's subdirectories in Puddletag, sort for your desired criteria, and then mark and delete the files you want. This might be safer and even faster than customizing or writing a completely new script (see: xkcd 1205 - Is It Worth the Time?).

You can use metaflac (manpage) for flac files.

$ metaflac --show-sample-rate --show-bps "somefile.flac"
44100
16

Of course this is not a complete script. You might want to take a look at the Advanced Bash-Scripting Guide.

The following would be a very basic script that deletes all files which return 44100 and 16 to the above command. The directory is given to the script as a parameter (e.g. flac-44100-removal.sh "Music/All music with 44.1kHz/")

#!/bin/bash
IFS=$'\n'

for file in $(find "${1}" -name "*.flac");
do
    if [ "$(metaflac  --show-sample-rate "$file")" = "44100" ]; then
        if [ "$(metaflac  --show-bps "$file")" = "16" ]; then
            rm -i "$file"
        fi
    fi
done

Alternatives to metaflac are: vorbiscomment for ogg, AtomicParsley for mp4/m4a, mid3v2 for mp3 or mediainfo for everything, but they all have different outputs, with mediainfo being overly customizable.


Does Ubuntu Snappy Core work with Raspberry Pi 1? Does Ubuntu Snappy Core work with Raspberry Pi 1 (the original model)?

Snappy supports ARMv7 and x86-64 platforms. Recommended development environments include the BeagleBone Black and Odroid-C1 open spec boards. The Raspberry Pi is disqualified due to its ARM11 processor, which doesn’t run ARMv7.

Source: http://linuxgizmos.com/lightweight-snappy-ubuntu-core-os-targets-iot/

Snappy Ubuntu Core requires Raspberry Pi 2 according to the official download page of Raspberry .

Check official download - click on + More info just above the download buttons for Snappy Ubuntu Core.


Keyboard layout - certain keys work with AltGr, other doesn't I run Ubuntu 12.04 in VirtualBox 4.3.14 on Windows 7 with a Swedish keyboard layout. In Windows everything works fine but in Ubuntu some keys/characters (the most important for a programmer) doesn't work.

This is the result from pressing the keys in the top row

1234567890+´   (Unmodified top row on keyboard)
 @£$€ {[]}\    (Windows with AltGr)
¡ £$€¥     ±   (Ubuntu with "AltGr")

More characters are broken (pipe | is a notable example) but the top row is the biggest problem. I can workaround this by enabling "direct connection" from my USB keyboard to VirtualBox but then I have to manually disable that every time I switch out of VirtualBox.

I have tried different keyboard layout, sometimes @ et al works but then other characters are broken. I also tried sudo dpkg-reconfigure keyboard-configuration with default values, but it didn't change anything.

I have guest additions installed (from the built in virtual CD). I got my VB disk image from a colleague who does not have this problem, however, he does not have guest additions installed (and hence can't use a higher resolution than 1024x768, and I need to run Eclipse...). He also have different installation of Virtual Box and Windows.

For example, the key for 2 should, in Ubuntu, produce four different characters, 2"²@. The first three works fine, including superscript 2 that requires AltGr-Shift-2, it is just plain AltGr-2 to get @ that does not work on this key (and all the other keys I have problem with).

Any ideas for a fix?

I have had the same problem and the solution after a great headache during days has been the following. Nothing can be more easy:
In the option: file->preferences->input
the following check box must be disabled: keyboard autocapture

I am translating from spanish version, but there must be something similar in the english version.
Greetings.

I have the very same problem with a guest xubuntu and host window 7.
I reinstall guest additions and I get the Altgr+2 working and lost left-arrow.
I lost my patience and I have created another VM. The only difference was the Type of it, this time I have chosen type: "Linux" instead "Other".
The keyboard is working as expected.


How do I free up more space in /boot? My /boot partition is nearly full and I get a warning every time I reboot my system. I already deleted old kernel packages (linux-headers...), actually I did that to install a newer kernel version that came with the automatic updates.

After installing that new version, the partition is nearly full again. So what else can I delete? Are there some other files associated to the old kernel images?

Here is a list of files that are on my /boot partition:

:~$ ls /boot/
abi-2.6.31-21-generic         lost+found
abi-2.6.32-25-generic         memtest86+.bin
abi-2.6.38-10-generic         memtest86+_multiboot.bin
abi-2.6.38-11-generic         System.map-2.6.31-21-generic
abi-2.6.38-12-generic         System.map-2.6.32-25-generic
abi-2.6.38-8-generic          System.map-2.6.38-10-generic
abi-3.0.0-12-generic          System.map-2.6.38-11-generic
abi-3.0.0-13-generic          System.map-2.6.38-12-generic
abi-3.0.0-14-generic          System.map-2.6.38-8-generic
boot                          System.map-3.0.0-12-generic
config-2.6.31-21-generic      System.map-3.0.0-13-generic
config-2.6.32-25-generic      System.map-3.0.0-14-generic
config-2.6.38-10-generic      vmcoreinfo-2.6.31-21-generic
config-2.6.38-11-generic      vmcoreinfo-2.6.32-25-generic
config-2.6.38-12-generic      vmcoreinfo-2.6.38-10-generic
config-2.6.38-8-generic       vmcoreinfo-2.6.38-11-generic
config-3.0.0-12-generic       vmcoreinfo-2.6.38-12-generic
config-3.0.0-13-generic       vmcoreinfo-2.6.38-8-generic
config-3.0.0-14-generic       vmcoreinfo-3.0.0-12-generic
extlinux                      vmcoreinfo-3.0.0-13-generic
grub                          vmcoreinfo-3.0.0-14-generic
initrd.img-2.6.31-21-generic  vmlinuz-2.6.31-21-generic
initrd.img-2.6.32-25-generic  vmlinuz-2.6.32-25-generic
initrd.img-2.6.38-10-generic  vmlinuz-2.6.38-10-generic
initrd.img-2.6.38-11-generic  vmlinuz-2.6.38-11-generic
initrd.img-2.6.38-12-generic  vmlinuz-2.6.38-12-generic
initrd.img-2.6.38-8-generic   vmlinuz-2.6.38-8-generic
initrd.img-3.0.0-12-generic   vmlinuz-3.0.0-12-generic
initrd.img-3.0.0-13-generic   vmlinuz-3.0.0-13-generic
initrd.img-3.0.0-14-generic   vmlinuz-3.0.0-14-generic

Currently, I'm using the 3.0.0-14-generic kernel.

You've a lot unused kernels. Remove all but the last kernels with:

sudo apt-get purge linux-image-{3.0.0-12,2.6.3{1-21,2-25,8-{1[012],8}}}

This is shorthand for:

sudo apt-get purge linux-image-3.0.0-12 linux-image-2.6.31-21 linux-image-2.6.32-25 linux-image-2.6.38-10 linux-image-2.6.38-11 linux-image-2.6.38-12 linux-image-2.6.38-8

Removing the linux-image-x.x.x-x package will also remove linux-image-x.x.x-x-generic.

The headers are installed into /usr/src and are used when building out-tree kernel modules (like the proprietary nvidia driver and virtualbox). Most users should remove these header packages if the matching kernel package (linux-image-*) is not installed.

To list all installed kernels, run:

dpkg -l linux-image-\* | grep ^ii

One command to show all kernels and headers that can be removed, excluding the current running kernel:

kernelver=$(uname -r | sed -r 's/-[a-z]+//')
dpkg -l linux-{image,headers}-"[0-9]*" | awk '/ii/{print $2}' | grep -ve $kernelver

It selects all packages named starting with linux-headers-<some number> or linux-image-<some number>, prints the package names for installed packages and then excludes the current loaded/running kernel (not necessarily the latest kernel!). This fits in the recommendation of testing a newer kernel before removing older, known-to-work kernels.

So, after upgrading kernels and rebooting to test it, you can remove all other kernels with:

sudo apt-get purge $(dpkg -l linux-{image,headers}-"[0-9]*" | awk '/ii/{print $2}' | grep -ve "$(uname -r | sed -r 's/-[a-z]+//')")

If you cannot remove more unused files and if you have other partition with/or free space on same device, you can resize of /boot partition by parted/gparted. (It is included on installation media, too.)

Warning: Resizing of partition is dangerous operation, save your important data on other media before doing it!


Why ISO master (editor) does not read Windows images I have the followjng problem with ISO master software: I try to edit WIndows 7 ISO image

$ isomaster windows7.iso

The file does open, unfortunately all I get is README with message:

  This disc contains a "UDF" file system and requires an operating
  system that supports the ISO-13346 "UDF" file system specification.

isomaster comes form Ubuntu repository, I am using 12.04. The system has kernel support for UDF installed, I can mount above ISO (mount -o loop) and see its content read only. Any idea how to fix it? Using other than isomaster tool is also an option.
Regards, Jacek

I used to use isomaster, but ran into this issue. Now I just add stuff to my iso's manually.

mkdir new_iso
mount -o loop iso_file.iso /mnt/
sudo cp -Rva /mnt/* new_iso
#Make your changes in the new_iso directory
sudo umount /mnt
cd new_iso
sudo mkisofs -D -r -V "ISO NAME" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o /home/USER/new.iso new_iso/

MS-Windows 7 disks are copy protected. I'm not sure what method is used. The directory can be listed, but an image of the disk cannot be made using conventional methods. I believe the disk contains some sort of "bad data" that Windows knows how to deal with after the correct key is supplied.


Which tool to crop a portion of the screen? I can see how to use Gimp to crop part of an image in a image file, but I want to crop a portion of the screen. How do you do that?

On Gnome Shell (17.10+)

To use the built-in gnome-screenshot capability (by default):

Ctrl + PrintScreen to copy a screenshot of the whole Desktop.
Ctrl + Alt + PrintScreen to copy a screenshot of the current active Window.
Ctrl + Shift + PrintScreen to copy a screenshot of an area you select with your Mouse.

On Unity

To use the built-in Screenshot capability:

PrintScreen to copy a screenshot of the whole Desktop.
Alt + PrintScreen to copy a screenshot of the current active Window.
Shift + PrintScreen to copy a screenshot of an area you select with your Mouse.

I write a bash simulate key shortcut Cmd+Shift+4 in OSX for fast crop screen.
What make this shortcut useful because it reduce the number of step to create a crop image. You just need call Ctrl+Shift+4 and drag, file cropped auto save with name format by time created, no popup, typing name etc needed.

add key shortcut Ctrl+Shift+4 in Custom key shortcut. Command link to your bash (eg: /home/nickfarrow/bin/scrot.sh)
Install scrot tool (similar import tool in imagemagick)
add bash to crop screen using scrot or import (need imagemagick):
like:

#! /bin/bash
DATE=$(date +"%Y-%m-%d_%H_%M_%S")
scrot -s ~/bin/crop/$DATE.png

~/bin/crop is the folder store crop image.

(Sorry for my English)
Hope this help.


Ubuntu 17.10 renew DHCP IP We've just installed an Ubuntu 17.10 server, and during the installation, it was assigned the IP address 192.168.50.84.

We've now reserved the IP address 192.168.50.107 on the DHCP server.

The netplan configuration was a surprise and, in my opinion, /etc/network/interfaces made a lot more sense to do.

Every time the server reboots, it sets the IP address to 192.168.50.84, and it doesn't seem to ask the DHCP for an IP address.

If we execute:

  sudo dhclient -r; sudo dhclient

The server gets the intended IP address (192.168.50.107) from the DHCP.

So, what is wrong with netplan? Why doesn't it ask for the IP address on boot or a network restart?
On every boot we get this line in the logs: Mar  6 18:48:08 blues-web-proxy systemd-networkd[723]: eth0: DHCPv4 address 192.168.50.84/24 via 192.168.50.140

Thanks for the replies.

We didn't do any configuration, the installation process only asked if it needed to use a proxy server or not - replied no.

/etc/netplan/01-netcfg.yaml

# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      dhcp4: yes

/etc/network/interfaces

# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
# Generated by debian-installer.

# The loopback interface
auto lo
iface lo inet loopback

/etc/hosts

127.0.0.1       localhost
127.0.1.1       blues-web-proxy.bluescreen.local        blues-web-proxy

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Its possible netplan left some stray settings depending on how you configured it. Check the usual suspects for "static ip" settings such as /etc/network/interfaces, /etc/hostname, and /etc/hosts.


How to list all symbolic links in a directory I have a symbolic link in my /var/www/ directory that links to WordPress. When I run the command ls -la from the /var/www/ directory the link to WordPress doesn't show up. Is there a way to list all of the symbolic links that are in a directory?

Parsing ls is a Bad Idea®, prefer a simple find in that case:

find . -type l -ls

To only process the current directory:

find . -maxdepth 1 -type l -ls

Credits: How do I make the shell to recognize the file names returned by a `ls -A` command, and these names contain spaces?

Type ls -lai,it will list all the files and subdirectories with corresponding inode numbers.You know files with same inode number are the links(hard or soft) and this solution also works for the symbolic links.


VirtualBox '/etc/init.d/vboxdrv setup' issue I have installed VirtualBox through the software centre, but when I try to start a VM, I get the following error:

  Kernel driver not installed (rc=-1908)

  The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or
  there is a permission problem with /dev/vboxdrv. Please reinstall the
  kernel module by executing

  '/etc/init.d/vboxdrv setup'

  as root. If it is available in your distribution, you should install
  the DKMS package first. This package keeps track of Linux kernel
  changes and recompiles the vboxdrv kernel module if necessary.

I already updated my dkms and installed linux-headers, but this /etc/init.d/vboxdrv doesn't exist.

I have been googling but I can't find an answer.

I also encountered this issue several times once I upgrade my linux kernel.

What I did:

sudo apt-get install linux-headers-`uname -r`

Reconfigure dkms and load module:

sudo dpkg-reconfigure virtualbox-dkms
sudo modprobe vboxdrv

Then VirtualBox works. No computer reboot needed.

VirtualBox Installation

Open the terminal and issue these commands for Ubuntu 12.10/Linux Mint:

echo "deb http://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list

wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -

sudo apt-get update

sudo apt-get install dkms virtualbox-4.2

Web: http://www.upubuntu.com/2012/10/virtualbox-424-released-ppa.html


Ignoring BGRT: invalid Ubuntu 14.04.03 I booted my computer and it took me to GRUB which was unexpected because I am only running Ubuntu and nothing else. The choices are: Ubuntu, Advanced option for Ubuntu, System setup. I select ubuntu. I put in my passphrase. My computer screen then displays:

[ 0.045025] Ignoring BGRT: invalid status 0 (expected 1)
[ 1.345025] ACPI PCC probe failded.

BusyBox v1.21.1 (ubuntu 1:1.21.0-1ubunu1) build-in shell (ash)
Enter 'help' for a list of build-in commands.

(initramfs)_

I am using Ubuntu 14.04.03 on a Toshiba Satellite L:55-A5284. I don't know what kernel I am using.

It is very much possible(and normal) to have GRUB(and various options for GRUB) even if you are using only Ubuntu. Those options gives you some flexibility to try out various options in the only O/S(Ubuntu) that you have.