Unable to connect Ubuntu 12.04 to a projector using the vga port

Here is how I was able to (not permanently, but still) solve the problem.

Neither the VGA nor the HDMI cables work when connecting an already booted machine to the projector.

When connecting the projector via VGA, before boot, it still fails to produce a proper working screen through the projector. Here is the link, where I got the idea to connect before boot.

However, connecting via HDMI cable to the projector, before booting the system, not only solves the problem of getting a working screen, but also solves another problem, that of resolution. I am able to work on full resolution (1366*768) instead of having to scale down to 1280*768 (or 4:3 basically).

The issue with the VGA cable connectivity still persists.


Boot Crashes with 4.8.0-22 Kernel in VMware Fusion

This bug was apparently fixed but has not made it to Ubuntu yet.

systemctl disable thermald

(from the same link) fixed the issue


For dual card setup you need to specify another device in your /etc/X11/xorg.conf file.

Open the file with your favorite text editor, let say using gedit:

  gksudo gedit /etc/X11/xorg.conf

You should have something like this at the moment:

Section "Device"
    Identifier      "Screen0"
    Driver          "nvidia"
    BusID           "PCI:0:03:0"
EndSection

Where BusID           "PCI:0:03:0" is one of your cards, what you need to do is duplicate that entry for the 2nd card so that it looks like this:

Section "Device"
    Identifier      "Screen0"
    Driver          "nvidia"
    BusID           "PCI:0:3:0"
EndSection

Section "Device"
    Identifier      "Screen1"
    Driver          "nvidia"
    BusID           "PCI:0:4:0"
EndSection

That should force the driver to be loaded to your first card in BusID           "PCI:0:03:0" and your second card in your BusID           "PCI:0:04:0".


Writing a program that will demo the $PS2 variable

From man bash:

   PS2    The value of this parameter is expanded as with PS1 and used  as
          the secondary prompt string.  The default is ``> ''.

The "secondary prompt string" is what is shown when you have multi-line input. For example:

$ echo 'foo
>bar'

The > shown above is PS2. If I were to change that, I would see it as soon as I tried any multi-line command:

$ PS2="%"
$ echo 'foo
%bar'

Ways to run multi-line commands include:

Open quotes (single or double) and hit enter without closing them.
Add a backslash to the end of a command and hit enter:

$ echo foo \
>

Use a HEREDOC:

$ echo <<<END  ## hit enter

As for doing it with a script, that's really not needed but you can simply write a script that prints PS2:

#!/usr/bin/env bash
printf "PS2 : %s\n" "$PS2"


Issues with dual boot (Ubuntu + Windows), UEFI and SSD

Change the SATA settings in the UEFI setup utility from RAID mode to AHCI mode, and use UEFI for both Windows 10 and Ubuntu 16.04 which are installed alongside each other as a dual boot, but in Windows you have to first install AHCI drivers. Windows AHCI instructions: https://askubuntu.com/a/963100/ & https://askubuntu.com/a/1148150/.


network interface of Dell XPS 13 9360 consumes too much power

I have the XSP 13 9360 running on Ubuntu 16.04.2 and get fairly good battery life of about 6-10 hours depending on workload. I get about ~5-10W power draw with Chromium and light web browsing.

I have done these already

Installed TLP

for generally optimize power usage on battery

Installed the 4.11 rc1 kernel

Install it with Ukuu (easiest way and you also get Ubuntu patches)
This should take care of the NVMe power drain since pre-4.11 kernels don't have NVMe power management at all

Installed the latest Intel video driver

Use the “Intel Graphics Installer for Linux”, this should take care of the necessary firmware items as well (huc, guc...etc)
https://01.org/linuxgraphics/downloads

Added kernel parameters for the Intel video driver

https://wiki.archlinux.org/index.php/Dell_XPS_13_(9360)

Notes here:
- don't forget update-initramfs after you added the config values
- the "enable_huc" parameter seems to be invalid, you will see a boot message about it if you check it with dmesg

Installed Kodi

For watching videos in hw-accelerated way. Kodi uses vaapi by default whenever possible so much lower power drain.

Note: This seems to be the best way to play from SMB shares anyway, it is practically stutter free on my home network (wifi), while 1080p H264 was stuttering with the Ubuntu built-in Videos app.

Switched to Chromium for browsing

Seems like it draws much less power on the Javascript-heavy web pages I view regularly (less than the default installed Firefox).

I will play with Firefox multi-process later, I hope I can bring down power draw there as well.

Deactivated Bluetooth

Simply by using the panel applet.

Deactivated keyboard backlight when not needed

You don't need this most of the time but it seems to be quite a power hog. At least a 0.5W gain from average brightness to zero.

I also intend to try to configure these

Configure hw-accelerated video for Chrome, Firefox

VAAPI and VDPAU usage in the browser for hw-accelerated youtube watching in the browser
https://oded.ninja/2016/10/30/optimizing-your-linux-distro-ninja-level/

Move /tmp to a tmpfs drive

So that the temporary files of the web browsers stay on a memory drive, hopefully further lowering power draw while browsing.

https://oded.ninja/2016/10/30/optimizing-your-linux-distro-ninja-level/

Investigate wifi power-draw

Seems like the Killer/Atheros wifi consumes 1.5W even if there is no network traffic (according to PowerTop). Maybe the power management is not activated at all on the driver.

Others

Let me know if you know any Ubuntu / Linux power optimizations I could use on this machine.


What is the design process (principles or guidlines) for Unity's UX and GUI?

You could have a look at unity design blog.
Here for example you find the task switching UX specification:

http://design.canonical.com/the-toolkit/unity-task-switching/

But you are too late, this documents on google docs used to be accessible for everyone, now as the development process of new concepts is restricted to employees and chosen community members you cannot access those docs anymore.


I find solution. The problem was with nvidia drivers. I had wrong drivers installed. I do not why, but finally grub menu showed. So I chose recovery mode and installed good drivers.


Run the top or uptime commands:

$ uptime
 19:36:03 up 5 days,  9:12,  8 users,  load average: 0.05, 0.16, 0.21
$ top -bn1 | head -1
top - 19:36:07 up 5 days,  9:13,  8 users,  load average: 0.05, 0.16, 0.21

The load averages stated here are:

/proc/loadavg
          The  first  three  fields  in this file are load average figures
          giving the number of jobs in the run queue (state R) or  waiting
          for disk I/O (state D) averaged over 1, 5, and 15 minutes.  They
          are the same as the load average numbers given by uptime(1)  and
          other  programs.

Consider my load averages: 0.05, 0.16, 0.21
That means, over the last minute, on an average, 0.05 processes have been waiting for resources.

Should you be worried that the load average is 2? In general, if the load average is greater than the number of CPUs available, then some process had to idle around waiting for a CPU slot.

If the load average is less than the output of nproc, you don't need to worry.

Also see: What does load average mean in unix/linux?
As Braiam notes, the processes need not be waiting only for CPU: Understanding load average vs. cpu usage


Compiling oggvideotools 0.9 on Ubuntu 12.04

I've maneged to build it, this is how I did it after the checkout.

sudo apt-get build-dep oggvideotools
./autogen.sh

I wish that I had learned the command build-dep earlier it would have saved me a lot of trouble compiling programs. It downloads all dependencies you need to build a package.


Catalyst Control Center 13.1 resets my HDTV scaling options after reboot

check Amd Radeons Overscan is reset after every boot
Also make sure that the tv settings for aspect ratio are right. For my 42" Lg tv I had to put aspect ratio for 'just scan' in combination with the above solution and problem is gone.


If you have compiz installed, do this

Open Compiz config Setting manager - (Press Alt+F2 and type ccsm and press enter)
Go to Ubuntu Unity Plugin section
Go to Experimental category
There you can change panel opacity to desired value (or reset to default by clicking on last button in that field)

If you don't have compiz(ccsm) installed, you can also change panel behavior using other softwares like MyUnity but I recommend installing ccsm

UPDATE: Install MyUnity software to change settings easily regarding panel, dash etc.:

   sudo add-apt-repository ppa:myunity/ppa
   sudo apt-get update && sudo apt-get install myunity


Use the full path to your script in the crontab
make sure it is executable: sudo chmod +x my_script
You got the path to the interpreter wrong in the first line of your script: it should be #!/bin/bash
As steeldriver pointed out, you won't actually see any output
Since you used 7 columns for your cronjob, I assumed you used a system wide crontab (in the /etc/cron* dirs or /etc/crontab. Using crontab -e edits your user specific crontab!


Ubuntu is installed, but not showing up on grub menu

Have you removed all installation media, this has happened once or twice when the both the cd drive and the flash storage are still attached.

If you keep getting this interface after removing all media then you may have botched your install, just try it again and make a record of every choice you make while installing this way you know exactly what you've done and have some easy to retrieve info when posting  installations issues.

To address your problem, try removing install media from your machine. If it persists boot into the live environment and post a screen grab of your current hard drive layout (just type disk into unity dash).

We'll take from there.


I have exactly the same HP laptop and problem.
There is a workaround. Ubuntu 18.04 boots fine if user auto-login is ON, and fails to boot if not. If you boot in recovery mode and then continue to boot by menu you will get to login screen and finally to the desktop. Copy your data, change in settings user auto-login to ON if you want to, then reboot. After that, it will boot without freezing.
I didn't find yet what causes that trouble.


These instructions for booting form a dvd/cd/usb drive look safe, but for getting the usb/dvd (cd wont fit) ready, I don't trust it. You can just back up your data, install rufus (rufus.ie) if you are on windows, create a boot drive from the ISO from the official Ubuntu/Lubuntu website (no github) and use the boot and install part of the instructions you linked. Just make sure you install GRUB to your hard disk/ssd, and not to the usb stick.
You don't have to "commit" something, a backup (in iso form) will be everything you need in case you need to go back. You can even make an iso backup in the live usb session.
DVD's are pretty slow, and Ubuntu will not fit on CD's. I recommend using an usb stick (min 4 GB right now) so you don't have to plug in an external CD/DVD player/writer.


nm-applet (network-manager) can't find security agent

This is caused by a corrupt configuration for the network manager applet.  See https://bugs.launchpad.net/ubuntu/+source/network-manager-vpnc/+bug/1297849.

I removed the file ~/.gconf/apps/nm-applet/%gconf.xml, logged out and back in and it worked.

It should also be noticed that the editor for the VPN connection didn't appear to have access to my saved passwords or the ability to save new ones.


Not able to wakeup after suspend on an HP 430

The best place to start debugging this is the community wiki.

Some general pointers:

Some suspend issues are due to buggy BIOS's - incorrect ACPI information is being passed to the kernel and thus preventing resume.
Some BIOS's need to have their "S3" setting enabled - S3: Suspend to RAM - it is worth having a look through the bios settings for a similarly named option.
Have a look at the MythTV ACPI wiki - some useful reading there.  You may or may not pm-utils package.
Have a look at the suspend log to see if there are any obvious errors or issues: /var/log/pm-suspend.log
There are some good comments on Code-Central for a potential solution for some laptops - looking through the comments, some people have reported that the solution there works for 11.10 users.
Whilst not undertaken likely - look at the HP website for your BIOS release notes.  Good manufacturers such as HP regularly issue BIOS updates.  If the release notes mention hibernate/suspend issues, then maybe a BIOS update will resolve your issue


Can we manually throttle the bandwidth of a network interface?

I guess you can. I never did so but there are already answers on google.

https://unix.stackexchange.com/questions/28198/how-to-limit-network-bandwidth

https://superuser.com/questions/66574/how-to-throttle-bandwidth-on-a-linux-network-interface

https://superuser.com/questions/60344/is-there-a-way-to-limit-bandwidth-in-linux

http://www.tuxradar.com/content/control-your-bandwidth-trickle


Wi-Fi connecting to other networks of the same name

This is a universal problem with WiFi auto-configuration:

It happens under Windows and Ubuntu and seems to happen when a network goes out of range and then comes back.  (Sorry, no experience with fruity variations on the same theme)

The only time I never had this happen was on a console-only server without network-manager nor wicd, but this was my sole sample so that one could be anecdotal.


Register Computer in Landscape "not enough licenses available"

If you have Landscape licenses you should be entitled to support as an Ubuntu Advantage customer.  Please raise the issue via that route.

For the record, we don't currently recognise either LXC or VirtualBox as virtualisation hosts - that's a technical statement, not a statement of intent (i.e. I don't know if we actually intend that behaviour).  As it stands the Landscape client recognises Xen, OpenVZ, VMWare, HyperV and KVM (including OpenStack) as virtual machine types.


How to mount a CD in Dosbox using 18.04?

Make a disk image from the CD, then:
Manually:

dosbox -c "imgmount D [isoList] -t iso" [exe] -fullscreen -exit

Automatically:

exeCute


Keyboard backlight turns on by itsself, Lenovo T440s

I found a workaround which solved this problem for me. The keyboard backlight no longer turns on just by itself. Actually, it's off all the time. I think the way this solution works is that it completely cuts off the system from the keyboard backlight control. Luckily, you can still turn the backlight on if you want with the Fn shortcut.

You need to edit the file /etc/dbus-1/system.d/org.freedesktop.UPower.conf.

You need to change:

<allow send_destination="org.freedesktop.UPower"
send_interface="org.freedesktop.UPower.KbdBacklight"/>

To

<deny send_destination="org.freedesktop.UPower"
send_interface="org.freedesktop.UPower.KbdBacklight"/>

Finally you should reboot. Note that there are two lines that look very similar to each other in this particular file. Just to be sure, change allow to deny for both of them.

I found this solution here so thanks belongs to the original author.


Cannot start Android Studio even after re installation

You have to install Android Studio using umake:
sudo add-apt-repository ppa:lyzardking/ubuntu-make
sudo apt-get update
sudo apt-get install ubuntu-make
umake android


Tried to clear trash and everything go removed!

Run sudo testdisk in terminal.
Unless you want a log file of the operations, choose No Log and press Enter.
Hard drives are shown, it is possible to distinguish them with the size and the model name. Go on the hard drive you want to analyse and press Enter.
You are asked for what is the partition table, for a normal PC it should be Intel. EFI GPT is for recent Apple Macs, Mac is for old PPC Mac. Choose the right one and press Enter.
Choose Analyse and press Enter.
Testdisk shows the current partitions, press Enter again to do a Quick Search
Choose the partition that contains the files you want to recover and press the letter P. If you can't identify what is the right partition, you can try one. At any time your can come back to this menu by pressing the letter Q
You are now in the directory tree (files and folders) of the partition! Each line starting with d letter is a folder, each line starting with a hyphen (-) is a file. Red lines are files/folders that have been deleted. You can move in files and folders with arrow keys on the keyboard, you can open a folder by pressing Enter and you can go to the parent folder by going on the double dot (..) and pressing Enter. The location where you are is always shown at the top near the word Directory. You can recover a file or a folder at any time by pressing C.
The first time you will press C, you will be asked where to copy the files. You have to move up to the destination folder and press C. For that purpose, you need to know the path of that folder. Once done, testdisk confirms you if the operation succeeded of failed, completely or partially. If you copy a large amount of files, be patient and wait for the transfer even if nothing happens on the screen.
You're done!

Source: http://computriks.com/en/recover-file-testdisk


Why can't I login to Web UI after install of Ubuntu 18 MAAS?

MAAS is supposed to be bare metal type 1 hypervisor/virtualization. So, why does it appear to install a full copy of Ubuntu?

MAAS is a tool for provisioning OS images onto blank bare metal machines, and high level management of those machines - it has a powerful API that can be used to allocate and release machines for a specific purpose on demand.

One way of doing this is by using Juju to allocate and configure resources from MAAS' machine pool.

MAAS can also deploy OS images as VMs using KVM onto target nodes as 'Pods'.  This requires the target nodes to have the KVM Hypervisor installed.

MAAS server service itself is installed onto an Ubuntu host OS, and there are several ways to accomplish this - the MAAS documentation does a great job of covering this in detail.


Is there a way to use badblocks with btrfs?

brtrfs doen't support badblocks. It currently assumes that all writes to the device succeed. Don't use it for a drive which is returning uncorrectable SMART sector errors.
More info and a work-around is available here.
The btrfs Project Ideas wiki says:

Not claimed — no patches yet — Not in kernel yet
Currently btrfs doesn't keep track of bad blocks, disk blocks that are very likely to lose data written to them. Btrfs should accept a list in badblocks' output format, store it in a new btree (or maybe in the current extent tree, with a new flag), relocate whatever data the blocks contain, and reserve these blocks so they can't be used for future allocations. Additionally, scrub could be taught to test for bad blocks when a checksum error is found. This would make scrub much more useful; checksum errors are generally caused by the disk, but while scrub detects afflicted files, which in a backup scenario gives the opportunity to recreate them, the next file to reuse the bad blocks will just start getting errors instead. These two items would match an ext4 feature (used through e2fsck).

Please comment if the status changes and I will update this answer.


Install newly developed app on Ubuntu Touch device

Further trial-and-error brought me to a solution.

created a .desktop file following the instruction at Ubuntu SDK Alpha
Placed the desktop file under /opt/qtquick-01 (the root of the installed app)
logged via ssh on the phone as phablet user, not ROOT (that was my main mistake I guess)
run the command: qmlscene --desktop_file_hint=/opt/qtquick-01/qtquick-01.desktop qml/qtquick-01/main.qml

Still, I cannot get the app icon to be displayed with the installed apps in the app lens.


How is disk space shared from nodes when using Ubuntu Cloud?

There are actually a few options. In writing this answer I came across this Xen page which covers what I've said

Virtual block-level-device sharing over SAN Amazon has banks of disks that are networked out to their EC2 VMs and exposed as physical disks. One drive can really only be [safely] used by one VM at a time, with the exception of making snapshot backups.

You'd be looking at technologies like iSCSI and nbd for this.
SAN-based network file systems Then there are the more traditional storage over IP methods like NFS. As they're essentially just another filesystem they're considerable more transparent for maintaining large repositories but they're less cross-platform (Windows and NFS don't mix well).

The clear advantage over block-level SANs is you can have more than one computer connected to the same data at the same time. NFS supports file locking and permissions so you can do all sorts of nifty sharing that wouldn't otherwise be possible.
Physical, local RAID And even more traditional than that, just sticking a RAID array in the host box and portioning that out to local VMs. A lot of VM providers do this still because it means you don't have a monolith disk array waiting to blow up.

And that does happen. I had a lot of downtime from a VPS provider because they couldn't reliably keep their SAN online.


An option is not seeing an argument (that is a variable) in bash, please help?

It seems you wanted to assign the result of the head ... command to the variable username here:

username= head -n $counter ./user_sheet.csv | tail -n 1 | cut -d ';' -f1

That is incorrect syntax. Correct it like this:

username=$(head -n $counter ./user_sheet.csv | tail -n 1 | cut -d ';' -f1)

And then do the same for the other variables too, which all have the same problem.

Also, change the sudo useradd command like this:

sudo useradd "$username" -m -g "$group" -s /bin/bash -c "$full_name"

Variables used in command line arguments should usually be double-quoted to avoid word splitting.


Choppy slow animation when opening Show Applications (launcher) on Ubuntu 20.04 on VMware VM

I switched from Xorg to Wayland and the issue was solved


What you are seeing, is probably the power management setting kicking in.

Try openening a terminal and running the command iwconfig wlan0. That will tell you if Power Management is turned on or off.

To permenantly turn off power management, follow the guide here.

Good luck.


failed to connect to http://changelogs.ubuntu.com/meta-release

I had this same problem with 17.10, but I'm betting the same applies to other recent versions as well.

Those MOTD messages are generated by scripts in /etc/update-motd.d.  The exact script that generates that specific line is /etc/update-motd.d/91-release-upgrade, which also runs /usr/lib/ubuntu-release-upgrader/release-upgrade-motd.  This last script will check for new releases and write output into /var/lib/ubuntu-release-upgrader/release-upgrade-available.

The script will only update the file every 24 hours.  So if you wait long enough, the file will go stale and the script will update the file anyway.  But, if you want to update it immediately, just remove /var/lib/ubuntu-release-upgrader/release-upgrade-available and run /etc/update-motd.d/91-release-upgrade and it should start working correctly.

I created this problem because when I first setup my 17.10 server, I had a typo in my DNS server address.


mini displayport not detected - hd4400, thinkpad x240

I tried using a display port screen instead of my old vga screen + minidp to vga adapter and this configuration is working.


Installing ubuntu usinng wubi.exe taking me to grub menu

Installing Ubuntu 18.10 with wubi.exe is not possible in Windows 10. Your alternatives on Windows 10 are Ubuntu 18.04 with Windows Subsystem for Linux (WSL), VM or dual boot.

Please note that Windows 10 S does not support running WSL. Windows 10 in S Mode can’t use command-line shells like PowerShell, Command Prompt, or Bash which are commonly used in WSL. Various other developer tools are also off limits.


How to create symbolic link to a directory excluding certain files?

It would be better if you create symlinks for each file/directory instead.

mkdir /home/pt/Dropbox/pt
for d in /home/pt/*; do ln -s "$d" '/home/pt/Dropbox/pt/'; done

Then delete the link Videos and Dropbox

rm /home/pt/Dropbox/pt/Videos
rm /home/pt/Dropbox/pt/Dropbox

To delete every link, use

rm /home/pt/Dropbox/pt/*
rmdir /home/pt/Dropbox/pt


USB ports not working - how do I check for drivers and diagnose problem?

1) Check for dmesg logs

dmesg | grep -i USB OR less /var/log/dmesg

The above logs might hint at USB Mass storage device found:

[    1.871577] Initializing USB Mass Storage driver...
[    1.871749] scsi6 : usb-storage 3-2:1.0
[    1.871807] usbcore: registered new interface driver usb-storage
[    1.871808] USB Mass Storage support registered.

2) Check if the USB HDD is found

sudo fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 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: 0x5738799d9
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 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: 0x573879d9

PARTITION TABLE OF FIRST DRIVE

Disk /dev/sdb: 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: 0xef4535bb

3) The disk might be detected but UDEV is not able to mount it as there might be issues with rules. Run the following command as you insert / remove USB drive and see if you can see similar output.

sudo udevadm monitor

UDEV  [5301.797498] add      /devices/pci0000:00/0000:00:1c.3/0000:03:00.0/usb3/3-2/3-2:1.0/host7/target7:0:0/7:0:0:0 (scsi)
UDEV  [5301.798939] add      /devices/pci0000:00/0000:00:1c.3/0000:03:00.0/usb3/3-2/3-2:1.0/host7/target7:0:0/7:0:0:0/scsi_disk/7:0:0:0 (scsi_disk)
UDEV  [5301.799263] add      /devices/pci0000:00/0000:00:1c.3/0000:03:00.0/usb3/3-2/3-2:1.0/host7/target7:0:0/7:0:0:0/scsi_device/7:0:0:0 (scsi_device)
KERNEL[5301.799286] add      /devices/virtual/bdi/8:16 (bdi)
UDEV  [5301.799490] add      /devices/pci0000:00/0000:00:1c.3/0000:03:00.0/usb3/3-2/3-2:1.0/host7/target7:0:0/7:0:0:0/bsg/7:0:0:0 (bsg)
UDEV  [5301.799696] add      /devices/virtual/bdi/8:16 (bdi)
UDEV  [5301.799745] add      /devices/pci0000:00/0000:00:1c.3/0000:03:00.0/usb3/3-2/3-2:1.0/host7/target7:0:0/7:0:0:0/scsi_generic/sg2 (scsi_generic)
KERNEL[5301.862793] add      /devices/pci0000:00/0000:00:1c.3/0000:03:00.0/usb3/3-2/3-2:1.0/host7/target7:0:0/7:0:0:0/block/sdb (block)
KERNEL[5301.862808] add      /devices/pci0000:00/0000:00:1c.3/0000:03:00.0/usb3/3-2/3-2:1.0/host7/target7:0:0/7:0:0:0/block/sdb/sdb1 (block)
KERNEL[5301.862825] add      /devices/pci0000:00/0000:00:1c.3/0000:03:00.0/usb3/3-2/3-2:1.0/host7/target7:0:0/7:0:0:0/block/sdb/sdb2 (block)
KERNEL[5301.862833] add      /devices/pci0000:00/0000:00:1c.3/0000:03:00.0/usb3/3-2/3-2:1.0/host7/target7:0:0/7:0:0:0/block/sdb/sdb3 (block)
UDEV  [5302.204799] add      /devices/pci0000:00/0000:00:1c.3/0000:03:00.0/usb3/3-2/3-2:1.0/host7/target7:0:0/7:0:0:0/block/sdb (block)
UDEV  [5302.664236] add      /devices/pci0000:00/0000:00:1c.3/0000:03:00.0/usb3/3-2/3-2:1.0/host7/target7:0:0/7:0:0:0/block/sdb/sdb3 (block)
UDEV  [5302.664315] add      /devices/pci0000:00/0000:00:1c.3/0000:03:00.0/usb3/3-2/3-2:1.0/host7/target7:0:0/7:0:0:0/block/sdb/sdb1 (block)
UDEV  [5302.762447] add      /devices/pci0000:00/0000:00:1c.3/0000:03:00.0/usb3/3-2/3-2:1.0/host7/target7:0:0/7:0:0:0/block/sdb/sdb2 (block)


Starting from scratch, forget about webmin as a separate thing...

you want to switch to your ubuntu root user ( "sudo su" hit enter, then "cd" and hit enter a second time to go back to root directory)
Make sure its ubuntu 16 and apt-get update and apt-get upgrade are applied first.
install "virtualmin gpl" using its automated installler (virtualmin gpl works perfectly with whmcs, you cannot add resellers is main restriction...just in case anyone is wondering)
After virtualmin install is complete you can then add a new admin user in webmin and disable the root user login (so root still exists but cannot log into webmin or virtualmin). A mental note...virtualmin also has users..i selected the webmin tab and edited its users. I am not sure what difference it makes actually...webmin is running as root anyway. Perhaps its better to restrict access to admin to your home ipaddress instead (if you have purchased a static one from your home Internet Service Provider)...or force the use of an ssh tunnel for access???

I am no expert however i have found its best to use root user to install cpanels rather than using sudoer. Some panels specifically tell you to do install as root user (ispconfig and i think vestacp too) ....otherwise you end up with privilages and permissions problems after the install. I did the same for virtualmin install.

Webmin comes as part of the virtualmin gpl installer. You will have both at the end of automated install process and in addition to these two packages you get usermin included as well (although its not so obvious as there is no usermin tab like the clearly visible webmin and virtualmin ones on the dashboard screen).

Ensure you have only a blank operating system, more than 500MB RAM available on your virtual machine (preferrably 1 gig)

Make sure your hostname is configured, then add your external ip address to
/etc/hosts . Add the following on line underneath existing localhost information (use your real ip address, hostname, domain)
(       )

Other than that the automated installer should sort everything for you.


Yes, in fact I have just done it yesterday!

The problem with naively installing Ubuntu on an external drive is that your Mac might not recognize it as bootable, due to its custom implementation of the EFI and UEFI specs.

My directions are for installing Ubuntu 16.04 LTS on a 2014 MacbookPro 13-inch Retina model for a system with EFI; after installation, you should be able to boot an Ubuntu installation on an external drive from your Mac's native EFI software. You should be able to try this on your system without fear of irreversibly altering your primary hard drive and system.

I have followed this (http://courses.cms.caltech.edu/cs171/materials/pdfs/How_to_Dual-Boot_OSX_and_Ubuntu.pdf, mirrored on: https://www.scribd.com/document/324530525/How-to-Dual-Boot-OSX-and-Ubuntu) guide with the following modifications.

Under "What you need:"

Instead of 50 GB free space, you need instead a hard drive that you don't mind wiping. Under certain circumstances you can do it without wiping, but I won't cover that here.

Under "Part 2: Preparing your Mac"

Instead of selecting your internal hard drive, select the drive you want to install Ubuntu to. Reformat the hard drive so that the Format is "OS X Extended (Journaled)" and the Scheme is "GPT Partition Map". The purpose of this is to ensure that your hard drive uses the GPT Partition Map and therefore bootable from EFI.

Next, partition the drive such that you have two partitions, and the first should have the "OS X Extended (Journaled)" filesystem. The first partition should be as small as possible but not less than 200MB.

Under "Part 3: Installing Ubuntu"

These modifications are very important. If not followed, you would be at risk of overwriting data in your primary hard drive.

Before you install Ubuntu, if you weren't able to resize the first partition to be as small as 200MB using OS X's Disk Utility, now is your chance. Launch GParted, identify the location of your external drive (here I assume that it is /dev/sdd), identify the partition (it should be a HFS+ partition), and resize it down to 200MB or 200MiB. Apply your changes.

After you select "Something else", on that screen,
1. Identify the hard drive you had formatted and partitioned earlier, and the path it is on. I shall assume that it is at /dev/sdd. Change the "Device for boot loader installation:" to the one at /dev/sdd.
2. Select the larger partition and delete it. In the free space, perform similar steps as the guide to create an ext4 partition that will be "/", and a swap partition. Make a note of that partition, it should be /dev/sddN .

Under "Part 4: Making Ubuntu bootable"

Instances of /dev/sda should instead read /dev/sdd

Back in OS X, You may run diskutil list to determine where your external disk is mounted, e.g. /dev/disk2. Also identify your Ubuntu Boot Partition, e.g. /dev/disk2s2

Instead of sudo bless --device /dev/disk0sN --setBoot, run sudo bless --device /dev/disk2s2, without the flag, where /dev/disk2s2 refers to the path of the Ubuntu Boot Partition as mentioned above.

After everything, when you reboot, hold down the Option key and in addition to the standard choices, you should see an EFI Boot choice, which if selected, should chainload to a GRUB menu from the GRUB installed at the Ubuntu Boot Partition, from where you can chainload to the Ubuntu installation.

Side-effects and Caveats

I discovered that after installation, for some reason, GRUB was also installed to the EFI partition on my primary internal drive, and I was able to remove it by mounting that EFI partition from my Ubuntu installation, remove the /EFI/ubuntu directory, then unmounting the partition, and have no repercussions. But I think that it is benign to leave that directory alone.


Google Earth Pro Returns Unknown Graphics Card And Will Not Launch 18.04

After restarting the computer Google Earth 7.3.3 is working correctly.


Would compiling programs from source speed up my operating system?

No, and it wouldn't be worth the time it would take you to do it, not to mention the fact that you wouldn't get security updates directly from Ubuntu anymore.


How do I determine what packages require a certain library?

Command line solution:

apt-cache --installed rdepends $pkg_name


To change the default font in gedit:

Select gedit --- Preferences --- Font & Colors.
Uncheck the box next to the phrase, Use the system fixed-width font.
Click on the current font name.
gedit will open a font-chooser window, allowing you to see available fonts and choose the one that you prefer*.
After you have chosen a new font, use the slider under the list of fonts to set the default font size.
Click Select, and then click Close.

Source


What's the difference between the TTY and the GNOME terminal?

The virtual terminals (the ones you get to with Ctrl Alt F1-9) go back to the roots of Linux. Remember that Linux was originally a command-line only system and designed for multiple users. The idea was that each user could log into a single tty. This would not happen on the same physical machine of course, think of servers that many computer terminals would connect to. Each user would connect using a different computer and the server log them in to a tty.

This has nothing to do with the tty command which is part of coreutils. The tty command is simply a tool that lets you know the name of the terminal you are currently using.

The "terminal" (actually called a "terminal emulator") is simply a GUI program that mimics the old behavior. It lets you run a shell (bash in the default Ubuntu) from within your X session.

The main point is that both the virtual terminals and the terminal emulators provide you with a command line interface, a shell. They are basically the same thing. The only important difference from a practical point of view is that the terminal emulators run interactive, non-login shells while if you drop into a tty and login there, you will run an interactive, login shell. For more information on the differences between these two types of shell, see here.

I suggest you also read this excellent Q&A on Unix & Linux:

What is the exact difference between a 'terminal', a 'shell', a 'tty' and a 'console'?.


As posted by user127018 (OP) in his question:

  Solution: I am answering my question. I could fix the problem by
  adding a line in the ~/.juju/environments.yaml:

juju-origin: proposed

  The fix was posted in LP Bug #1060404.


Command 'python' not found after creating conda environment

Sorry for all the fuss but I have solved the problem. Since Ubuntu 19.10 doesn't come with python2 pre-installed what I did to get rid of the problem was to first remove python (since I installed it after installing conda, note that this is python and not python3 since python3 comes pre-installed) and conda completely with the following lines.

sudo apt-get purge --auto-remove python

rm -rf ~/miniconda3

rm -rf ~/.condarc ~/.conda ~/.continuum

After this I installed python

sudo apt install python

And after installing python I installed conda the normal way and now I don't get any of the error messages posted when I open up a terminal. I guess order of PATH variables matters. Since when I had troubles I first installed conda and followed up by installing python and think that condas python path might have come first.


I was misunderstanding the problem and asking the wrong question.  The correct question was, how do I introduce a new NIC on Ubuntu Server 18.04

I bought an Intel card, fitted it and it failed to work until I performed a reinstall, meaning that the NIC does not show under ifconfig if added after install.


Error accessing files through Samba, cifs-utils and smbclient

Did you check the MTU settings of both systems? If the MTU is too high, your connection could hang when transferring large files.


There is no xorg.conf. How does ubuntu store user configurations of screen resolution?

You can check sudo ls /usr/share/X11/xorg.conf.d/ there you should find a bunch of files corresponding to your current video drivers etc.

The second part of your question, regarding knowing what resultion to display: this will be dependent on your current desktop environment in use. One user can end up with different screen resolutions upon login if they have two different desktop environments like Gnome and XFCE installed for their Ubuntu distro.

For example, I use XFCE4 and mine is in ~/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml. If you use something else, you will likely find the display config file somewhere in your $HOME folder, for gnome if I recall correctly it
can be found by cat ~/.config/monitors.xml


Firstly, you need the python-dev package because Pillow needs compile headers defined.

sudo apt-get install python-dev

On Ubuntu 14.04 you need few extra packages to get pillow working. Install all of them with the command:

sudo apt-get install libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk

This will work for both python 2.x and python 3.x. You might not need all of these, but at the very least you should install libjpeg8-dev and zlib1g-dev for JPEG and PNG support.

If you are using Ubuntu 12.04, use the following command.

sudo apt-get install libtiff4-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev python-tk

Detailed instructions can be found at official pillow documentation.

Installation — Pillow (PIL Fork) 2.6.1 documentation


I'm able to fix above issue by simply replacing /opt/lampp/etc/my.cnf file to /etc/mysql/my.cnf

1) First backup the /etc/mysql/my.cnf to some where if some thing goes wrong

user@user:~$ cp /etc/mysql/my.cnf ~/Desktop/

2) Then copy /etc/mysql/my.cnf file to /etc/mysql/

user@user:~$ sudo cp /opt/lampp/etc/my.cnf /etc/mysql/

3) Restart the computer

4) Start lampp server

user@user:~$ sudo /opt/lampp/lampp start

5) Then mysql-client will start in console without any errors

user@user:~$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.6.24 Source distribution

Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

I done this in Ubuntu 14.04


Trying to load 64 bit Ubuntu 12.04 from a live USB. Get the message 'boot error', then skips my USB and boots from my hard drive

Forget the grub installer...boot from Live CD and try Ubuntu! When the desktop loads, insert your USB stick (flash drive), then click on the search icon that's the ubuntu logo tab on your desk top, search for start up disk creator, click on the start up disk creator and then a box will open look down on device you should see your flash drive in the list, select your drive in install!


What does "System-wide settings will be cleared" mean?

I've tested the upgrade. I have a separate primary root (/) and a /home partition. During the upgrade the primary root partition was changed to logical, and the /home filesystem was retained as another logical partition, while having a new /home.

The / was reformatted and thus the system-wide settings are cleared, but the old /home was saved onto a new partition. So it is possible to copy back old data to the new /home partition.

Before upgrading, it is always advised to create backups from the key areas of the system. Eg.:

/home
/etc
/boot
And if you have any other software installed e.g. Apache, then its corresponding directories (in this case /var/www, /usr/lib/cgi-bin).


I'd recommend to install Oracle JDK 8.

sudo apt-add-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer


What is the "buffer size" (audio) and how to choose the best amount of buffer size?

JACK Properties

  Sample Rate, Buffer Size and Periods/Buffer determine the base JACK
  latency. Their default values of 48000, 1024 and 2 respectively should
  work with most devices but a latency over 10ms is not usually
  considered good enough to be called realtime. Anyone interested in
  multitrack recording may wish to experiment with these settings to
  achieve the lowest, xrun-free latency their hardware will allow. It is
  possible to achieve 1ms latency with good hardware and the correct
  configuration.

A smaller buffer gives lower latency. The lowest size most devices can handle is 64 but lower quality hardware may not handle any lower than 512.

For instance a smaller value like 128 for buffer size will help reduce latency if you will be recording non-midi instruments.

Sources:

How To Configure Jack and Ardour in Ubuntu Linux for Recording Midi
JACK configuration


Hard Drive Failure: Failed to read, Failed to Mount

Given that you can't boot to anything and it apparently isn't readable I would hazard a guess and say your drive is damaged beyond all hope.

Typically an Input/output error is indicative of hardware damage or failure.  This is further the case typically if no OS or system can mount or repair or read the filesystems on the disks.

Unless you have backups, I believe you are out of luck here.


Ubuntu 18.04 freezing randomly and freezes on shutdown and reboot

The fix involved going to /etc/default/grub and changing the default line to GRUB_CMDLINE_LINUX_DEFAULT="noacpi" and then running sudo update-grub.

I also disabled fast boot and secure boot.


There are two different locations within KDE's system settings that affect this behavior-  Screen Locking and Energy Saving.

Configure Screen Locking allows you to configure if (and after how long) the screen should lock after inactivity, and if a password is required to wake.

Energy Saving allows you to configure if (and after how long) the screen should turn off, as well as other options to save power.


Hi I am short in time because I am at work. I can give you a hint and maybe an assumed solution ;). I had trouble with my BT adapter (which is USB) as well two weeks ago. Mine is:

Bus 004 Device 002: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)

But I had exactly the same symptoms as you described it wit 14.04 LTS. After a long research I found out that the bluetooth drivers became a little bit buggy some months ago. It has something to do with a set mode when the driver tries to initialize the BT device. As far as I can remember it was a Bugfix that turned out to not work very well with some devices.

See BT kernel driver became unstable. There is also a link to a patch that made my BT dongle work again: Fix unstable BT driver patch

I did not apply the patch to my kernel because I am short of time for the moment and BT is not so important for me but since the patch is applied to next Ubuntu kernel for 14.04 LTS I installed this kernel and BT worked perfectly again. Since I have a NVidia Graphic Card I could not use this kernel because nvidia 304-updates package does not work with this release, but on commandline all worked fine.

If it is possible for you switch to 14.04 LTS and wait for the next kernel release or download kernel-source package, apply the patch and compile a kernel of your own.

Hope it helped, I wish you good luck


Change Mac Address permanently inside /etc/network/interfaces

First, the guide you linked to.  It's a nice guide.  Sadly, it also makes some headaches for different types of connections.  And normally, /etc/network/interfaces is left alone except for the loopback interface in favor of Network Manager managing your connections.

There's a few reasons for this, mostly in that configuring wireless via /etc/network/interfaces will be painful if you switch wifi networks as you have to edit the configuration and reload it manually (and sometimes it won't load until you reboot).  It's also extremely painful in that you have to hard-code connection data into wpa2-supplicant - wireless network name, password (in plain text), sometimes even the wifi band and the channel number.  All of which is painful as you have to change it to switch to a different network.

I did mention that using /etc/network/interfaces will prevent Network Manager from working for handling your connections.  The way Network Manager works is that it takes 'ownership' of the devices that are network devices not defined in /etc/network/interfaces and updates the configurations for each on the fly or with predefined connection profiles from older connections made in the past.  If you decide to go the /etc/network/interfaces route you will have to make adjustments to how you connect to the Internet, and I give some descriptions for wifi connections this way below.  And a more useful link.

Ethernet is not so bad.  Ethernet can work pretty well actually with this, because you can simply set up Ethernet as such for a DHCP'd connection (dynamically assigned IP address, not a static config; note I use 'eth0' here instead of your actual device here to be more understandable):

auto eth0
iface eth0 inet dhcp
    hwaddress ether 01:23:45:67:89:0A

The only headache is if you have static IP addresses and not DHCP handled ones.  But it's still pretty simple.

On wireless, however, it's not as pretty.  It's a mess of steps, usually involving iwlist, /etc/network/interfaces configuration, advanced configuration of wpa2_supplicant, and otherwise.  You'd ultimately end up with something looking like this when you're done, for a standard residential-grade shared-password network, but that only works for your one wireless network:

auto wlan0
iface wlan0 inet dhcp
    hwaddress ether 00:11:22:33:44:55
    wpa-ssid WIFI_NAME
    wpa-psk HASHED_PASSWORD

It gets even more complex when you need to switch networks, or use an Enterprise grade connection with an authentication backend (called WPA2-EAP or WPA2 802.1x Enterprise, or other names), of which I am not going to detail here.

You'll also note I didn't copy the steps in for how to get the hashed password.  That's my bad, I'm on a time crunch to get to work, but this is all in the wiki linked in the next paragraph (from Debian, but it works).

The Debian Wiki on Wifi and How to Use It on the Command Line is where most of this information came from for the wireless section here, and having personally had to set this up on two Raspberry Pi devices manually because they're headless, I can attest that this is the most painful approach to setting up wireless.

There's a second element here: network device MAC addresses are hardcoded into the device.  You can't ever 'permanently' change the MAC address that a device has.  What /etc/network/interfaces, MAC Changer, and Network Manager (via the 'cloned MAC address' function) do is they temporarily change the Ethernet address advertised, but they don't change the core hardware address.  You can make it work with Network Manager, but you have to configure it manually for each wifi network you use.  MAC Changer, similar situation, it needs to be run at boot time.  /etc/network/interfaces does this at boot time, but you lose Network Manager management of devices.


What is the recommended way to disable a service in 14.04?

Typically those services are started in any of these folders : /etc/init , /etc/init.d , or /etc/rc.2.d , or /etc/rcS .

Find the file corresponding to the service, and rename it or move to another directory where it won't run.


How do I change one username to another?

Boot to root shell in recovery mode
mount filesystem in read-write mode with mount -o remount,rw /
Delete the new user that you created
Change your username in /etc/passwd file.
Reboot.

Repeat steps 1-2 if you need to undo the changes in /etc/passwd


Testing openstack with conjure-up (novalxc) neutron-gateway fails to start

I already answered something similar here:
No Neutron in Openstack

And based on your comment "there are no networks configured" I feel that we missing neutron-api. Hence I asked to provide juju status so we can see which unit didn't deploy correctly.

So to resolve, You could try to see what went wrong with:

juju debug-log --replay

And see why this specific machine had problems. From your output it seems that ipv4 address is missing. Would be good to understand if there is anything on the network that provides ipv6 - if it is - disable it or if you can not disable just ipv6, spin up lxc container and add dnsmasq to manage DHCP for you.
I would take a look inside the container - in this instance, it would be lxc exec juju-7e83fd-12 bash and see if there is anything in the logs of the container. Start with ip a to check for address.

To resolve I would run

juju add-unit neutron-api

This will deploy another machine (lxc) and unit of neutron-api called neutron-api/1 and add all required relationships. Afterwards its a case of

juju remove-unit neutron-api/0

to clean up.

Hope this will help. B


How do I get the Realtek RT8139 ethernet port working on a Dell Inspiron N5010?

Just curious if you are running on Battery power or AC Power?

I recently upgraded my Toughbook from 12.04 to 12.10 and was pulling my hair out as my Wireless was working but my Wired connection would not connect.  Once I plugged in my AC Adapter it turned on and connected showing me it was a Power Management setting preventing it from working before.

Thought this might be helpful to you.


Why does Ctrl + C not kill Python running in terminal?

It's because of the design of the Python interpreter and interactive session.

Ctrl + C sends a signal, SIGINT, to the Python process, which the Python interpreter handles by raising the KeyboardInterrupt exception in the currently-running scope.

If the interpreter is running in an interactive session (i.e. by running python or python3 at the console), then the exception in the current function is printed and you return to the Python prompt. If the interpreter is running a script (e.g. by python3 my_script.py), then unless the KeyboardInterrupt is handled by the script, the whole program will stop when the exception is raised.


Installing Ubuntu 12.04 next to Win7 - No boot menu

As the GRUB is installed in usb disk not in your hard disk , I recommend you to boot the live usb, then install boot-repair tool and reinstall grub to your hard disk. :)

Read carefully -> https://help.ubuntu.com/community/Boot-Repair


You probably just need to run:

sudo apt-get install gtk2-engines-murrine

To install the GTK Murrine engine.

Otherwise, is it because it apparently only supports fairly old versions of Linux (RHEL 5&6, Ubuntu 10.04 & 12.04) - see here


I'd go with a file for every single host containing the variables, let's call it host1.cfg, copy it over at the beginning of the script and source it:

rsync user@server:/path/to/host1.cfg .
source host1.cfg

This will overwrite any existing host1.cfg on the host, so updates to the server file apply on the next run. Be warned that source will execute whatever commands host1.cfg contain with no mercy. Make sure it can't be changed by anyone, especially if you run the script on the host as root. For alternative and maybe more secure approaches (depending on your setup) see: How do I read a variable from a file?

I like rsync, but you can very well also use scp, wget or curl for the task. If you don't need a local copy you can use (thanks to glenn jackman):

source <(ssh user@server "cat /path/to/host1.cfg")


How to make indicator-network work with DSL?

indicator-network works with ConnMan instead of NetworkManager, and judging from their site ConnMan doesn't support PPP currently (it could be added with a plugin, if one exists).  (Also, this indicator is only going to be used for the Netbook Edition, not for the Desktop Edition.)


By default there is no .xprofile file in your home directory unless you create one. The instructions for making an .xprofile file are found here under the How to setup a dual monitor heading in the Ubuntu Resolution wiki.

  Use your favorite editor to create ~/.xprofile containing something
  like:

xrandr --output VGA1 --mode 1024x768 --rate 60

  Now that command will be run every time your start your Xsession. You
  can force it to run by logging out and logging back in or by executing
  ~/.xprofile from your terminal.

  Here is an example of my ~/.xprofile. The # are for comments just
  like you do with shell scripts. The purpose of my setup is sometime
  have laptop on the left and other times I have my laptop on the right.
  This makes very simple and easy to change which side you want each
  monitor to be on. I just added the information on how to set your
  primary monitor.

xrandr --output VGA1 --mode 1024x768 --rate 60

#Laptop right extra Monitor Left
#xrandr --output VGA1 --left-of LVDS1

#Laptop left extra Monitor right
xrandr --output LVDS1 --left-of VGA1

#This is to set your primary monitor.

#This sets your laptop monitor as your primary monitor.
xrandr --output LVDS1 --primary

#This sets your VGA monitor as your primary monitor.
#xrandr --output VGA1 --primary

  Some people think it is a disadvantage that this only works for one
  user, other people think this is an advantage. If you want to be able
  to use this just copy it over to your profile folder.

  Important Note: If you just blindly copy some commands from a website, you may see an error message:

xrandr: cannot find mode 1024×768

  This may be due to some CMS' way of modifying content: xrandr expects
  the letter x and not the multiplication cross × between horizontal and
  vertical resolution.

  Incorrect example:

xrandr --output VGA1 --mode 1024×768 --rate 60

  Corrected example:

xrandr --output VGA1 --mode 1024x768 --rate 60


Not Bitcoin-qt at Software repository 20.04

Brief search on https://packages.ubuntu.com shows that it was never available via official packages.

But LaunchPad has PPA with this package, you can add it and install package with

sudo add-apt-repository ppa:luke-jr/bitcoincore
sudo apt-get install bitcoin-qt


The problem here was with the name of the file I was trying to run. I changed the name of pandas.py to pta.py.


How to set pre-installed applications in an Ubuntu installation?

If you don't want to create and maintain an installation that may change as you add or remove favorite programs, another option is to save the installed progrms using either synaptic, the command-line, or a feature in the Software Center + Ubuntu one called "Sync between computers."

If you use the software center, it has a feature in the "File" menu called "Sync between computers" where you can use your Ubuntu One account to keep apps synched between multiple computers.  AskUbuntu has instructions for it.

If you use synaptic, there's an option in the File menu to "Save Markings" and "Read Markings".  This will save all the installed programs to a file.

From the command line, there's a way to do it, also.  There's an AskUbuntu article that explains this process.

Unfortunately, none of these methods will install anything that was installed manually rather than using the repository.  But there are drawbacks to any method.


Cannot use Ubuntu 17.10 ISO image for installation

You can re-download Ubuntu iso install images from Ubuntu Releases

Then follow these Ubuntu tutorials:

How to verify your Ubuntu download

Create a bootable USB stick on Ubuntu


I couldn't figure out what was still running, my solution was taken from the VM Knowledge Base.

From the Section 6 "Remove the VMware startup scripts" we know where all startup scripts are located. Simply remove them all, and then restart your machine. On my Ubuntu box it was # rm /etc/rc{2,3,4,5}.d/*vmware*. Nothing related to VMWarewill be running.

After that I was able to run vmware-installer --uninstall-product vmware-workstation. Or enter whatever you're going to uninstall.

This solution isn't a clean one, but it worked for me. It simply lasted to long to figure out which process was using kernel modules or which files where still open.


Use screenshot, the Xfce4 Screenshooter is part of the xfce-Goodies. It can capture areas as well as fullscreen and application windows.


How to remove desktop entry of eclipse neon

Your file is deleted. Check man page of locate.

It refers a db to search the file listed.

  The file name databases contain lists of files that were on the
         system when the databases were last updated.

The database has not been updated yet. You can of course try updatedb

sudo updatedb

I suggest Use find instead to search through your directories.

find /home/protocol -type f -name eclipse.desktop


How can I run simultaneously two different JVM in Ubuntu 16.04?

Absolutely. Assuming you've already got 1.8 installed:

Download the 1.6 .tar.gz file from Oracle's website, and extract it to a location of your choice such as /opt/jdk1.6/.

After you've done that, you can just do:

#For the app that requires 1.8
java -jar program.jar

#For the app that requires 1.6
/opt/jdk1.6/bin/java -jar program.jar


Why and how firefox shows youtube video despite all plugins are disabled, including Shockwave flash ones?

Because it is using the html5 technology to show the video. This is a quite new technique. You can find more information at http://youtube.com/html5


Try to create bootable usb drive with Ubuntu Startup Disk Creator (not sure if it works but worked for me before).

Don't try to install it before reading more about UEFI bios and the GPT partition system.

PS: If you mess up your boot loader don't panic and try to boot with >>>Super Grub<<<

    Once you have booted successfully with Super Grub try >>>Boot-Repair<<<


What happened to the files that were supposed to be installed to / for Ubuntu 16.4.3 LTS Server?

On any disk partition, the file system has a reserved spaced used by the File Allocation Table. This is the index used by the file system in order to organise file tree, inode and others files information.

More big is the hard drive, more bit is the File Allocation Table, that may take few Gigabit with the current hard drive size.


Edit the file /etc/default/grub. Instead of

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

Write this to check if you can see some error

GRUB_CMDLINE_LINUX_DEFAULT="plymouth:debug"

Or just remove the splash screen

GRUB_CMDLINE_LINUX_DEFAULT=""

After each modification run this on the console

$ sudo update-grub


LenovoY-50 not responding after hibernation?

Check this tutorial, maybe you have worng configurations, if not, I suggest deactivate hibernation on your computer, and revert to suspend mode.


On Ubuntu (with the default desktop settings), locking the desktop is done with Ctrl + Alt + L.

Edit: I believe Super + L works too in recent versions of Ubuntu, which is the same as in Windows.

No additional software is required.

This will not halt or pause any software. Downloads should continue as normal.


How to make a file or folder undeletable?

There is not such thing that "root" can't delete. Is like telling God that he cannot do or undo something. root can put your machine topsidedown and make 1+1=3 if it likes and you can't do anything to prevent it. So, you can't prevent root from deleting whatever file he likes, just can't. Nor NTFS, nor ext2/3/4, nor HSF+, nor FAT16/32/64 not any other filesystem ruled by the OS.
The long and boring answer
Unless nobody else has root access to your system, this is impossible. But then there are ways that make users going a step beyond to delete the file, one of these is chattr:

chattr changes the file attributes on a Linux file system.
[...]
A file with the i attribute cannot be modified: it cannot be  deleted or  renamed,  no  link  can  be created to this file and no data can be written to the file.  Only the superuser or a  process  possessing  the CAP_LINUX_IMMUTABLE capability can set or clear this attribute.

So, if nobody has root access or capacity to boot using another operative system then the file is undeletable, otherwise any user can (and will) delete your file. The same if the filesystem is formatted and/or firmware techniques to remove data of the disks.
How to do it?
Create the file:
$ touch deletemeifyoucan\:D

Protect it:
$ sudo chattr +i deletemeifyoucan\:D
[sudo] password for braiam:

Try to remove it
$ rm deletemeifyoucan\:D
rm: remove write-protected regular empty file ‘deletemeifyoucan:D’? y
rm: cannot remove ‘deletemeifyoucan:D’: Operation not permitted

Now try with root:
$ sudo rm deletemeifyoucan\:D
rm: cannot remove ‘deletemeifyoucan:D’: Operation not permitted

Unprotect it:
$ sudo chattr -i deletemeifyoucan\:D

Is gone:
$ rm deletemeifyoucan\:D
$ #POOF!


Is there a generic way to boot the installed OS using a usb device?

I'm glad to read that your problem is actually solved with the help of boot-repair.

Regarding your original question, I think Super Grub is what you are looking for. I have never used this tool so far, what I always do is to keep the pendrive with the Ubuntu installer in reach, so in the worst case I have a full featured operating system which I can boot, even if all my harddisks refuse to work. We can use it to run file system checks, edit broken system files and so on.


For the first question 1: nvidia-graphic driver is a GPU driver. It provider driver support for Nvidia titan xp graphic card.

For second question 2 :

A) I thing you are asking about dual monitor. Please follow the below link of display dual monitors: -

Connect another monitor to your computer

B)  It is asked in general. Further, like in windows, general question won't work. Because everything is open and you can do anyting with your system. Kindly be more specific.

If you are facing problem in tracking problem, then journalctl and dmesg are your friends. If you want UI support install Gnome logs.

In general :

1) Keep the system and driver configuration correct and proper according to your hardware.

2) If everything is working fine, then you don't need to install nvidia-graphic driver. Because, Ubuntu have default Nouveau for any Nvidia GPU card. People try to replace Nouveau with nvidia-graphic driver (Property or third party open source code or non offical code) when they face problem.

3) You can experiment with preload to increase system speed.

sudo apt-get install preload

Configuration file :  /etc/preload.conf

Please make changes with extra care.


Ubuntu wont load, stuck for over an hour with "Started waiting until snapd is fully seeded"

This was apparently caused by a lack of space on my PC, as I went into the system and deleted some files and it was able to load.  Turns out that there was around 65 GB of syslog.1 in the /var/log folder.  I don't know how it got there, but if you find yourself having this kind of error, check how much space you have on your PC.


Avoid missing kernel linux-modules-extra-XX-generic when updating kernel

You need to have linux-generic meta package installed.
It will pull all other necessary kernel packages including modules, modules-extra, headers, etc.
This package may be missing if you manually removed some kernel packages.
To fix issues with missing kernel packages run in a terminal:
sudo apt install linux-generic


Is it Good Practice to Change Apache's /var/www/ (Default Root Directory)?

Yes, I believe you should. We started doing that to understand Apache and it settings but it is now a sort of standard agreement we have when installing a new site for a client.

Backup wise it is easier. We host about 100 sites and have our software in /u1/ and then directories to programs and data and also a www directory where the webserver software is. So a backup/restore of /u1/"client_name"/ is easy and there is nothing outside the directory for that instance. Besides that: the MySQL databases are stored in those individual directories too.
It is always better to change the default since security wise you make it a bit more difficult to guess. We also always change the www-data user and group to a more specific one.


Zoom is not available in Ubuntu repositories.  It also doesn't appear that the software can be installed via PPA, at least not officially, from the page you linked.
apt and your GUI software center only deal with packages that can be updated via sources in /etc/apt/sources.list or PPA sources or snaps.
There is a zoom-client snap in the snap store, but it appears that you did not originally install the software using this method, so you will need to follow the manual installation and update/upgrade instructions from the developer of the software via the link that you referenced.


How to send a notification using at command?

echo "notify-send 'hello'" | at 14:10

at is expecting a command from STDIN.

If you want to silence the /bin/sh warning, run it this way:

echo "notify-send 'hello'" | at 14:10 2>/dev/null


Have to set multiple displays on every start

some times may be that graphic driver will behave like that, and nothing to worry about this problem. You have to reset or change to default settings of Graphic driver or Screen Settings provided by Ubuntu Operating system.


Upgrade to Lubuntu 17.04 from Ubuntu 16.04

backups are worthwhile - so always backup first.

yep; but still better to backup should anything go wrong.

another alternative is to add LXDE to your existing ubuntu system; eg. my "ubuntu 16.04" system also has lubuntu-desktoppackage installed; so I can at login have unity (standard ubuntu), xfce (xubuntu), lxde (lubuntu), mate (ubuntu-mate).

note: loading many desktops is not intended. loading many desktops like I do can cause them to misbehave, or your system have more quirks than a pure system, but it's an option.  they will all be 16.04; so if its the later 17.04 you want; you'll need to re-install (remembering backups first are a good safety measure!!)


In Terminal how do you run a sudo command with an & at the end without prior authentication?

Essentially what you're doing , is putting command into background with &. There is a manual way to do so. Here's an example with sudo apt-get update

Run sudo apt-get update as usual, enter password.
As soon as command starts, press Ctrl+Z to pause the process
Run bg command to put the stopped job into background.

Notice that the output still will be displayed to stdout. If it is not essential, use &> /dev/null redirection appended to the command to hide the output.

Alternative way, would be to run the shell with sudo privilleges, and run commands with -c flag, like so:

sudo bash -c 'apt-get update &>/dev/null  & '


How can I reduce the size of a SVG using software on Ubuntu?

I can't think of something better than inkscape.

  Inkscape is an open-source vector graphics editor similar to Adobe
  Illustrator, Corel Draw, Freehand, or Xara X. What sets Inkscape apart
  is its use of Scalable Vector Graphics (SVG), an open XML-based W3C
  standard, as the native format.

You can install it usind command:

sudo apt-get install inkscape

Take a look for this link for tips to optimize SVG using inkscape.

for comamnd line I think you should take a look for scour

scour --help
scour 0.26
Copyright Jeff Schiller, Louis Simard, 2010
Usage: scour [-i input.svg] [-o output.svg] [OPTIONS]

If the input/output files are specified with a svgz extension, then compressed
SVG is assumed. If the input file is not specified, stdin is used. If the
output file is not specified,  stdout is used.

Options:
  --version                   show program's version number and exit
  -h, --help                  show this help message and exit
  --disable-simplify-colors   won't convert all colors to #RRGGBB format
  --disable-style-to-xml      won't convert styles into XML attributes
  --disable-group-collapsing  won't collapse <g> elements
  --create-groups             create <g> elements for runs of elements with
                              identical attributes
  --enable-id-stripping       remove all un-referenced ID attributes
  --enable-comment-stripping  remove all <!-- --> comments
  --shorten-ids               shorten all ID attributes to the least number of
                              letters possible
  --disable-embed-rasters     won't embed rasters as base64-encoded data
  --keep-editor-data          won't remove Inkscape, Sodipodi or Adobe
                              Illustrator elements and attributes
  --remove-metadata           remove <metadata> elements (which may contain
                              license metadata etc.)
  --renderer-workaround       work around various renderer bugs (currently
                              only librsvg) (default)
  --no-renderer-workaround    do not work around various renderer bugs
                              (currently only librsvg)
  --strip-xml-prolog          won't output the <?xml ?> prolog
  --enable-viewboxing         changes document width/height to 100%/100% and
                              creates viewbox coordinates
  -p DIGITS, --set-precision=DIGITS
                              set number of significant digits (default: 5)
  -q, --quiet                 suppress non-error output
  --indent=INDENT_TYPE        indentation of the output: none, space, tab
                              (default: space)
  --protect-ids-noninkscape   Don't change IDs not ending with a digit
  --protect-ids-list=PROTECT_IDS_LIST
                              Don't change IDs given in a comma-separated list
  --protect-ids-prefix=PROTECT_IDS_PREFIX
                              Don't change IDs starting with the given prefix

Also take a look for this SE question , it may help.


Radeon HD6450 doesn't work under ubuntu 12.04 server

I had the same problem as you, The open source drivers were simply not working and I always got this 'Unable to open display error on glxinfo.
After two years of using the card I was finally able to solve this by adding
    radeon.dpm=1    in my linux boot parameters.And now it's working fine.


Pulse Audio not sending sound to speakers

Try if this helps:

In /etc/pulse/daemon.conf remove the semicolon in the line ; enable-lfe-remixing yes.

If that was not enough try as well:

; default-sample-channels = 2 change to default-sample-channels = 6 (no semicolon and value changed from 2 to six).

Both are a long shot, but trying doesn't hurt.


What additional thumbnailers are available and how do I install them?

General installation instructions

Thumbnailers in repositories and PPAs

A number of thumbnailers are pre-packaged and can be easily installed from the software center or the command line. These thumbnailers don't require any additional configuration and should work right after restarting nautilus. You can do so with:

nautilus -q

Please consider reading these Q&As before installing anything from a PPA:

What are PPAs and how do I use them?

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

Custom thumbnailing scripts on Ubuntu 11.04 and above

Custom thumbnailers that aren't available in repositories have to be installed manually. These are the steps you will have to take to install them:

Check out whether the script has any dependecies listed. If so, install them first.

Download the script and make it executable with chmod a+x filethumbnailer or via Nautilus

Designate a folder in your file system for all future thumbnailers and move the script to it, e.g.

mkdir $HOME/.scripts/thumbnailers && mv filethumbnailer $HOME/.scripts/thumbnailers

Next you will have to register your script with Nautilus. To do so create a thumbnailer entry in /usr/share/thumbnailers. The entry should follow the naming scheme foo.thumbnailer where foo is an expression of your choice (here file):

gksudo gedit /usr/share/thumbnailers/file.thumbnailer

The thumbnailer specifications follow this scheme:

[Thumbnailer Entry]
Exec=$HOME/.scripts/thumbnailers/file.thumbnailer %i %o %s
MimeType=application/file;

The Exec entry points to your thumbnailer script while the MimeType field designates the related MimeTypes. Possible variables are:

%i Input file path
%u Input file URI
%o Output file path
%s Thumbnail size (vertical)

The specifications and variables will vary with each script. Simply copy and paste the content of the respective text box into the file and save it.

The thumbnailers should be up and running after restarting nautilus (nautilus -q).

Custom thumbnailing scripts on Ubuntu 11.04 and below

Earlier versions of Ubuntu rely on GConf for thumbnailer associations. See here for more information.

Sources:

https://live.gnome.org/ThumbnailerSpec

https://bugzilla.redhat.com/show_bug.cgi?id=636819#c29

https://bugs.launchpad.net/ubuntu/+source/gnome-exe-thumbnailer/+bug/752578

http://ubuntuforums.org/showthread.php?t=1881360

Thumbnailers by file type

CHM files

Overview

  Description: With this script you'll get thumbnails of your chm files
  in the nautilus file manager. The script uses the largest image from
  the homepage of the chm file to generate the thumbnail, usually this
  will be an image of the front cover.

  Creator: monraaf
  (http://ubuntuforums.org/showthread.php?t=1159569)

  Dependencies: sudo apt-get install python-beautifulsoup python-chm imagemagick

Thumbnailer entry

[Thumbnailer Entry]
Exec=$HOME/.scripts/thumbnailers/chmthumbnailer %i %o %s
MimeType=application/vnd.ms-htmlhelp;application/x-chm;

Script

#!/usr/bin/env python

import sys, os
from chm import chm
from BeautifulSoup import BeautifulSoup

class ChmThumbNailer(object):
    def __init__(self):
        self.chm = chm.CHMFile()

    def thumbnail(self, ifile, ofile, sz):

        if self.chm.LoadCHM(ifile) == 0:
            return 1

        bestname    = None
        bestsize    = 0
        base        = self.chm.home.rpartition('/')[0] + '/'
        size, data  = self.getfile(self.chm.home)

        if size > 0:
            if self.chm.home.endswith(('jpg','gif','bmp')):
                self.write(ofile, sz, data)
            else:
                soup = BeautifulSoup(data)
                imgs = soup.findAll('img')
                for img in imgs:
                    name = base + img.get("src","")
                    size, data = self.getfile(name)
                    if size > bestsize:
                        bestsize = size
                        bestname = name
                if bestname != None:
                    size, data = self.getfile(bestname)
                    if size > 0:
                        self.write(ofile, sz, data)
        self.chm.CloseCHM()

    def write(self, ofile, sz, data):
        fd = os.popen('convert - -resize %sx%s "%s"' % (sz, sz, ofile), "w")
        fd.write(data)
        fd.close()

    def getfile(self,name):
        (ret, ui) = self.chm.ResolveObject(name)
        if ret == 1:
            return (0, '')
        return self.chm.RetrieveObject(ui)

if len(sys.argv) > 3:
    chm = ChmThumbNailer()
    chm.thumbnail(sys.argv[1], sys.argv[2], sys.argv[3])

EPUB files

Overview

  Description: epub-thumbnailer is a simple script that tries to find a cover in an epub file and creates a thumbnail for it.

  Creator: Mariano Simone
  (https://github.com/marianosimone/epub-thumbnailer)

  Dependencies: none listed, worked fine right away

Thumbnailer Entry

[Thumbnailer Entry]
Exec=$HOME/.scripts/thumbnailers/epubthumbnailer %i %o %s
MimeType=application/epub+zip;

Script

#!/usr/bin/python

#  This program is free software: you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation, either version 3 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program.  If not, see <http://www.gnu.org/licenses/>.

# Author: Mariano Simone (marianosimone@gmail.com)
# Version: 1.0
# Name: epub-thumbnailer
# Description: An implementation of a cover thumbnailer for epub files
# Installation: see README

import zipfile
import sys
import Image
import os
import re
from xml.dom import minidom
from StringIO import StringIO

def get_cover_from_manifest(epub):
    img_ext_regex = re.compile("^.*\.(jpg|jpeg|png)$")

    # open the main container
    container = epub.open("META-INF/container.xml")
    container_root = minidom.parseString(container.read())

    # locate the rootfile
    elem = container_root.getElementsByTagName("rootfile")[0]
    rootfile_path = elem.getAttribute("full-path")

    # open the rootfile
    rootfile = epub.open(rootfile_path)
    rootfile_root = minidom.parseString(rootfile.read())

    # find the manifest element
    manifest = rootfile_root.getElementsByTagName("manifest")[0]
    for item in manifest.getElementsByTagName("item"):
        item_id = item.getAttribute("id")
        item_href = item.getAttribute("href")
        if "cover" in item_id and img_ext_regex.match(item_href.lower()):
            cover_path = os.path.join(os.path.dirname(rootfile_path),
                                      item_href)
            return cover_path

    return None

def get_cover_by_filename(epub):
    cover_regex = re.compile(".*cover.*\.(jpg|jpeg|png)")

    for fileinfo in epub.filelist:
        if cover_regex.match(os.path.basename(fileinfo.filename).lower()):
            return fileinfo.filename

    return None

def extract_cover(cover_path):
    if cover_path:
        cover = epub.open(cover_path)
        im = Image.open(StringIO(cover.read()))
        im.thumbnail((size, size), Image.ANTIALIAS)
        im.save(output_file, "PNG")
        return True
    return False

# Which file are we working with?
input_file = sys.argv[1]
# Where do does the file have to be saved?
output_file = sys.argv[2]
# Required size?
size = int(sys.argv[3])

# An epub is just a zip
epub = zipfile.ZipFile(input_file, "r")

extraction_strategies = [get_cover_from_manifest, get_cover_by_filename]

for strategy in extraction_strategies:
    try:
        cover_path = strategy(epub)
        if extract_cover(cover_path):
            exit(0)
    except Exception as ex:
        print "Error getting cover using %s: " % strategy.__name__, ex

exit(1)

EXE files

Overview

  Description: gnome-exe-thumbnailer is a thumbnailer for Gnome that will give Windows .exe files an icon based on their embedded icon and
  a generic "Wine program" icon. If the program has normal execute
  permissions, then the standard embedded icon will be shown.  This
  thumbnailer will also give a thumbnail icon for .jar, .py, and similar
  executable programs.

  Availability: official repositories

Installation

sudo apt-get install gnome-exe-thumbnailer

ODP/ODS/ODT and other LibreOffice and Open Office files

Overview

  Description: ooo-thumbnailer is a LibreOffice, OpenOffice.org and Microsoft Office document thumbnailer that can be used by Nautilus to
  create thumbnails for your documents, spreadsheets, presentations and
  drawings.

  Availability: developer's PPA (most recent version that's compatible with LibreOffice in Ubuntu 12.04 and up)

Installation

sudo add-apt-repository ppa:flimm/ooo-thumbnailer && apt-get update && apt-get install ooo-thumbnailer


nis server doesn't export new users to client machines

Solved; when migrating users and groups, UID and GID were kept, but new users in the new server had an UID lower than the lowest exported by yp (check the Makefile script in /var/yp and make suitable adjustments).


Boot from USB to recover existing files?

Case 1: I think what went wrong with your bootable USB effort is you forgot to mount your old home folder if you created a separate partition for it.

Case 2: If you didn't create a separate partition for home you need to mount the old root folder.

Once you have done that and you can see the folder but just not access the contents inside it, then you need to

For Case 1:

sudo chown -R "$USER" /<MountPoint>/<OLDUSER>

For Case 2:

sudo chown -R "$USER" /<MountPoint>/home/<OLDUSER>

Replace  and  appropriately.
Then you should be able to contents of  folder


Can we implement some new functions for terminal ie. typing the word Tab will result in key stroke Tab

You can accomplish what you wish using xdotool . For example the following Tab function will do what you asked:

Tab () { xdotool key Tab ; }

or, equivalent:

Tab () { xdotool key 23 ; }

Other examples:

LAlt () { xdotool key Alt_L ; }

or:

AltTab () { xdotool key Alt_L+Tab ; }

or:

AltTab () { xdotool key 64+23 ; }

For more info about xdotool, see man xdotool.


How do I install Ubuntu Core on an SD card for use on a Pandaboard?

Pandaboard's need an OMAP image, so those install instructions aren't what you're looking for. Try these (saving you a few clicks, these), as recommended by the Pandaboard Getting Started guide. I think they are quite intelligible, but feel free to comment if you have any problems. Basically you just dd the downloaded image to the SD card. I've done this at least twice for the robotics team I lead.


Can't figure out how to make files shared between xubuntu and usb

Accessing Data Stored on Persistent USB While Booted from the USB
When booted on your USB, look in the cdrom folder for any files stored on the root of the USB. If you are booting an ISO file look in the isodevice folder. YUMI uses both cdrom and isodevice folders, look in YUMI's isodevice folder for data first.
These folders are generally read only. Sometimes they can be read/write if opened using sudo -H nautilus. Or Open as Administrator if it is installed.
Initrd
If booted from Windows or a Ubuntu internal drive, open your OS ISO file and look in it's casper folder to find the suffix for initrd of the Ubuntu flavor you are using.
Or if booted from the Live or Persistent USB look in the cdrom or isodevice casper folder. If using a YUMI USB look for casper in cdrom first.
Most Ubuntu 20.04 flavors use plain old initrd. Lubuntu 16.04, (and Mint), use initrd.lz. i386 versions of Ubuntu flavors mainly used initrd.lz. (Debian uses initrd.img-4.19.0-10-amd64 at present).


So much is wrong that I had to use shellcheck:

walt@bat:~(1)$ cat >foo.sh
#!/bin/bash
SCRDIR = ${1? Error: No directory given}
DATE =5
echo "Backing up $SCRDIR for $DATE days"

TODAY = "$(date +%Y_%m_%d)"
FILENAME = $SCRDIR"_"$TODAY".tar"
tar -cvfz $FILENAME $SCRDIR
find $PWD -mtime +$DATE -type f -delete
echo "Done"
walt@bat:~(0)$ shellcheck foo.sh

In foo.sh line 2:
SCRDIR = ${1? Error: No directory given}
       ^-- SC1068: Don't put spaces around the = in assignments.

In foo.sh line 3:
DATE =5
     ^-- SC1068: Don't put spaces around the = in assignments.

In foo.sh line 6:
TODAY = "$(date +%Y_%m_%d)"
      ^-- SC1068: Don't put spaces around the = in assignments.

In foo.sh line 7:
FILENAME = $SCRDIR"_"$TODAY".tar"
         ^-- SC1068: Don't put spaces around the = in assignments.
                     ^-- SC2027: The surrounding quotes actually unquote this. Remove or escape them.

In foo.sh line 8:
tar -cvfz $FILENAME $SCRDIR
          ^-- SC2086: Double quote to prevent globbing and word splitting.
                    ^-- SC2086: Double quote to prevent globbing and word splitting.

In foo.sh line 9:
find $PWD -mtime +$DATE -type f -delete
     ^-- SC2086: Double quote to prevent globbing and word splitting.


I managed to get HDMI audio output working on my laptop with "NVIDIA Corporation GF116M [GeForce GT 555M/635M]" GPU, using the nvidia driver and nvidia-prime. The process is rather convoluted and you have to perform it after every reboot. I've written a script that automates the process as much as possible. Its comments explain what it does. (Edit: If you don't like running the script, you can also follow the procedure described here: https://askubuntu.com/a/660910/73753)

#!/bin/bash

# Check if we are executing as root
if [ $UID != 0 ]; then
    echo "This script must be run as root."; exit
fi

# The nvidia driver cannot be loaded while we are configuring the GPU.
# Check whether the nvidia kernel is loaded:
if grep nvidia /proc/modules; then
    # It is. Check if we have HDMI audio
    if lspci | grep 01:00.1; then
        # Yes, so we are already done.
        echo "The following list should contain HDMI audio devices"
        aplay -l
        alsa reload
        echo "--> You are done!"; exit
    else
        # No, disable output through nvidia:
        prime-select intel
        echo "Please reboot. Afterwards rerun this script."; exit
    fi
fi

# Make sure that the GPU is powered
if ! lspci -H1 | grep 01:00.0; then
    if ! grep OFF /proc/acpi/bbswitch; then
        echo "ERROR: GPU is listed in lspci -H1, but bbswitch thinks it is off"; exit 1
    fi
    # Turn on the discrete GPU (to get it listed in `lspci -H1`)
    echo ON > /proc/acpi/bbswitch
    if ! grep ON /proc/acpi/bbswitch; then
        echo "ERROR: Failed to turn on the GPU"; exit 1
    fi
fi

# Check if the GPU's audio chip is powered
if ! lspci -H1 | grep 01:00.1; then
    echo "Suspend the pc and resume it again. This will turn on the audio chip on the discrete GPU. Afterwards rerun this script."; exit
fi

# The output of 'lscpi -H1' should now contain 2 lines similar to:
# 01:00.0 VGA compatible controller: NVIDIA Corporation GF116M [GeForce GT 555M/635M] (rev a1)
# 01:00.1 Audio device: NVIDIA Corporation GF116 High Definition Audio Controller (rev a1)

# Now we need to rescan for the GPU such that the audio chip is found as well
if lspci | grep 01:00.0; then
    # Now we 'unmount' the GPU
    # the nvidia driver is not loaded, otherwise this step would eventualy cause your computer to freeze/hang
    echo 1 > /sys/bus/pci/devices/0000\:01\:00.0/remove
    # Wait a bit
    sleep 1
    # Check if this succeeded
    if ! lspci | grep 01:00.0; then
        echo "ERROR: Failed to remove the GPU (or so it seems, you can try again)"; exit 1
    fi
fi

if ! lspci | grep 01:00.0; then
    # Rescan
    echo 1 > /sys/bus/pci/rescan
    if ! lspci | grep 01:00.1; then
        echo "ERROR: Rescan did not find the audio chip"; exit 1
    fi

    # The output of 'lspci' should now contain 2 lines similar to:
    # 01:00.0 VGA compatible controller: NVIDIA Corporation GF116M [GeForce GT 555M/635M] (rev a1)
    # 01:00.1 Audio device: NVIDIA Corporation GF116 High Definition Audio Controller (rev a1)

    # Now we are ready to restart X11 using the nvidia driver
    prime-select nvidia
    echo "Please log out and in again. Afterwards rerun this script."; exit
fi

echo "ERROR: Something went wrong"; exit 1


External Hard Disk Damaged | Not Detecting

Try accessing Gparted from the live cd and seeing if the External Drive is visible from there. If it's visible format it again and try to install Ubuntu on it again. There could be an error on the hard drive if the computer shut down halway through formatting/installing.


source: http://ubuntuforums.org/showpost.php?p=11526603&postcount=13

delete printer from computer via settings menu
re-add printer by opening terminal and typing hp-setup

Apparently, this forces the computer to ignore the low-ink message.


Reboot your system. From the grub menu, choose the Recovery mode option. From there do a manual fsck.
 fsck /dev/[root directory].
For example, if your root directory is sda1 , your command should look like :
   fsck /dev/sda1
If a prompt appears, just press 'y'.
Once it completes, resume the normal boot.


How to install canon imageclass mf4412 printer on ubuntu 16.04?

I tried @ThatGuy's solution, it did not work for me.

So, I searched a little more, found this link;

https://www.usa.canon.com/internet/portal/us/home/support/details/printers/support-laser-printers-imageclass/imageclass-mf4450?tab=drivers_downloads

Downloaded the driver (UFR II/UFRII LT Printer Driver for Linux V3.40) from here, which is for MF4450, as it says. But it worked for me.

After extracting the driver files, you will find an install.sh in its root folder. Just sudo ./install.sh, and it sets up everything for you.

And then you should find your printer in Settings > Printers up and ready for the job.


Is anybody using juju for mission critical apps?

In so many words, yes. There's really nothing black box about what Juju is doing. Everything Juju does is Open Source and the model juju is using is fairly well documented. There are fairly large companies using Juju to deploy and manage OpenStack on bare metal with MaaS and deploying workloads on their OpenStack (again, with juju).


Is it possible to install Ubuntu on a Mac using Bootcamp?

You have options! There are help pages for installing on Macs that show the hardware support and installation alongside OSX.

Here is the page where you select which hardware you have:

https://wiki.ubuntu.com/MactelSupportTeam/CommunityHelpPages

Just click through, select the version of Ubuntu and you'll get some installation instructions. Be sure to check the hardware compatibility too because you might not want to install if certain things aren't going to work.


I'm trying to install my HD 6770 proprietary drivers on Ubuntu 12.04, 12.10, Linux Mint 9, 14 and Kubuntu 12.04. I have the same problem as yours.
After installing drivers from different sorces, and rebooting, It shows Out of Range (74.9kHz / 60Hz) , i submitted a question, so far nothing :/

Here is mine:
https://askubuntu.com/questions/244929/monitor-out-of-range-74-9khz-60hz-after-installing-ati-proprietary-drivers


Monitor nginx response time with bash script

Found a solution using word count command.

Stored value of ${wc -l filename} into a file at the end of the script
The above value is taken into a variable and used as start line number
And current ${wc -l filename} value as end line number

By using this logic, I avoided duplicating & skipping of lines.

And added this script into crontab to run every minute.


Share folder from ubuntu one files android

You cannot share a folder directly from Ubuntu One Files app (make it public nor make it a shared foler with other users). The REST API doesn't support these operations.


Getting the capslock to input foreign caracters and currency

I'm using 18.04 (Bionic Beaver) and have no problem using 'foreign' characters.

Install Gnome Tweaks from the Ubuntu Software Center. Navigate to Keyboard & Mouse and set Compose Key as per your choice.

See this useful link on achieving this.

Having set up my right windows key to perform as the compose key, pressing RightWin latches then pressing keys in the sequence shown below (using shift where necessary) produces the symbol shown.

Translate Page and Reader options listed are specific to my requirements but you can see that the Alt Gr can also be used for some characters.


How can I install themes on Ubuntu 12.04LTS? I know where to get but I don't know how to install them after I downloaded

Ubuntu by default comes with Ambiance theme and few other themes like Radiance etc. But these themes are not the best out there and you may want to experiment a bit with the appearance of your computer by installing a new theme but often wonder how do I install a new theme in Ubuntu 12.04. This simple tutorial will teach you to install a theme in Ubuntu 12.04 with Unity desktop environment. Follow these simple steps:

Step 1:

Download the theme. If it is zipped, extract it and copy the theme folder to the following location:

~/.themes

If you are using the graphical way to copy it, go to your home folder and on the top panel select View and then select Show hidden files (Ctrl+H). Now you can see .themes directory in your home directory. Copying the theme is equivalent to installing a theme.

Step 2:

Once you have copied the theme in correct place, the next step is to use the newly installed theme. To activate the theme we will use a wonderful tool “My Unity” which is a Unity tweaking tool and can be used for various other configuration changes such as launcher, dash, panel etc. To install My Unity use the following command in terminal (Ctrl+Alt+T):

sudo apt-get install myunity

Once you have installed the My Unity app, you can open it and move to Themes tab. Here you will see all the themes available in ~/.themes directory. Just choose your favourite theme here.


"No root filesystem is defined" while installing Ubuntu

From windows delete the empty partition (unallocated is probably the word they'd use for that so you are good to go).

Start the Ubuntu installation and when you get to the partitioner choose 'install on empty space' or use the manual partitioner to manually choose it (that way you can also set sizes for /, swap and, if need be, /home)

It will look like this:

Regarding the edit:

You MUST create a mountpoint for at least root.
See the / in this image:

From your situation: hit the line that says 'free space'. Create the partitions you need (root /, swap, home, data partition(s) etc) and then hit forward.


Step by step guide to setup a DHCP server / client configuration in VirtualBox

First of all, we should make sure that our VMs have connectivity to the Internet, we are going to do that by enabling a NAT adapter on each machine (If it's not already enabled), also our machines should be sitting at the same network, so we will create a host-only network and add both machine to it by adding a new host-only adapter to each of them.

Create a host only network

In VirtualBox from file menu select preferences and in VirtualBox Preferences window, select Network, then host only networks. after all by clicking on + sign add a new host only network.

Add our machines to the same network

Now for both Ubuntu virtual machines, right click on each of them, select settings, go to network section. make sure Adapter 1 is active and is attached to Nat, click on Adapter 2, check Enable Network Adapter and for Attached to select Host-Only adapter. click ok to save these settings.

Running DHCP Server

We are going to use dnsmasq as our DHCP Server, it's fairly small and is good enough for our purpose, so to install it run:

sudo apt-get install dnsmasq

Then we should enable dnsmasq DHCP functionality, before doing that lets take a look at or network interfaces by running:

ifconfig -a

we should get something similar to this:

enp0s3 is or first adapter, do you remember the Nat interface? it's already has an IP (10.0.2.15), we don't have anything to do with this interface, we just created it to get Internet access if it was necessary for installing stuff, etc.

enp0s8 is connected to our vboxnet0 network which we just create it in first section, we should make this interface listing to DHCP request and response to them.

Now lets back to enabling DHCP server functionality for dnsmas, simply run this command:

sudo nano /etc/dnsmasq.conf

It will open dnsmasq configuration file in nano editor. there are some lines we should uncomment and add our configuration to these lines are:

interface=enp0s8
bind-interfaces
dhcp-range=192.168.100.10,192.168.100.20,24h

You can just paste them into this config file too, for interface, we should use enp0s8, we just talked about it right?

And dhcp-range is the range we want to assign to our requests from: 192.168.100.10 to 192.168.100.20 with the lease time of 24 hours.

Now we should give our enp0s8 interface an IP address, e.g:

sudo ifconfig enp0s8 192.168.100.1
sudo ifconfig enp0s8 up

You can edit interfaces file and assign a static IP to this interface too.

After all we should start dnsmasq daemon:

sudo systemctl start dnsmasq.service

Client

Turn on your other Ubuntu machine, it should have network manager installed by default, and a connection to this network should already be there. the default method is to use DHCP, so you have to do nothing. just enable the new network, the name should be Wired Connection 2, and done, your interface will get an IP.

If you have a look at network information, you can see that this interface has an IP in the range that we setup in our DHCP Server:

You can also run sudo dhclient enp0s3, to get a IP for enp0s3 interface.


Boot into Windows after uninstalling Ubuntu (Dual-boot)

The easiest method is to boot up with your Windows 7 disc, choose System Recovery Options and then click Startup Repair. That should generally remove grub from your master boot record and allow you to boot into Windows normally.


Very BIZARRE trend for accessing Windows 10 partition in Ubuntu 14.04

Well I found the answer to problem. It had to do with the power configuration in Windows 10. It's actually an issue that goes back to Windows 8 but I didn't know about it because I didn't have 8. I went from 7 to 10. Anyway, had to open up a command prompt, run as administrator and enter the following:

powercfg /h off

This disables all hibernate options, including that "fast startup" feature that is present in 8 and 10. The fast startup was being read by Ubuntu as a form of "hibernate," hence the mounting error.