Mount NTFS partition with write access for everyone

As I understand this is because they don't have write access which is what I want to change.

No, this error message does not mean that they don't have write access. If they didn't have write access, you would not be able to right click and "Move to Trash" or "Delete" a file, or use the Del keyboard button. But since you're getting this error, it means that the users do have access.
After two hours of search, and reproducing this error on my computer, here's what I found out.
Explanation
Permissions (owner, group owner, file and directory permissions) are set at the time of mounting. Only the owner can move files to trash. Why? Because when you move files to trash in an NTFS partition, a folder called .Trash-<uid> is created in the root directory of the partition, where <uid> is the uid of the user, and the folder's owner will be the user that's trying to delete. For example, if the username is daniels and the uid is 1000, a folder called .Trash-1000 is created, and daniels would be the owner.
So, if daniels is the owner of the partition, he'll be able to do this normally. However, if another user (let's say called alaa, and uid=1001) tries to delete something, the system tries to create a .Trash-1001 folder, with the owner alaa. But, on NTFS, the permissions are set at the time of mounting (example: it was set to daniels), and the "owner" of any file cannot be changed, and so the system fails to create the .Trash-1001 folder, giving you the prompt Cannot move file to trash, do you want to delete immediately?.
To test this, try manually creating a folder in the root directory of the partition named .Trash-1001 (the owner will be set to the owner of the partition). You'll find that hitting Del on the keyboard on any file/folder will not do anything, and the option when you right click an item will change from Move to Trash to Delete. I can't explain why it changes to Delete, but this is just to identify that the problem is indeed in the .Trash-1001 folder.
In my opinion, I classify this as a bug.
Solution (soft of...)
Remove all of your uid=, gid=, dmask=, fmask=, and umask= options from your mount command, and add permissions, so I guess your line should be like this:
nosuid,nodev,nofail,x-gvfs-show,nobootwait,permissions

I've tried this on my computer, and it works; both users can move to trash when using the NTFS hard disk.
Here's a demonstration:

alaa@aa-lu:~$ sudo mount -o rw,permissions /dev/sdc2 /media/he
Using default user mapping
alaa@aa-lu:~$ ls /media/he -la
total 104
drwxrwxrwx 1 root root  8192 Sep 24 21:20 .
drwxr-xr-x 6 root root  4096 Sep 24 21:18 ..
drwxrwxrwx 1 root root  4096 Dec 15  2012 Files on my hard disk
drwxrwxrwx 1 root root  4096 Jul  9 12:18 $RECYCLE.BIN
drwx------ 1 root root     0 Jan 22  2012 System Volume Information

Then I went and deleted something using my username alaa, then logged in as another user aaa and deleted something too. Both of them could delete, and this is how the NTFS partition looks like:

alaa@aa-lu:~$ ls /media/he -la
total 104
drwxrwxrwx 1 root root  8192 Sep 24 21:20 .
drwxr-xr-x 6 root root  4096 Sep 24 21:18 ..
drwxrwxrwx 1 root root  4096 Dec 15  2012 Files on my hard disk
drwxrwxrwx 1 root root  4096 Jul  9 12:18 $RECYCLE.BIN
drwx------ 1 root root     0 Jan 22  2012 System Volume Information
drwx------ 1 alaa alaa     0 Sep 24 21:20 .Trash-1000
drwx------ 1 aaa  aaa      0 Sep 24 21:19 .Trash-1002

I don't know how it manages to do that, but it just does.
I found this page: Ownership and Permissions | Tuxera that explains this, as well as a forum post (http://www.tuxera.com/forum/viewtopic.php?f=2&t=27540) that has some useful information. However, unfortunately I haven't read them yet, so I can't explain exactly what this permissions option does.
I said "Solution (sort of...)" in the title of this section because now you're not controlling who is the owner of the partition, not group owner, nor the read-write permissions. But, when mounting with the permissions option, you can see a "Using default user mapping", so as far as I understood, there's a "user mapping" thing that can be created to be used with permissions, and that mapping will have the owner/permissions that we want to set. I also have not tried mounting using permissions along with uid= and all those other options (the Tuxera link I posted should explain that though), but that might also work, by controlling owner/permissions and at the same time give access to Trash.
When I read those links, I'll update my answer.


No Sound through Headphones after recent PulseAudio Updates in Ubuntu 12.04LTS

My headphones use to work as well.  After the update did the following:

Headphone jack not working?

Now my headphones work.


How to get rid of disk icons in Unity launcher?

From Dash icon, it seems it's Ubuntu 12.04.
Kindly follow these instructions:

Install compizconfig-settings-manager if you haven't already.

sudo apt-get install compizconfig-settings-manager
Run CompizConfig Settings Manager and navigate to the Unity plugin.
In the Experimental Tab, change the Show Devices combobox to Never.

Source: https://askubuntu.com/a/62015/163331


Unable to boot into windows after removing Ubuntu 20.04

boot from your Ubuntu live CD/ USB and follow instructions given in link of Boot-Repair page. Follow the second option:

install Boot-Repair in Ubuntu

connect to the Internet
open a new Terminal, then type the following commands (press Enter after each line):

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

And follow Recommended repair for more detail.

You can also refer to website of Boot-Repair


Ubuntu 12.04 desktop, 64 bit, 386 architecture

AMD64 image is not for AMD CPUs, but exactly what you need.
64-bit image that will work on Core i7.


Blinking screen while using wireless connection

I had the same type o problem in my MacBook 13' early 2015.

I was able to stop the blinking by changing the wi-fi channel, in my case to 2.412 GHz (Channel 1).


Can Aspire One D260 run Ubuntu 14.04 LTS?

It definitely can. Even Aspire One D250 can, which is a bit simpler. But anyway, if you run installation and can see that it goes up to the screen when it offers you "Try" or "Install", that means it can work at the particular hardware. Because by the time you see this screen the Linux Kernel and most subsystems are running. As they are the same that go into your machine this proves it is going to work well.


Software package wit its own dynamic library - where to install?

If they just few lib's without any concern about naming conflict then avoid creating parent folder to group them.
Also, it is needed to be put in the correct folder for multi-architecture systems.

Example of debian/packagename.install file:

usr/lib/lib*.so /usr/lib/${DEB_HOST_MULTIARCH}
usr/lib/lib*.so.* /usr/lib/${DEB_HOST_MULTIARCH}

Reference: Debian Maintainer Guide - MultiArch


How do I change background Color of the desktop icon Font?

I am assuming the DE is Xfce because Xubuntu is a tag.
One way to do so is to create an empty .gtkrc-2.0 file in your home folder. It will be an ordinary text file but "hidden". In this file, you can paste the following content and modify it to your taste.

(If you already have an existing .gtkrc-2.0 file you can just append the stuff.)

style "xfdesktop-icon-view" {
XfdesktopIconView::label-alpha = 0
XfdesktopIconView::tooltip-size = 32

fg[NORMAL] = "#83aab7"     #was #83aab7
fg[SELECTED] = "GreenYellow"      # greenyellow
fg[ACTIVE] = "yellow"      # yellow
}

widget_class "*XfdesktopIconView*" style "xfdesktop-icon-view"

The second line governs transparency of the icon text background.
The third line controls the size of the tooltip that appears when one hovers the mouse cursor on an icon on the desktop.
The next three lines control the text color for different "states" of the icon. Both hex code and recognized words are acceptable to specify the color.

By the way, I have a plain black desktop and those colors suit me.

Depending on your set-up, you may need to just switch to another theme and back to see the change take effect or you may need to log out and back in again.

(This works for me in Xfce 4.10; it should work with 4.8 (which is what vanilla Xubuntu 12.04 has).)


xfconf-query, crontab, "Failed to init libxfconf: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11."

I will just set this script to run as a Session and Startup > Application Autostart item instead.

#!/bin/bash

vid="/dev/video0"

while true; do
    status=$(xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/inactivity-on-ac)
    if [ -e "$vid" -a "$status" -gt 14 ]; then
        xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/inactivity-on-ac -s 14
    elif [ ! -e "$vid" -a "$status" -eq 14 ]; then
        xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/inactivity-on-ac -s 25
    fi
    sleep 5m
done


Open locations through application finder?

On Ubuntu Saucy 13.10, Win+R does exactly what you want, it opens the Application Finder in Xbuntu (XFCE).

exo-desktop-item-edit --create-new --name='downloads' --command='thunar /root/shared/downloads' ~/.local/share/applications

A GUI will pop up to edit the item further. The item will appear in a Application submenu called 'Other'

Then simply hit Win+R -> 'item name'

to setup a lot of these, add this to your .bashrc

function launchy(){
    if [ -z "$1" ]; then
        echo "missing abs path"
        return
    fi
    exo-desktop-item-edit --create-new --name="$1" --comment="thunar $1" ~/.local/share/applications
}

For some reason, the --command arg is not working, so I just cut paste from comment to command in the GUI.

Usage:
launchy /root/logs

win+R logs


How can I prevent Desktop Users from accessing any online website?

The quickest (albeit very circumventable method) in my mind would be to break the DNS lookup. What you're doing in /etc/hosts is close but it doesn't accept wildcards. This is a shame because, like you, this sort of setup would really help me from time to time.

Anyway, remove the wildcard entry from /etc/hosts and then edit your network connection. If it's wired, you can edit /etc/networking/interfaces, if it's not, you can just go in through network manager.

Either way, set the connection type to "Automatic DHCP (Address only)" or "Manual" and then set the DNS server as 127.0.0.1. I assume you're not running a DNS proxy server on the machine (otherwise this won't work).

In network manager, this will look something like this:

Click apply. It'll hopefully reconnect and then websites not listed explicitly in /etc/hosts should not resolve.

The workaround that any user can use is they can just type in the IP of the website they want to connect to. You'd need to break more gateway settings to fully neuter the machine.

Note this will probably cut you off from updates. If you want to still get updates, add manual DNS strings to /etc/hosts for each server you connect to (look at what sudo apt-get update does.


How to prevent the handle of a GtkPaned from being moved

Assuming the the True state of the GtkToggleButton locks the handle of the GtkPaned, this behavior can be achieved by:

connecting the GtkPaned to the button-press event
returning with the GtkToggleButton state from the handler

Here is a minimalistic example in python using pygtk

import gtk

def on_paned_button_press_event(*args):
    return toggle.get_active() # This is step 2.

win = gtk.Window()
win.set_title('Lock/Unlock the GtkPaned handle example')
win.set_size_request(400, 100)

paned = gtk.HPaned()
toggle = gtk.ToggleButton('Toggle me')
toggle.set_size_request(100, -1)
paned.add1(toggle)
paned.add2(gtk.Label('Toggle the button on the left to lock/unlock the handle'))

paned.connect('button-press-event', on_paned_button_press_event) # This is step 1.

win.add(paned)

win.connect('destroy', gtk.main_quit)

win.show_all()

gtk.main()

It might still be possible to move the handle with the keyboard, so you'd want to connect to the move-handle signal as well for a complete lock.


HP Envy x360 Ryzen 5 - status of known issues

For freezes, check http://bugzilla.kernel.org/show_bug.cgi?id=196683, basically you need idle=nomwait kernel parameter to fix all hangs (from http://community.amd.com/thread/224000)


Thanks to the suggestions in comments, I came to the conclusion to reset my BIOS to default settings. It turned out that so far so good, no sudden reboots in the last 12 hours.
Probably was that.


How do I break out of /home/reveller/ in terminal?

Changing your home directory

sudo usermod  -d /var/www  your_username

The reason that sudo su is not doing anything for you is because you are already the root user.

Traversing a directory

To traverse up a file tree, you have to use the cd command. So in your case, you would have to do cd /var/


How to enter Ge'ez alphabet (Tigrinyan language)

ሰላም! One option is to use IBus with the Amharic - sera layout. Try this: System > Prererences > Keyboard Input Methods. If this is the first time you use it, it will likely ask whether the ibus system should be started (asked twice for me), you should do that.

The "IBus Preferences" dialog should show up (if it doesn't, try the menu option once more). From the dialog, choose Input Method tab, and select Amharic - sera (m17n) and click on Add to make it available.

Try if it works in your applications, by switching between normal and IBus with Ctrl + Space, for example in LibreOffice: Ctrl + Space, "selam", Space, Ctrl + Space, "hello" should input first the correct fidäl and then English (assuming that is your default keyboard layout).


Click the sign that looks like a do not enter sign. This is what's called the right-click menu (for the package manager). If you look in the list of items and messages, there should be a Package Manager link.

I've had this problem before and opening the package manager won't do a lot to fix it but it can help.

If you still get the message after opening the package manager, open a terminal and enter the following commands (these worked for me):

sudo apt-get update

This will (as any command where you use sudo) ask for your password.
Enter it and press enter.

Next, enter:

sudo apt-get install -f

This probably will fix the problem. It happens quite a lot when updates get stuck.


Why can I not set custom resolution for Ubuntu 12.04 running in a virtual machine?

I found that for this VM screen-resizing to work properly on Ubuntu 12.04 guest VMs, you need to have a fairly recent version of the VirtualBox guest additions. It is not enough to use the version of VirtualBox distributed in the Ubuntu package repostories. I think that you can use VBoxGuestAdditions 4.1.24 and it will work with Ubuntu 12.04 guests. You need to install the 'dkms' package, possibly also 'kernel-headers', and after that the guest additions 4.1.24 can be installed from the .iso


Well, After trying pretty much everything there was out there and without much success; I upgraded to 19.04, and sounds works through speakers. Although I have to say I'm terrified of using my laptop again with any Bluetooth devices. Which is a shame. Whatever it was I feel it should be fixable without having to upgrade.


Line 580 is not showing your files.Normally Boot-Repair sees them and then when far on drive like yours must be gives a warning about far from start of drive.
Some combination of BIOS and particularly USB large drives have issues with boot files being far into drive. There was a fixed bug on very large / (root) partitions, but there still issues.
Best to create a small 10 to 25GB / (root) or even smaller 500MB /boot totally within the first 100GB of an external drive.


how to extract MAC data from grep and insert into bash

It may be easier to read the MAC from the appropriate file within the sys filesystem. If you call your variable mymac, then:

$ mymac=$(cat /sys/class/net/wlan1/address)

Should work

$ echo "mymac"
XX:xx:XX:xx:XX:xx

It would be possible to increment the value of the last digits with a bit of variable manipulation. This will only work if they are both digits with a value of 98 or less. The following example uses an assumed MAC of 52:1c:53:8b:8f:77.

$ endpair=${mymac##*:}
$ ((endpair++))
$ newmac="${mymac%:*}:${endpair}"
$ echo "Hooray $mymac is now $newmac"
Hooray 52:1c:53:8b:8f:77 is now 52:1c:53:8b:8f:78


Which Linux command can I use to test my speakers for current talk radio output?

This is a really good command testing out all speakers.

speaker-test -t wav -c 6

Remarks on usage

There is no loud noise heard when running this command, except a voice saying "front left, front center, front right...". This command will continue to repeat the testing, until the user had pressed Ctrl+Z keys to stop the testing.


hibernate after image load from swap Laptop starts new

So, try another kernel from ukuu for now it is working.

uname -a
Linux beelzemon 5.0.21-050021-generic #201906040731 SMP Tue Jun 4 07:45:51 UTC 2019 i686 i686 i686 GNU/Linux


Do I need to install p7zip or p7zip-full on 15.04?

simply use below command buddy:

sudo apt-get install dtrx
dtrx archive.tar.XX


In a Nautilus window, Goto Edit>>Preferences and then goto Preview tab and then in Preview sound files select Never.


screen sharing - how to access vnc:// address

Remmina is the client software by default - which can handle such address (without vnc://) by selecting vnc protocol in the address bar.


How are applications selected as defaults?

Generally changes are proposed and debated by the community at the Ubuntu Development Summit. See, for example, the
Maverick Desktop Application Selection blueprint.

There are some rules; the application must be in the main repository (which means it will be officially supported) and it and its dependencies must fit on the install CD. Applications can be moved into main by going through the main inclusion process.

The Ubuntu Desktop Team is ultimately responsible for supporting and maintaining the default desktop applications. They conduct their weekly meetings openly on IRC and post the minutes to the ubuntu wiki.


Sony Vaio E Series SVE15113EN brightness issue

Open terminal ctrl+alt+t
and enter this command

sudo gedit /sys/class/backlight/intel_backlight/brightness

then put your password.

A file would open up.

Set the number in it to 0 (minimuim) if it isn't and save (ctrl+s) then reboot your PC.

If you are getting error related to back up then close above file as it has to be deleted and do

sudo rm /sys/class/backlight/intel_backlight/brightness

then try again.


How do I connect my Sixaxis Playstation3 controller to my laptop?

It seems a bit complicated to do but here is a guide: http://www.pabr.org/sixlinux/sixlinux.en.html


QML ListView overwriten with buttons - but should be in different rows

In your case you need to specify that the second row goes below the first one using:

anchors.top: buttonRow.bottom

I also modified the way you render your ListView by calculating listarea height from the number of elements in the list.

The final QML code is below, included in a Mainview so that it's ready to be tested with qmlscene:

import QtQuick 2.0
import Ubuntu.Components 0.1

MainView {
    width: units.gu(60)
    height: units.gu(60)

    Page {
        id: test

        Column {
            spacing: units.gu(1)
            id: pageLayout
            anchors {
                margins: units.gu(2)
                fill: parent
            }

            Row {
                id: buttonRow
                spacing: units.gu(1)
                Button {
                    objectName: "button1"
                    color: "white"
                    text: i18n.tr("Help")
                }
                Button {
                    objectName: "button2"
                    color: "black"
                    text: i18n.tr("Search")
                }
            }

            Row {
                id: listarea
                spacing: units.gu(1)
                anchors.top: buttonRow.bottom
                height: myList.count * units.gu(2)

                ListModel {
                    id: fruitModel
                    ListElement {
                        name: "Apple"
                        cost: 2.45
                    }
                    ListElement {
                        name: "Orange"
                        cost: 3.25
                    }
                    ListElement {
                        name: "Banana"
                        cost: 1.95
                    }
                }

                ListView {
                    id: myList
                    anchors.fill: parent
                    model: fruitModel
                    delegate: Row {
                        Text { text: "Fruit: " + name }
                        Text { text: "Cost: $" + cost }
                    }
                }
            }
        }
    }
}


Keyboard and mouse stuttering on Ubuntu 18.04 with a new laptop

Found the workaround so far - setting the poll rate for keyboard and mouse to 125 Hz:

sudo su
echo 1 > /sys/module/usbhid/parameters/kbpoll
echo 1 > /sys/module/usbhid/parameters/mousepoll

and replugged the usb hub.

As a permanent solution - these two parameters usbhid.kbpoll=1 usbhid.mousepoll=1 should be added to the end of the GRUB_CMDLINE_LINUX_DEFAULT variable in the /etc/default/grub file.
So the variable should be looking like this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbhid.kbpoll=1 usbhid.mousepoll=1"

...and perform the:

update-grub


Is there a way to print notes from Tomboy?

With a note open, click the tools (cog) icon and select Print.

If the option is not there, ensure printing support is enabled (it is by default):

Edit > Preferences
Add-ins tab
Expand Desktop Integration
Select Printing Support and click Enable.


Can't create project in Visual Studio Code

From the article Setting up Visual Studio Code:

  How do I create and run a new project?

  VS Code doesn't include a traditional File > New Project dialog or pre-installed project templates. You'll need to add additional components and scaffolders depending on your development interests. With scaffolding tools like Yeoman and the multitude of modules available through the npm package manager, you're sure to find appropriate templates and tools to create your projects.


I suspect that your driver could be installed but not in use, have a look in your config file using:

sudo nano /etc/X11/xorg.conf

If your data is not there you may need to add this or similar to this to enable it.

Section "Screen"
Identifier "Default Screen"
DefaultDepth 24
EndSection

Section "Module"
Load "glx"
EndSection

Section "Device"
Identifier "Default Device"
Driver "nvidia"
Option "NoLogo" "True"
EndSection

And then save and in the terminal type:

sudo reboot


I have some locked files on my desktop how do i remove them?

You can change the ownership of most any file with the chown command.  Once you own it, you can edit or delete it.  Since you don't already own the file you'll need sudo privileges to run this command.

cd to the directory containing the file you want to delete

Changing ownership for individual files

sudo chown your_username name_of_file_you_want_to_own

rm unwanted_file_name

Changing ownership of entire directory and files contained therein

sudo chown -R $(whoami):$(whoami) /path/to/folder
rm -r /path/to/folder


Try the following:

sudo apt-get clean
cd /var/lib/apt
sudo mv lists lists.backup
sudo mkdir -p lists/partial
sudo apt-get clean
sudo apt-get update


In Ubuntu 20.04 LTS and Ubuntu 20.10, I removed snapd following this steps:
# stop snapd services
sudo systemctl stop snapd && sudo systemctl disable snapd
# purge snapd
sudo apt purge snapd
# remove no longer needed folders
rm -rf ~/snap
sudo rm -rf /snap /var/snap /var/lib/snapd /var/cache/snapd /usr/lib/snapd

Then, to avoid that other applications may reinstall it (chromium-browser is an example of application that restores snapd even if installed via apt) you can create a file no-snap.pref by issuing:
sudo -H gedit /etc/apt/preferences.d/no-snap.pref
and then copying the following content in it:
# To install snapd, specify its version with 'apt install snapd=VERSION'
# where VERSION is the version of the snapd package you want to install.
Package: snapd
Pin: release a=*
Pin-Priority: -10


Python is not executing in terminal in Ubuntu 18.04

The short answer is that you should be using "python2" or "python3" as the command, not "python". That way you know which version you are using. And most likely what you want is "python3".
With that said, normally Ubuntu should be adding a link called just "python" that points to one of the other of the two, and I don't know why your system does not have it.
You can manually add it if you really want - but beware that this might break an update later on, and you will then need to remove the link again before you can update properly, so remember what you did here:
sudo ln -s /usr/bin/python2 /usr/bin/python

I suggest linking to python2 as this is an older 18.04 system, and "python" was python2 for that version.
If an update complains about that link being there in the future, you can delete the "/usr/bin/python" link, then run the update again.


Ubuntu 20.04.2 LTS: Unable to locate package caffe-cuda

I checked the original source and it seems you can install caffe with
sudo apt install caffe-cuda

or
sudo apt install caffe-cpu

As per https://packages.ubuntu.com/, it also gives the same information about both packages:

Package caffe-cuda

bionic (18.04LTS) (metapackages): Fast, open framework for Deep Learning (Meta)
[multiverse]
1.0.0-6build1: amd64 ppc64el

Package caffe-cpu

bionic (18.04LTS) (metapackages): Fast, open framework for Deep Learning (Meta)
[universe]
1.0.0-6: amd64 arm64 i386 ppc64el s390x

focal (20.04LTS) (metapackages): Fast, open framework for Deep Learning (Meta)
[universe]
1.0.0+git20180821.99bd997-5build3: amd64 arm64 armhf ppc64el s390x

So it seems to me that on Ubuntu 20.04 you should use caffe-cpu, unless there is some specific reason you want to use caffe-cuda.
In that case, you can try to add the repository for Ubuntu 18.04. Just copy the repos you have in your sources.list and append them at the end of the file. Then substitute focal with bionic in these entries.
Or maybe it is better to download the .deb file from here: https://packages.ubuntu.com/bionic/amd64/caffe-cuda/download and install it with:
dpkg -i <package_name>


Disk by UUID not detected (initramfs), boot failure

I had the same issue like the thread starter and I solved it without reinstalling.

My issue occurred while juggling with a virtual installation based on a copied disk image. This resulted in a changed uuid and the copy wouldn't start. This is a rough sketch of what i did.

First boot using a rescue system (same version) and run a shell on your non-booting disk.
Have a look at /etc/fstab and confirm the uuids there by issuing the blkid command for each device. Fix these entries as they're important.

Next we fix grub with:

grub-mkconfig
update-grub

Then run:

update-initramfs -u /boot/initrd.img-2.6.YOURVERSION-HERE

This will create a fresh initramdisk for your version. If you don't know the exact version you were running have a look at the files in /boot/. Picking the highest version number should be safe.

After you exit the rescue shell the ubuntu live cd will offer you the last menu from where you entered the shell. Choose "install Grub" (or similar) there and enter the device where to put your boot sector.

On most systems (standard install) /dev/sda is a safe bet. Be aware: Windows- or other multiboot-systems might need other entries here!

Finally you should be able to boot from the repaired disk.


How to Copy Ubuntu Install from Internal Drive to Bootable USB

User's Desktop Ubuntu to Bootable USB, BIOS or UEFI

This is another mkusb hacking project

Create a Live USB drive using USB tool of your choice. Mkusb works.
Create a Persistent USB drive using mkusb with defaults.*
Boot the computer using a Live USB.
Plug in Persistent USB target drive.
Open GParted and delete all partitions except sdx2 and sdx3 on the target drive.
Right click and copy the root partition from the internal drive,
Right click the unallocated space on the target drive and select "Paste".
If there is a /home partition copy it as well. Do not include any boot or efi partitions.
Create a NTFS and/or FAT32 partition as required.
Overwrite /dev/sdx2/boot/grub/grub.cfg with /dev/sdx1/boot/grub/grub.cfg.
If you want the USB to have the ability to boot ISO files using grub, create the target drive using the usb-pack-efi option. (this replaces grub 2.04 with 2.02).


How can I switch between windows with an active corner like in gnome 3?

I found the solution with the help of Acatar Partos comment:

Install ubuntu-tweak, open it.
Go to optimizations.
Click workspace
In the upper left dropdown menu, select show windows.


Looping over certain files recursively which creating a directory inside each directory

You can use find to search directories recursively.

$ find -mindepth 2 -type f ! -path '*/output/*' -name '*.mp4' \
  -exec bash -c 'mkdir -p "${1%/*}/output"; ffmpeg -loglevel warning -i "$1" -vf scale=1280:-2,fps=25 "${1%/*}/output/${1##*/}"' _ {} \;

Or a for loop with globstar:

#!/bin/bash

shopt -s globstar nullglob

for i in **/*.mp4; do
    if [[ $i != */output/* ]]; then
        mkdir -p "${i%/*}/output"
        ffmpeg -loglevel warning -i "$i" -vf scale=1280:-2,fps=25 "${i%/*}/output/${i##*/}"
    fi
done


How to get all ubuntu programms back to fullscreen size after I'm not sure what I did?

Just reboot your system. That should do it.


kazam no sound and no rectangular red border during screencast in ubuntu 20.04

Probable solution to audio problem at #8, #12 of
https://bugs.launchpad.net/kazam/+bug/1875530

the fix is to modify this file:

/usr/lib/python3/dist-packages/kazam/pulseaudio/pulseaudio.py

and replace

time.clock()

with

time.perf_counter()

in all 8 places


The measures you take to protect your privacy depend on the concessions you are willing to make in order to make use of different services.  For example, if you decide to use Facebook, you will have filled out some info which is then visible to your contacts.  Any FB applications that you use will have had access to some of your info and could just as well have recorded and stored it in a database elsewhere. If you use a service like Google Docs or Dropbox, you are giving your files to a third party and trusting that they will not breach that trust.

A lot of your privacy measures will be up to you and the information you supply, I don't think tools can help you very much.  Sure, you could browse through a proxy but if you give information to a website, then that kind of defeats the point.

A few things you can attempt to do:

When signing up to a website that you won't be visiting regularly, lie about your details.  But remember the lies in case you ever need them again.
Browse with cookies turned off, although you may experience a somewhat crippled web experience with this
Browse with JavaScript turned off: You can accomplish this with a browser extension called 'scriptblock' and whitelist the websites that you need/trust.  Again, it'll be a very different experience with scripts turned off.  Some websites simply won't work.
Browse using a proxy service (you can even pay for proxy servers) so that your IP address isn't available to the party recording it


Apache Tomcat 8.5.4 Ubuntu 16.04 not working!

I figured out the problem:

For some reason the JRE_HOME was not getting any value- defaulted to 'user/'.
I tried the export command as well as bashrc, none of them worked.
I manually added a line to set the value of this environment variable within the setclasspath.sh .


Installed Ubuntu on separate partition using wubi, can I delete my Windows partition entirely?

If you wish to get rid of Windows altogether, it is best to do a fresh install using a live USB or live DVD.

However if you wish to keep settings and applications already installed in Ubuntu you may consider migrating it.

This page explains how but in my opinion you're better off, backing up your data to an external drive and do a fresh install.


how to get openJDK7 and Technic launcher to work on Ubuntu 15.04

Simply navigate to the folder in terminal, i.e ~/Downloads/
and type into terminal:

java -jar TechnicLauncher.jar


Alternative to Little-Snitch app-firewall?

Linux application firewalls have not yet caught on and there have been various third party projects that come and go over the years.

Currently the best, IMO, is Leopard Flower

There are detailed instructions on how to install Leopard Flower here

Note: It was written for Ubuntu 10.10

Install dependencies (python-qt4 is for the graphical front end)

sudo apt-get install iptables libnetfilter-queue libnetfilter-conntrack python-qt4

Download the zip file from http://sourceforge.net/projects/leopardflower/files/latest/download

Extract the zip file

This will extract a directory, lpfw

Open a terminal and cd into the directory (Assuming it is in ~/Downloads)

cd ~/Downloads/lpfw

Run the program

sudo ./lpfw

See the above link for more detailed instructions as well as more advanced configuration.


Why does restarting my laptop does not give me an option to go to Ubuntu?

It seems that GRUB was not installed on the MBR.

Follow these steps:

Boot using a LiveUSB.
Open a terminal. Run the following commands:

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

Reboot.


I can't access my Windows machine with xfreerdp

God slution for you is to use VNC. Its free and support win and linux.
You can view more and download from here.
Work fine for me.
VNC use port 5900.


To change what color the prompt use (by editing .bashrc), please read Changing colors for user, host, directory information in terminal command prompt (as in Jobin's comment).

For example:

PS1='${debian_chroot:+($debian_chroot)}\[\033[01;35m\]\u\[\033[01;30m\]@\[\033[01;32m\]\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ \[\033[00;36m\]'

Look for the \[\033[00;36m\] near the end. It sets the color of the commands you type. Look at this answer for color number reference.

If you mean the "default colors" as the foreground color (usually white or black) then you can change it in the settings screen of LXTerminal. Note that this is saved to ~/.config/lxterminal/lxterminal.conf, not .bashrc.

If you mean the appearance of each color (ex. you want to make dark blue to something brighter), then unfortunately you can't with LXTerminal because its color scheme is hardcoded.
Marty Jack from LXDE forum wrote this:

  At this time we do not offer any more customization than foreground/background. You are encouraged to run any terminal emulator that meets your needs.

If you need lightweight terminal that supports color scheme customization, xfce4-terminal will do the job. To install it type the following command in LXTerminal:

sudo apt-get install xfce4-terminal


script does not write to file when executed from cron

To get the log file where you expect it to be, replace:

LOG_FILE="test-crontab.log"

With:

LOG_FILE="/home/ubuntu/sam/scripts/sqlplus-scripts/accts-ct/test-crontab.log"

The command [[ ${?} != 0 ]] is bash-only.  From the error message that you quote, the script appears to be running under /bin/sh.  One way to fix that is to replace:

if [[ ${?} != 0 ]]; then

With:

if [ ${?} != 0 ]; then

Another approach is to run crontab -e and add the following line to your crontab file:

SHELL=/bin/bash

Also, for simplicity and style, consider replacing:

echo `date` >> ${LOG_FILE}

with:

date >> "${LOG_FILE}"

This eliminates a useless use of echo.
Lastly, consider putting double-quotes around all shell variables, particularly $LOG_FILE.  Because the current value of LOG_FILE contains no spaces or shell-active characters, this is not needed now.  But, putting double-quotes around them will will prevent unpleasant surprises in the future.


Ubuntu 14.04.3 qtbase5 dependencies problem, is this a bug?

You did not provide a lot of information about your system. What you should try first is a simple dist-upgrade:

sudo apt-get update
sudo apt-get dist-upgrade

Note: It could be that during these commands the system tries to remove or update the same packages you mentioned above.

The logs you provided look to me like you are trying to install a package with a Qt5 dependency on a ubuntu LTS system with a HWE Stack installed.

Could it be that you have a 14.04 LTS base installation (Trusty) and then installed the HW Enablement Stack ?

The HWE stack provides more recent kernels and more recent graphics libraries to the ubuntu LTS releases.

Here is another link explaining how to upgrade HWE stack.

To check the status of your system:

cat /etc/lsb-release

it should deliver something like this:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.1 LTS"

to check your hwe support status:

hwe-support-status --verbose

On a german support site I found the following remark about the installation of the HWE Stack, which I try to translate:

  On some 64bit systems there may be unfulfilled dependencies, especially if you have packages like Wine, Google Earth, Skype, Teamviewer or some games installed. It may also happen that the installation of a HWE stack triggers removal of packages that you actually wanted to keep like Qt or Wine.

I suspect that this is exactly what happens in your specific case; but in the opposite direction. (HWE stack gets removed because Qt5 package is installed) They also state:

  In may cases the unfulfilled dependencies can be resolved if the problematic package is de-installed and then the HWE Stack installed again.
  In many cases it is even possible to install the problematic package again after the HWE stack is installed.
  In some cases the installation of additional *-lts-*- packages can solve the conflict or prevent the de-installation of required packages

If this is the case you should perhaps upgrade your system before installing qtbase5-dev.

I am unsure which is the best way forward for you

do not install qtbase5-dev and use a Qt4 development environment due to the incompatibility.

This is the safe approach. However, you'll probably not have exactly the Qt environment that you want.

de-install HWE stack
install qtbase5-dev
re-install HWE stack

The risk is that you will at some time loose the graphic desktop. You should be confident to do all the steps from the commandline on a virtual terminal. You may run into issues with dependencies.

de-install HWE stack
upgrade your system to (non-LTS) 15.04 Vivid Vervet
install latest mesa and kernel(s) from ppa.

This is IMHO less risky than option 2. But still you would need to perform many of the steps from the commandline.


Wifi range issues and intermittent dropouts, Thinkpad Edge

Turn off wireless N.  It's still finicky on intel chipsets.  If you did some other custom stuff(like turn off hardware crypto for injection) then it's not a real issue and consider it a side effect of your tweaks.

modprobe -r iwlagn
modprobe iwlagn 11n_disable=1
should disable it...
modprobe iwlagn 11n_disable=0
should enable it...

then if toggling solves your problem in /etc/modprobe.d/intel-5300-iwlagn-disable11n.conf
options iwlagn 11n_disable=1
or
options iwlagn 11n_disable=0

whatever solved your problem


Ubuntu 12.04 on Vm Player showing Wired Network Instead of Wireless Network

From within the perspective of a virtual machine, you'll see the virtualized (emulated) hardware, not your real hardware. The hypervisor (VMware player in your case) will emulate a whole machine in which your Ubuntu installation is running. Specifically, VMware emulates a new network device (you can see that in Windows device manager) and will route traffic on IP-level, or bridge on Ethernet-level. It won't pass the whole device.

You have several options to gain access to your wireless hardware in Ubuntu:

Install Ubuntu (native) on your machine. Any way will be sufficient: Wubi install, dual boot, or on an external hard drive.
Run Ubuntu from the Live CD. This limits you from receiving possibly needed updates, and you'll loose all changes on every reboot.
Using a passthrough technology like Intel VT-d which allows you to redirect all low-level hardware calls to a virtual machine. This will make the hardware unavailable in your host operating system. However, your hardware does not support this, and that's why I don't recommend you to try this.
Find a USB Wireless card and use USB redirection with that device instead. I'm not sure if that's available in VMware Player, but if it is, this is possible without specific hardware support.


Jabber/XMPP client with message carbon XEP-0280 support

Gajim supports XEP-0280 (source).
Pidgin doesn't support it (source).

Last update: 28/07/2016.


What distro of ubuntu to choose when I focus on performance? kubuntu?

If you have such a low end system (For me 512 MB of RAM is still not low, but it depends also on your Motherboard and CPU) I actually recommend Xfce with Xubuntu or LXDE with Lubuntu. Both are oriented towards low end systems.

I actually have a question regarding this that was very well answered by fossfreedom: Lighter in CPU/Memory Usage: Lubuntu or Xubuntu

Another one would be: What is the difference between Ubuntu and its derivatives?

So you have a lot of alternatives. If you still want to use Gnome, KDE or Unity, the most important hardware you may need is a video card, followed by RAM.

In order of which one is faster and uses less resources (From less resource usage to highest resource)

Lubuntu
Xubuntu
Ubuntu
Kubuntu

In some hardware Kubuntu might be a little faster than Ubuntu but never will Ubuntu or Kubuntu be as fast or use as little resources as Lubuntu or Xubuntu. So if you want performance and want to use Firefox or Chrome, go with Xubuntu first.


Unable to boot with new Nvidia graphics card

Make sure the line in /etc/default/grub is:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"

After making any edits to your grub settings at /etc/default/grub, you must run sudo update-grub from a terminal (as you are instructed to do in the developer comments at the top of the file.)

Do that, then reboot, and that line you edited should be loaded into the default boot settings (check using the e command as you mentioned previously).

Hope this helps! :)


After reinstalling unity (16.04, desktop), file missing?

Not necessarily.
I don't think so.  I have a full install of Ubuntu on several machines, and the file is not present.  Furthermore, a Google search turns up no results whatsoever for that file.


unable to apt-get -y build-dep php5 php5-mcrypt

You tagged 16.04.  Assuming you're running 16.04, the php in the repository is v7.

Try this instead.

sudo apt-get -y build-dep php7.0 php7-mcrypt


There are snaps and snaps. Snap applications like gimp and firefox are themed perfectly because the developers have added the correct plugs to the snap while building it. Then there are snaps like spotify and vlc which aren't themed because they don't have access to the correct plug. So while the issue is fixed on the snap side it's the developers of individual apps that have to update their apps to take advantage of theming.


Ubuntu 20.04 does not boot when the charger is not connected

BIOS
You have BIOS version R13ET42W(1.16 ).
There's a newer BIOS available, version R13ET44W (1.18 ), dated June 10, 2020, and can be downloaded here and here.
Note: Please verify that I have the correct web page for your model #.
Note: Have good backups before updating the BIOS.


Can I install programs/applications on a separate drive

Yes, Linux marches to the beat of a different... kazoo.

When you install Ubuntu, and most other Linux OS, you are given the choice of where multiple directories go. What goes in them is defined in the Filesystem Hierarchy Standard, including (but not limited to) locations such as

  /
  /boot
  /boot/efi (for UEFI installs only)
  /dev
  /etc
  /home
  /lib
  /mnt
  /opt
  /sbin
  /srv
  /sys
  /tmp
  /usr
  /var

Each can be assigned to a different physical device, and https://unix.stackexchange.com/questions/5489/how-to-safely-move-tmp-to-a-different-volume illustrates how to do it post-install for /tmp . It's far, far better to do it during the install process; thank you for thinking ahead.

I welcome commentary from those more experienced on the subject of which directories should go in the 32 GB drive and which should not, especially with the changes made by Snaps and other packaging methods. I think this would be  a reasonable division:

The soldered-in 32 GB eMMC drive:

  /
  /bin
  /boot
  /dev
  /dev
  /media
  /root
  /run
  /sbin

The externally mounted SD card

  /etc
  /home
  /lib
  /opt
  /tmp
  /usr
  /var

HOWEVER.

It's too darned easy to eject an SD card by accident on most laptops. Do that, and likely you have a system crash.

Either put some kind of Molly-Guard over the SD card and its ejection mechanism, and/or consider supplementing the 32 GB internal drive with something larger that doesn't use the SD slot.

I did that in one of my laptops, and use the SD card slot for backup. It had a removable eMMC card slot, so I got a 512GB eMMC card, which works very well. Without knowing your laptop make and model, can't see if that would work for you.

Also, SD card file access is generally slower than a eMMC drive would be, another reason why I advocate replacing your internal drive. Make sure not to order an M.2 or M2 drive if you choose that solution, for those drives will not work in an eMMC slot.

Lastly, with any solid state device, performance will decline if you come close to filling it. A credible technical website found that “minimum performance improves substantially once you hit 25% spare area for these (consumer) drives.” Their final recommendation was that you should “plan on using only about 75% of (your drive’s) capacity if you want a good balance between performance consistency and capacity.”


How to remember which network connection to use?

Click on network indicator → Edit connections...
Choose DHCP connection Auto or whatever its named → Edit → General tab
Uncheck Automatically connect to this network when it is available

So it will always reconnect to the other connection (static).


It is not that obvious in Ubuntu because there is a tendency to move away from icons on the desktop. Gnome Shell, on which Ubuntu is based, even does not support icons on the desktop anymore. Ubuntu re-introduced icons on the desktop in Ubuntu 19.10 by using a Gnome Shell extension. In Ubuntu 18.04, desktop icons are still provided by the file manager. Specially for this, they included an version of Files that is older than that belonging to the version of Gnome Shell.

Still, it can be done. (instructions adapted for Ubuntu 19.10 in italics)

Find the corresponding launcher file on your system. In "Files", move to "Other Locations" in the side bar, then in the folder pane, go to "Computer", then in "usr", then "share", "applications". This contains the vast majority of launchers for applications installed on your system. Find the launcher you want, and copy it.
In Ubuntu 18.04, you can drag that file to your desktop. Ubuntu 19.10 users should copy the file to the "Desktop" folder in their home folder using the file manager.
The launcher looks weird, but that will be fixed in a moment. In Ubuntu 18.04, double-click the launcher. You will get a warning dialog:

Select "Trust and Launch". Now, the launcher will be turned into a normal, working launcher with the correct icon. Ubuntu 19.10 users should right-click the launcher on the desktop and then select "Allow launching".


How to change color of the snapping window from default orange

If you like like to change just the color, you can change it using CompizConfig Settings Manager.

Run this in terminal to install it:

sudo apt-get install compizconfig-settings-manager

After it install, run the application.

You'll get a warning saying "CCSM is an advanced tool. Use with caution." If you understand the risks of using CCSM, click OK and continue.

Scroll down to Window Management > Grid and click on the Appearance tab. Then, you can change the fill and outline color from orange to other colors.


How do I turn off the screen saver using the command line?

these settings will help

gsettings set org.gnome.desktop.screensaver lock-delay 3600
gsettings set org.gnome.desktop.screensaver lock-enabled false
gsettings set org.gnome.desktop.screensaver idle-activation-enabled false

recheck with dconf-editor

when using the gui, these properties will also change in dconf-editor.


Try the following command:

sudo dpkg -r xsplash-clean

dpkg man page explaining the -r option:

  -r, --remove, -P, --purge package...|-a|--pending Remove  an  installed  package. -r or --remove remove everything except conffiles.
  This may avoid having to reconfigure the package  if  it  is
  reinstalled later.


Ubuntu 18.04 clean install with Nvidia NVS 510 drivers only boots every other time

Partial answer...

To check your Ubuntu file system...

boot to a Ubuntu Live DVD/USB
open a terminal window
type sudo fdisk -l
identify the /dev/XXXX device name for your "Linux Filesystem"
type sudo fsck -f /dev/XXXX # replacing XXXX with the number you found earlier
repeat the fsck command if there were errors
type reboot

Update #1:

user ran fsck incorrectly. I advised them.
user has not checked for Samsung SSD firmware updates. I advised them.


You will need to load the boot menu of the BIOS to change the boot priority.

While the computer is rebooting, hold down the key that gets you into the BIOS menu.  On my computers, it is either F12 or F7, but it may be different for your machine (it should say which button to press on the screen as the BIOS is loading).

Once you're in the BIOS menu, find the boot priority menu, and change the order such that the USB come before the HDD (you can always change this back later).

Also it occurs to me that maybe you haven't made the USB bootable?  What process did you go through in adding the iso image to the USB?


The command

echo 'test' >> sudo /tmp/unicorn

is the same as

echo 'test' /tmp/unicorn >> sudo

so it appends the line

test /tmp/unicorn

to the file sudo in the current folder.

If you want to append test to the file /tmp/unicorn using root privileges you should use

echo 'test' | sudo tee -a /tmp/unicorn

instead. As /etc/rc.local is run by root anyway you don't need sudo at all but just

echo 'test' >> /tmp/unicorn

Likewise the command

/etc/init.d/unicorn_lescollectionneurs start >> sudo /tmp/unicorn

is the same as

/etc/init.d/unicorn_lescollectionneurs start /tmp/unicorn >> sudo

Depending on how /etc/init.d/unicorn_lescollectionneurs is written this may or may not produce an error (most likely it doesn't and /tmp/unicorn is just ignored).

The line

RAILS_ENV=staging

is just setting the variable RAILS_ENV but not exporting it. So it is not available for /etc/init.d/unicorn_lescollectionneurs and its child processes. Use

export RAILS_ENV=staging

instead.


From what I've read, the following steps should get your connection working-

Install wvdial

  sudo apt-get install wvdial

2.Install usb-modeswitch and usb-modeswitch-data from Ubuntu Software Center

3.Edit /etc/wvdial.conf using-

  sudo gedit /etc/wvdial.conf

4.Add the following lines to the file:

[Dialer mts]

Stupid Mode = 1

Inherits = Modem0

Password = mts

Username = internet@internet.mtsindia.in

Phone = #777 [Modem0]

Init1 = ATZ

SetVolume = 0

Modem = /dev/ttyUSB0

Baud = 115200

FlowControl = Hardware (CRTSCTS)

Dial Command = ATDT

5.Save the file, close and run the command-

  sudo wvdial mts

NOTE: if you get an error on this step, disconnect your device and re-connect it after a short period of time, say 30 seconds.

That's it, remember to keep the terminal where you entered the command active, do not close it. The next time you wish to login, simply run the last command, i.e. sudo wvdial mts.

If there are any errors in connection despite the above steps, do the following-

  sudo gedit /etc/resolv.conf

Add (Update or edit, depending upon the situation) the following details-

nameserver 10.228.129.114

nameserver 10.228.129.113

Save it and reconnect the modem.


In terminal type,

lsb_release -a

It will give you the similar output like mine,

karthick@Ubuntu-desktop:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 10.04 LTS
Release:    10.04
Codename:   lucid

In my case from the Distributor ID you can see that i am using Ubuntu distribution.


How do I get Ubuntu Software Center to stop trying to download a package on startup?

This may be an awful solution, I used Synaptic Package Manager, tiped "wine" in the Quick filter, and reinstalled all my wine packages, after that the dialog stopped.
WARNING: I am very noob with ubuntu, dont blame me if something breakes or stops working, it just worked for me.


Ok, turns out some programs won't run under root. Do NOT have sudo in the crontab -e for this particular moment.


Share Clipboard Between Ubuntu and Windows Remote Desktop

If it's not running in the first place, did you check under..

HKLM\System\CurrentControlSet\Control\Terminal Server\Wds\rdpwd

..if the following entry of Type REG_SZ is present or missing?

„StartupPrograms“=“rdpclip“

Thanks to this guy (German language).


Unable to install "Screenlets" in Ubuntu 20.04 LTS

WARNING: Usually the method below is not recommended at all, but you can continue if you really want to get ScreenLets installed on your system.
This method is an adaption of method for 19.04.
We need to add Ubuntu 16.04 LTS repositories to the system:
cat << EOF | sudo tee /etc/apt/sources.list.d/xenial.list
deb http://archive.ubuntu.com/ubuntu xenial main universe multiverse restricted
deb http://archive.ubuntu.com/ubuntu xenial-updates main universe multiverse restricted
deb http://archive.ubuntu.com/ubuntu xenial-security main universe multiverse restricted
EOF

Then we need to install LibPNG 1.2 from linuxuprising PPA (as the regular deb-based method does not work):
sudo add-apt-repository ppa:linuxuprising/libpng12
sudo apt install libpng12-0

Then we need to add ScreenLets PPA:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 94E58C34A8670E8C
sudo add-apt-repository "deb http://ppa.launchpad.net/screenlets/ppa/ubuntu xenial main"

And finally we will be allowed to install ScreenLets:
sudo apt-get install python-gobject python-gtk2
sudo apt-get install screenlets-pack-all

and enjoy.
To prevent possible problems with packages from 16.04 LTS you have to remove its repositories from the system with:
sudo rm /etc/apt/sources.list.d/xenial.list
sudo rm /etc/apt/sources.list.d/xenial.list.save

Note: just tested this method to install ScreenLets on Ubuntu MATE 20.04 LTS. Not sure about GNOME Shell.


Ubuntu 14.04 Interrupted Upgrade causing "No new release found"

Delete /var/lib/ubuntu-release-upgrader/release-upgrade-available and try the upgrade command again

sudo rm /var/lib/ubuntu-release-upgrader/release-upgrade-available

In theory that should call /usr/lib/ubuntu-release-upgrader/check-new-release.

Source - Update available message after installing update


How do I redeploy the state server / juju bootstrapped environment

If you have not already done juju destroy-environment, you can do a juju backups create, which will create a backup of juju's state in a file called "juju-backup-[yyyymmdd]-[hhmmss].tar.gz" (in side the [] are date and time formats, they and the []s are not literals).

The question is if it will keep your broken state as well, and I can't help you with that - not willing to break what I already have working :)


Increase processor utilisation of one application/program

Easy: run your program as many times as you have cores...

I do the same to transcode video in multiple formats: not all video-encoders are multi-core/multi-CPU-aware, so I run a video-encore for one resolution on one core and the other one (with different command-line parameters) on another core.

Low-quality reviewers: some complex problems have exceedingly simple solutions.


Playstation3 controller causes random mouse events on ubuntu 16, how to fix?

According to this this reddit answer it is a kernel bug regression introduced by Sony employees - see here and here.

Another redditor has suggested to create an udev rule (see here).
Will test and update the answer.

Update

The workaround is to run the following command upon sync'ing up the pad:

xinput set-prop "PLAYSTATION(R)3 Controller" "Device Enabled" 0

The redditor in question also suggests to create an udev script to automate this, haven't been able to make it work yet...


How do I fix Age of Empires  color problem?

I updated wine to 1.5.5 and this seems to have fixed the problem.


Odd interface when running sudo ifconfig

I use a Dell D3100 docking station with my laptop and have this same odd interface issue. The docking station has an Ethernet port on it, and when connected to the docking station (via USB) the extra Ethernet interface is shown in ifconfig. When disconnected it goes away. I would ask if you are also connected to some hardware with an Ethernet port, but I don't have enough reputation to comment, so this is the answer that solves the same odd interface problem for me.

PS. Here is the entry from my ifconfig for reference:

riffic@yavin4:~$ ifconfig
enx9cebe81e35fc Link encap:Ethernet  HWaddr 9c:eb:e8:1e:35:fc
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)


How to rebuild a binary after installing new packages

Eight months late, but I believe your problem is mixing cmake and make. The warning here elaborates on this.


How to manually install grub with two hard disks

To sum it all up:

Installed Windows on your HDD, with Windows' Bootloader.
Installed Ubuntu on SSD, Grub gets installed on HDD (Along with Windows' Bootloader)
Formatted the HDD keeping only one private partition, so Windows and both Windows' Bootloader and Grub are gone.
Installed Windows again, with Window's Bootloader.

So now you're only missing Grub which needs to be installed on your HDD,
This question as you said yourself has been asked many times, but just because you wanted to make sure which one is gonna work out for you, I'll link you to one of them.


File /etc/modprobe.d/dummy.conf ignored on Ubuntu 18.04

In Ubuntu 18.04, in the file

/lib/modprobe.d/systemd.conf

comment or edit this line:

"options dummy numdummies=0"


Unity stuck in 2D mode, Nvidia Quadro graphics "unknown", Nvidia-Current active but not in use

The two things that led me to think I was running 2D instead of 3D were the graphics unknown and the nvidia-current active but not being used.

However now that I see this thread comparing the alt-tab switcher in both systems it seems it actually IS running in 3D mode even though everything is saying it's off.

http://ubuntuforums.org/showthread.php?p=11442860

Weird.


Which is the correct ISO file to download Ubuntu 13.04 on a laptop with an Intel Core i5 processor?

AMD64 is affixed to the end of the name of the file, because AMD was the first to adopt a realistic 64-bit architecture that was backwards-compatible, therefore, Intel has to license the x86-64 instruction set from AMD.

In other words, there is no Intel version, and there is no AMD version. As long as you have a processor made after 2006-2008, you have 64-bit support, and should use the 64-bit version of Ubuntu. (Ubuntu *-amd64.iso)


How can I export annotations from a PDF file in Ubuntu?

Not sure if this will meet your requirements, but an online solution might be https://www.sumnotes.net (I have no affiliation with the company).


Cannot assign more than 3584 mb of ram for guest OS in VirtualBox

This link solved my problem. I had installed VirtualBox with .deb file directly, instead what I had to do was to install from "Debian-based Linux distributions" section by scrolling down the VirtualBox downloads page, and follow the instructions.


How do I detect if I'm in a 'full screen' bash shell or GUI terminal window?

If you are in a GUI terminal window, you are not in a login shell. And if you are in tty, you are sure in a login shell. To test these, you can use:

shopt -q login_shell && echo 'Login shell' || echo 'Not login shell'

or, simpler:

shopt | grep login

Example to use in an if statement:

login_shell=$(shopt | grep login | cut -f2)
if [ "$login_shell" = "on" ]; then
    echo 'Login shell'
    # do stuff in login shell
else
    echo 'Not login shell'
    # do stuff in non login shell
fi


Wifi keeps disconnecting in some interval - Ubuntu 20.04

Check that your motherboard firmware is current. If it isn't, update it. You may be able to use a DOS-bootable USB key to do this.
I can't give specific instructions on how to check, as you have not specified the exact model of your laptop.
Generic steps are something like:

Go into the firmware and look for the version, or try the dmidecode command to check.
Go to the manufacturer's website. Look up your exact model.
Look for downloads and then BIOS/UEFI updates.
Look for the latest version. Compare to what you have installed. If it's newer, download it and look for installation instructions. It is possible that you might need to use Windows for this.


How to set terminal title on taskbar(panel)?

In the profile's settings (Edit > Profile preferences), on tab Title and Command, set the default title and make sure to select Keep initial title in the combobox:
.

For multiple titles, use Gnome Terminal's -t or --title= switch. For each title, create a launcher or a shell script which will execute something like gnome-terminal -t "My awesome title here". Other option would be to create a separate profile for each title and execute terminal with e.g. --window-with-profile=PROFILENAME option - see man gnome-terminal.

If this won't work, I'll need more info on your configuration, especially what version of Ubuntu and what desktop environment/session (e.g. Gnome Classic) you use - screenshot showing the non-changed title in taskbar would be handy too.


Once installed geos library (C++, and C), and then trying to install rgeos package (R), it reports geos-config missing!

Install the libgeos-dev  package with your favourite package manager (or software centre) and you'll have /usr/bin/geos-config.

How did I find this? I used the query geos-config for files on the http://packages.ubuntu.com/ webpage. This will list the package you need (query link). Use this next time when you run into similar issues!


I think that the best way is using inotifywait from the package "inotify-tools".

For examples see the best answer in https://superuser.com/questions/181517/how-to-execute-a-command-whenever-a-file-changes


Is any offline upgrade from 13.10 to 14.04 possible?

It appears that the answer is no, an offline upgrade is not possible.

  The reason behind this move, is enourmous amount of support cases of broken and partial upgrades since newer installation media will be missing manual additionally installed packages; packages that have now transitioned to new names; packages that have been removed from the default installation. Thus default install media for next release simply doesn't contain everything one will reasonably need to upgrade, hence the internet connectivity requirement.

(from bug 1170531 via Alexandre P. - see that answer for suggestions on creating a mirror on your local network - this way one machine can perform downloads and other machines use it as a local cache)

I confirmed this by attempting a number of variations on the old offline instructions, none of which worked. In the end I could upgrade using:

network only
ISO on CD/USB + network for additional downloads (network connectivity required for upgrade to start)

but I couldn't figure out how to do it from a mounted ISO.


Help with getting an older WinTV-PVR-150 to work in Ubuntu 12.10

Open with VLC with the pvr command, i.e.
vlc pvr:// :pvr-channel=2

The pvr-channel= option can accept a 0, 1, or 2.
Usually 0 is coax, 1 is s-video, and 2 is av.
Right now, my problem is that I can't get audio in for watching
on my wintv 150, so good luck.


NVIDIA CUDA Toolkit for GeForce 8800 GTS

I suggest you set up the recommended Nvidia drivers and get them working before installing the cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64.deb package from Intel.

Get the drivers from the Software Updater/Settings button/Alternative drivers tab, not from Intel directly or from the CUDA package.  Use the recommended (tested) version of the latest driver.  You could try an earlier version to maybe avoid artifacts, but I never bothered.  If you got the drivers elsewhere, uninstall them and redo the installation as described above.

Installing the Intel CUDA package will bring in all the other cuda packages in the (multiverse) repositories (if you've enabled the multiverse in the software update settings).  This CUDA release requires the gcc-5 and g++-5 compilers, so since gcc-6... is the default for 17.04, install them manually.  I just relink the /usr/bin/gcc and /usr/bin/g++ to the "5" versions instead of the "6"s, but I guess you could fiddle with the makefiles if you want to keep the "6" versions as the default.  See if the /usr/local/cuda/bin got added to your PATH at the front, (log out and in again).  If not either set it up when you login, or just have a script to set it when you work with CUDA.  Same for adding /usr/local/cuda/lib64 to LD_LIBRARY_PATH.  Be sure to export these variables after they are set.

Go to the writeable cudasamps directory (it may show up in your home directory).  If it's not in your home dir, then copy it yourself from the /usr/local/cuda installation to some writeable (by you) location. Try to run a makefile from one of the sample directories -- e.g. ...cudasamps/5_Simulations/nbody  The makefile should complete and produce the nbody executable, try to run it.  That's about it.  The Nvidia drivers I've used for this were the 367 and 375 versions (yes with the windows artifacts after sleep for the 375 driver).


Ubuntu 18.04 software-properties-gtk failing with org.freedesktop.DBus.Error.ServiceUnknown

It turns out that import requests_unixsocket was failing in /usr/lib/python3/dist-packages/softwareproperties/LivepatchService.py because

 try:
     import dateutil.parser
     import requests_unixsocket

     gi.require_version('Snapd', '1')
     from gi.repository import Snapd
 except(ImportError, ValueError):
     pass

and it was dateutil.parser not importing with an error that module six was not present.
The package python3-six was installed (so my package manager said).
when I reinstalled this package, software-properties-gtk worked again.


Permission denied even when run with sudo

Well it looks like in my wine folders it was linking to my Z: drive which is the root directory.  Once I deleted all the wine folders it works.


What is the difference between ">" and ">>"?

> & >> are redirection operators; they transfer output of something, in this case ls, elsewhere.
If this output goes to a file, > will truncate the file - ie delete any previous content, whereas >> will append new data onto the end of the file, keeping previous content.
This will work with any input, so echo & cat, for example, can also be used this way.

Also of interest is the | operator, which passes the data to another application - so ls | cat -n will give you a line-numbered listing !

Pipes is the relevant term.


how to change default IP in Ubuntu 12.10

Your IP isn't usually "selected" by Ubuntu.  It is usually given to it by the router, or remote system (ISP / datacenter), and in the very rare cases of virtual machines, you have to configure that on the system that's hosting the vm (since that's how the VM gets the IP).

You can't change the "default" ip, because as i said above, the IP isn't "selected" by Ubuntu, its handed to you from a location somewhere upstream in the network from your computer (whether its from the router, or ISP). (therefore, there is no "Default" IP address)

Unless both myself and Dennis (the other answerer) are misunderstanding what you're wanting to do, you're likely going to get this same answer from more than just us.


Python3

#!/usr/bin/env python3

import sys

def make_id_dict(f):
  d = {}
  for line in open(f):
    k, v = line.split()
    if k in d:
      d[k] += [ v ]
    else:
      d[k] = [ v ]
  return d

filename1 = sys.argv[1]
filename2 = sys.argv[2]

dict1 = make_id_dict(filename1)
dict2 = make_id_dict(filename2)

for key in sorted(dict1):
  for i, value1 in enumerate(dict1[key]):
    value2 = dict2[key][i]
    if value1 == value2:
      result = 'match'
    else:
      result = 'mismatch'
    print(key, value1, value2, result)

Save as script match-files-by-ids.py then call:

$ python3 match-files-by-ids.py File1 File2
1 12 13 mismatch
1 13 13 match
2 15 15 match
2 16 17 mismatch
4 15 15 match
4 18 18 match


How to get sed to work for parametric expansions?

The main problem is that $r will look like path/file.tst so when it's expanded (whether with or without the dot extension), sed will see something like

sed s/val1/path/file/

which will cause an error because the / in the replacement string is interpreted as the terminating / of the sed s/pattern/replacement/

You can overcome that by choosing any other character as sed's pattern separator - choose something that's not going to be in your filename or path e.g. @ (although of course that is a legal filename character). So

"s@val1@${r%.tst}@"

(I've used double-quotes here: they will allow variable expansion while preventing other potential gotchas such as glob expansion).

As a matter of style (and efficiency) I'd suggest not making multiple sed calls to edit the same file - you can chain multiple replacement expressions in GNU sed with -e e.g.

sed -i -e "s@val1@${r%.tst}@" -e "s@val2@${var2}@" -e ...

or make use of the -f scriptfile option and use a here-document:

for r in "$path"/[0-9]*.tst; do

sed -i -f- "$path/foo.bar" << EOF
s@val1@${r%.tst}@
s@val2@${var2}@
s@val3@${var3}@
s@val4@${var4}@
EOF

cat "$path/foo.bar"

done


Can't upgrade Ubuntu from 16.04.1 to 16.10

I had the same problem, this bug is reported here and here.
I found an inmmediate solution here, I'm just quoting jml3473's comment (with some adjustments to make it clearer):

  I killed the upgrade python process, then I did:

  sudo dpkg --configure -a
  sudo apt-get update
  sudo apt-get dist-upgrade
  The dpkg configure did a number of things but gnome-shell and gnome-session met dependency problems so I did a:
  sudo apt-get -f install
  and I'm currently redoing:
  sudo apt-get dist-upgrade

This did the job for me. I must clarify that I did this immediately after the process got stuck, I read some comments about how after trying to reboot it wouldn't work anymore.


Where to put xmodmap command execution for remapping CapsLock to Esc?

The problem is that xmodmap is deprecated, and the keyboard layout is resetted at strange times. See if https://askubuntu.com/a/464618/16395 can help you.

In gnome-shell you can achieve this thing by setting, in gnome-tweak-tool, one of  these options:

You should be able to find an equivalent thing for Elementary.

See also https://askubuntu.com/a/629043/16395 and Map AltGr-[a..z] and Shift-AltGr-[A..Z] to greek letter


Yes, you seem to have destroyed your system quite effectively.

1) Make a new Ubuntu install LiveUSB.

2) Boot into the "Try Ubuntu" environment.

You have two choices for step 3):

Backup your data and reinstall (easiest)
Chroot into the broken system and reinstall the libreadline8 package (fastest...if you know how, but slowest if you don't know how)

Advice: If you use wildcards in apt, read your output carefully. That's the only warning you will get.


Help getting TED working and having it integrated with dash/menu

it should be

java -jar /home/sarvesh/TED/ted.jar

note the dash before the -jar option and also using of / instead of . to separate directories in the path.


Unable to install Ubuntu 12.10 - Hard Drive not recognized

Solved. I had a SanDisk card plugged in that I was using with my camera. Removing that media allowed the hard drive to be shown.

Not sure why that had an effect on the installation but taking the SDHC card out worked.


How do I change the default working directory with which gnome-terminal opens?

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

cd /directory/of/your/choice

Save and close the file.

Now, every time you open a console session, you will be cd'd to that directory.


It turns out the issue was that this was a Vala app and a special set of build tools had to be installed for the build to succeed. Full details about building Vala apps on Ubuntu can be found here, but the important bit, installing the Vala compiler, is

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 7DAAC99C
sudo add-apt-repository ppa:vala-team
sudo apt-get update
sudo apt-get install valac-0.18 vala-0.18-doc valac-0.18-dbg


Built in keyboard won't work - Acer Chromebook R11 Ubuntu 16.10

After skimming this discussion, it is my understanding that the keyboard works with linux kernel 4.7 but not 4.8.

I am now using the latest GalliumOS baytrail nightly and the keyboard works fine.


how to install driver wireless at ubuntu

Please run the command:

lspci -nn

Is your device  Atheros Communications Inc. AR9485 Wireless Network Adapter [168c:0032] (rev 01) ? If so, then the driver ath9k is already installed. Check to see if it is loaded:

lsmod

Is the wireless switch set to enable or disable wireless?

rfkill list all

Look for clues in the message logs:

dmesg | grep -e wlan -e ath


Issue installing R4.0 in AWS Ubuntu focal aarch64

@Karel,   That's what I thought.  I tried manually compiple R 4.0.3 but am having some issues.
I am not 100% sure but a culprit of the issue may be r-api-4.0, as the aptitude output indicates;  r-cran-boot : Depends: r-api-4.0 which is a virtual package and is not provided by any available package
@NObert,   This is not the answer but the cache-policy output too long for the comment but a following is the entire output of apt cache-policy

apt-cache policy

apt-cache policy r-base r-base-core r-base-dev r-recommended
r-base:
Installed: (none)
Candidate: 4.0.3-1.2004.0
Version table:
4.0.3-1.2004.0 500
500 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/
Packages
4.0.2-1.2004.0 500
    500 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/
Packages
 4.0.1-1.2004.0 500
    500 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/
Packages
 4.0.0-1.2004.0 500
    500 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/
Packages
 3.6.3-2 500
    500 http://us-east-2.ec2.ports.ubuntu.com/ubuntu-ports
    focal/universe arm64 Packages
 r-base-core:
 Installed: (none)
 Candidate: 3.6.3-2
 Version table:
 3.6.3-2 500
    500 http://us-east-2.ec2.ports.ubuntu.com/ubuntu-ports
      focal/universe arm64 Packages
 r-base-dev:
 Installed: (none)
 Candidate: 4.0.3-1.2004.0
 Version table:
 4.0.3-1.2004.0 500
    500 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/
 Packages
 4.0.2-1.2004.0 500
    500 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/
 Packages
 4.0.1-1.2004.0 500
    500 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/
 Packages
 4.0.0-1.2004.0 500
    500 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/
 Packages
 3.6.3-2 500
    500 http://us-east-2.ec2.ports.ubuntu.com/ubuntu-ports
     focal/universe arm64 Packages
 r-recommended:
 Installed: (none)
 Candidate: 4.0.3-1.2004.0
 Version table:
 4.0.3-1.2004.0 500
    500 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/
 Packages
 4.0.2-1.2004.0 500
    500 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/
 Packages
 4.0.1-1.2004.0 500
    500 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/
 Packages
 4.0.0-1.2004.0 500
    500 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/
 Packages
 3.6.3-2 500
    500 http://us-east-2.ec2.ports.ubuntu.com/ubuntu-ports
 focal/universe arm64 Packages


Why apt-get wants to install Cinnamon when I try to install Nemo?

You are installing nemo from a ppa. Those packages doesn't follow the same dependencies that the ones in the repositories.

This is the PPA:

dpkg-deb --info nemo_2.0.8-20140108010047-saucy_amd64.deb
 new debian package, version 2.0.
 size 960944 bytes: control archive=1719 bytes.
    1529 bytes,    20 lines      control
     988 bytes,    14 lines      md5sums
     185 bytes,     7 lines   *  postinst             #!/bin/sh
     515 bytes,    18 lines   *  postrm               #!/bin/sh
 Package: nemo
 Version: 2.0.8-20140108010047-saucy
 Architecture: amd64
 Maintainer: Linux Mint <root@linuxmint.com>
 Installed-Size: 2366
 Depends: libatk1.0-0 (>= 1.32.0), libglib2.0-data, cinnamon-desktop-data, cinnamon-translations, cinnamon, libc6 (>= 2.14), libcairo-gobject2 (>= 1.10.0), libcairo2 (>= 1.10.0), libcinnamon-desktop0 (>= 2.0.4-20140107011539-saucy), libexempi3 (>= 2.2.0), libexif12, libgail-3-0 (>= 3.0.0), libgdk-pixbuf2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.37.3), libgtk-3-0 (>= 3.3.18), libnemo-extension1, libnotify4 (>= 0.7.0), libpango-1.0-0 (>= 1.20.0), libpangocairo-1.0-0 (>= 1.14.0), libx11-6, libxml2 (>= 2.7.4), nemo-data (= 2.0.8-20140108010047-saucy), shared-mime-info (>= 0.50), desktop-file-utils (>= 0.7), gvfs (>= 1.3.2)
 Recommends: eject, librsvg2-common, gvfs-backends, nemo-fileroller
 Suggests: eog, evince | pdf-viewer, totem | mp3-decoder, xdg-user-dirs
 Breaks: gnome-bluetooth (<< 3.0), gnome-session (<< 2.28), gnome-volume-manager (<< 2.24), rhythmbox (<< 0.12)

and this is the repositories:

apt-cache show nemo
Package: nemo
Source: nemo (1.8.4-1)
Version: 1.8.4-1+b1
Installed-Size: 2304
Maintainer: Nicolas Bourdaud <nicolas.bourdaud@gmail.com>
Architecture: i386
Depends: desktop-file-utils (>= 0.7), gsettings-desktop-schemas, gvfs (>= 1.3.2), libglib2.0-data, nemo-data (= 1.8.4-1), shared-mime-info (>= 0.50), libatk1.0-0 (>= 1.32.0), libc6 (>= 2.7), libcairo-gobject2 (>= 1.10.0), libcairo2 (>= 1.10.0), libexempi3 (>= 2.2.0), libexif12, libgail-3-0 (>= 3.0.0), libgdk-pixbuf2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.35.9), libgnome-desktop-3-7 (>= 3.2.0), libgtk-3-0 (>= 3.3.18), libnemo-extension1 (>= 1.1.2), libnotify4 (>= 0.7.0), libpango-1.0-0 (>= 1.20.0), libpangocairo-1.0-0 (>= 1.14.0), libx11-6, libxml2 (>= 2.7.4)

As you can see, the PPA includes cinnamon package at the end, while the repo don't. If you are expecting that cinnamon doesn't get installed you should remove the PPA and use the repositories instead or open a bug to remove the cinnamon dependency.


How to disconnect from a wireless network in Gnome 3.10

As the below GUI method was not valid for gnome-control-center 3.10. It is possible to use nmcli (command‐line tool for controlling NetworkManager)

nmcli d disconnect iface wlan0

d for device
disconnect command to disconnect network interface
iface wlan0 network interface name (Check from ifconfig -a or iwconfig)

otherway, using connection id:

nmcli c down id WiFiConn

c for connection
down command to drop connection
id WiFiConn name of connection as it was saved in NetworkManager (Check nmcli c).

Reference: man nmcli

This for gnome-control-center 3.6.3 (still used by Ubuntu 14.04). From Gnome indicator bar:

Wi-Fi → WiFi Settings

Click on arrow to the right of current active connection

Disconnect


How to activate application launcher using meta key

Turned out I had modified the file ~/.config/kwinrc when I installed Latte dock and after I removed it, the meta key was no longer activating Plasma's application launcher.
To enable it again open ~/.config/kwinrc and update the following section:
[ModifierOnlyShortcuts]
Meta=org.kde.plasmashell,/PlasmaShell,org.kde.PlasmaShell,activateLauncherMenu


Does apt-get purge remove reverse dependencies?

A simple test will answers you:

$ apt-cache depends vim
vim
  Depends: vim-common
  Depends: vim-runtime
  Depends: libacl1
  Depends: libc6
      ......

Now as you can see the package vim depends on vim-common. So let's try remove the package vim-common:

$ sudo apt-get remove vim-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  ubuntu-minimal vim vim-common vim-tiny
0 upgraded, 0 newly installed, 4 to remove and 2 not upgraded.
After this operation, 3,268 kB disk space will be freed.
Do you want to continue [Y/n]?

Take a look on the line:

The following packages will be REMOVED:
   ubuntu-minimal vim vim-common vim-tiny

So as a conclusion removing a package will cause to remove all packages that depend on it.


So it's 10 seconds most of the time. How long does it take in the worse cases?

I think Ubuntu tries to establish a wireless connection every N second. Say it's every 20 seconds, then it can actually begin connecting anywhere from 0 to 20 seconds depending on when the system went to sleep and when it work up. That would be my initial guess.


Software Installation Issue With Shutter

I came about this solution because for this game, scrabble AI, a standalone scrabble game, I needed sudo apt install libgnome2-canvas-perl, which did not work.

however, this page to install shutter using a ppa got it for me and the game now works.

sudo add-apt-repository ppa:linuxuprising/shutter
sudo apt update

sudo apt update shutter

shutter does open up after installing some plugin updates.
I then removed the ppa from software sources, just to be cautious.

edit:  oops forgot the most important thing (for me) the scrabble game
https://github.com/apikler/ScrabbleAI

unzip, run
    perl scrabble.pl from where you put it.


Upgrade remote server from 9.04 to Ubuntu LTS

You should probably do a fresh install. It would ensure that nothing is broken, as that's almost a guarantee if you were to add Lucid's repos to your 9.04 installation or upgrade incrementally through the GUI like Zkriesse said.

EDIT: You can upgrade to 10.04 via SSH by first editing /etc/update-manager/release-upgrades with your favourite editor and changing Prompt=* to Prompt=lts and then executing sudo do-release-upgrade -d

Source: http://ubuntuguide.net/how-to-upgrade-to-ubuntu-10-04-from-ubuntu-9-108-04-lts


How can I start an another GUI from virtual console in Ubuntu 18.04?

Under KDE there is in main menu "start session under different user" entry. You do not need to ctrl + alt + f[n]. If you are using KDE.


Strange font issues on Ubuntu 14.04 Unity

I'v got the same issue too! It seems to me that started to happen after i did a new install of last firefox directly from mozilla.org (not from official canonical repos). I checked out the requirements and i installed among others the 'Pango' package.

Shortly in my case the issue has been resolved by uninstalling those packages:

pango-graphite
gsfonts-X11
libgraphite3

Hope it helps.


How to monitor NetworkManager connectivity?

NetworkManager includes an nmcli program, which has a monitor command. Here is what its output looks like for me when I disconnect then connect to a Wi-Fi access point:

$ nmcli monitor
There's no primary connection
wlp4s0: unavailable
Networkmanager is now in the 'disconnected' state
wlp4s0: disconnected
wlp4s0: using connection 'CyberShadowPC'
wlp4s0: connecting (prepare)
Networkmanager is now in the 'connecting' state
wlp4s0: connecting (configuring)
wlp4s0: connecting (need authentication)
wlp4s0: connecting (prepare)
wlp4s0: connecting (configuring)
wlp4s0: connecting (getting IP configuration)
wlp4s0: connecting (checking IP connectivity)
wlp4s0: connecting (starting secondary connections)
wlp4s0: connected
Networkmanager is now in the 'connected' state
'CyberShadowPC' is now the primary connection

It looks like it should be easy to parse its output and run appropriate actions as necessary. Here's a bash script which runs a command when a NetworkManager connection becomes the active primary one:

#!/bin/bash
set -euo pipefail

connection_name=CyberShadowPC
command=(notify-send "Connected to $connection_name!")

LC_ALL=C nmcli monitor | \
    while read -r line
    do
        if [[ "$line" == "'$connection_name' is now the primary connection" ]]
        then
            "${command[@]}"
        fi
    done


Looking for IDE compiler to build and run a .c source file without creating a project

When I need to quickly do one file program, I use any text editor and compile from the command line. I use emacs, but any editor will do. gedit is the editor that ubuntu comes installed with. From the terminal type gedit test.c & then to compile it use gcc test.c -o test


The issue is your program don't have access to write to the temporary folder. ls works because it reads the current folder without "saving" anything. find on the other hand "caches" data to the temp folder. If he can't it crash!

Check your permissions on the /tmp folder.

ls -la /tmp

You should get something like this.

bookofzeus@askubuntu:~$ ls -la /tmp
total 60
drwxrwxrwt 12 root    root    12288 May  9 14:39 .

Now, check the permissions on the "." It should be writable by everyone.

If not, then that's your problem.

Change it to 1777 (sudo chmod 1777)


Sounds like a mirror hiccup. make sure to do:

sudo apt-get update
sudo apt-get install php5-curl php5-common

PHP just recently upgraded and the mirror might have not synced correctly. If it continues try the next day, these things get solved quickly.


How to use split file into two based on line start?

Using grep:
grep -E '^-e' 1.txt >2.txt
grep -E '[^-]' 1.txt >3.txt


Can a device that support Kernel 4.1, work with Ubuntu 16.04 LTS

Luckily there are people who update vendor drivers for new Linux kernels. Vendors do not bother in many cases.

So this device will work with the help of customized drivers you can find in github or PPAs.


Unable to connect unless already logged in

try using "screen"

the usage is simple-

screen <the command you use to start vnc sever>


multiple printer entries shown for HP Officejet 4500 in CUPS system-config-printer 1.2.0

I was able to delete the duplicates without causing any problems. Also, by deleting all the printers and then re-installing the printer driver via Server -> New -> Printer, I was able to stop the printer from printing an extra blank page at the end of print jobs. When re-installing the driver, when you get to the "Select Device" step, make sure you select the printer and not the fax software. In my case, the printer was below the fax, which you would select if re-installing the driver for the fax function.


Folder with pipes in the filename missing

This should work from your OS, just ignore the part about the live cd. it will work since its on your external HDD.

http://www.howtogeek.com/howto/15761/recover-data-like-a-forensics-expert-using-an-ubuntu-live-cd/


Ubuntu 15.10. Weird error message and the desktop image doesn't boot through usbstick

Finally got it to work. Ubuntu doesn't like SATA6G_E12 connectors. So I've changed my SSD and my DVDrom to regular SATA connectors and now everything works great.


Most of those files relate to your X server and are totally benign. Their contents is specific to the application which created them and generally you should not change them.

.ICEauthority is explained here.
.XAuthority is explained here.
.xsession-errors is an error log.
.pulse-cookie is a PulseAudio authentication cookie.
.profile contains commands which are executed when you log in.
You may edit this file's contents.


Juju could not add relation between mediawiki & mariadb

ERROR ambiguous relation: "mediawiki mariadb" could refer to "mediawiki:db mariadb:db"; "mediawiki:slave mariadb:db"

This means that there are two types of relations possible between mediawiki and mariadb:

mediawiki:db mariadb:db used for connecting Mediawiki to a database.
mediawiki:slave mariadb:db used for connecting Mediawiki to a secundary (slave) database. See the MediaWiki charm for more information (in the "MySQL Slave" section of that page).

You have to specify which relation you want. mediawiki:db mariadb:db is the correct relationship for this example. Run the following command:

juju add-relation mediawiki:db mariadb:db


I used to get an error message about setting up the encrypted swap while booting as well, but the encrypted swap was still set up properly.

It seems that may be the case with you, since, when you run /etc/init.d/cryptdisks reload, it tells you it's stopping cryptswap1, which indicates that it's running.

However, you can verify it. As it says, the device is called cryptswap1, so let's see if it's running properly after boot.

Find out what the actual cryptswap1 device is

Try booting up and running ll /dev/mapper/cryptswap1. It should say the following:

lrwxrwxrwx 1 root root 7 Jul 11 01:52 /dev/mapper/cryptswap1 -> ../dm-0

If it says that, it means that /dev/mapper/cryptswap1 is actually located at /dev/dm-0.

Find out if that device is being used

Run cat /proc/swaps. It should give something like the following:

Filename                Type        Size    Used    Priority
/dev/dm-0                               partition   4098044 467804  -1

If the Filename matches the cryptswap1 device, things are working properly.


What is Telepathy Indicator Service and can I remove it?

Empathy (the Instant Messaging client) uses Telepathy for protocol support.

The telepathy-indicator is just the (sub-)indicator in the messaging indicator.


A dual boot would be fine.

A Virtual Machine with Virtualbox might be better for you though. Less headaches and more flexibility, easier to set up.

To learn the basics about Linux I recommended the EdX Intro to Linux course. I've taken it myself and it's great. It's free, it's good, and you can do it at your own pace.


This error occures when your web server hasn't access to DocumentRoot folder. you must check permissions of parent folders of folder that you specify in DocumentRoot variable. www-data must access read and execute to parent folders and also access read to files under DocumentRoot directory. you can solve this by changing the owner of files and folders to www-data or give read and execute access to all others.


I found this:  http://www.dell.com/support/drivers/us/en/19/DriverDetails?driverId=R247660&fileId=2731129060  Wonderful! An Ubuntu installer for your exact printer. However, depending on your Ubuntu version, it's too old to install correctly. Notice it was built in 2009. As an experiment, I installed it on a print server I have running 10.04. In this case, it actually pays to be old!

I copied the .ppd files and zipped them and here is a link to my Dropbox public folder: https://dl.dropbox.com/u/58267392/Dell.zip

Copy the file to your desktop. Right-click it and select Extract Here. Open a terminal and do:

    sudo mkdir /usr/share/ppd/Dell
    sudo cp Desktop/Dell/*  /usr/share/ppd/Dell/

Now add your printer and select the ppd file at /usr/share/ppd/Dell/dlP513w.ppd.

I found additional guidance here: http://ftp.dell.com/Printer/R247803_Readme.txt

Good luck and let us know your success!


When will fglrx be fully supported by Ubuntu 12.10?

Guess you are having the same problem I have. You can follow the bug on launchpad to see how the progress is.

Until it's fixed you can use the fglrx legacy driver. It's unofficial but it works fine for me. It added some fixed to the driver so it will work with the 3.5 kernel. Sadly it downgrades the XServer from 1.13 to 1.12.4.

If you want to try it, there is a ppa for it. You can install it from the terminal with.

sudo add-apt-repository ppa:makson96/fglrx
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install fglrx-legacy


Command line command to refresh GUI desktop, like when pressing F5?

You could emulate pressing the key with xdotool, if you can not find how to directly call the function it is mapped to:

xdotool key F5

The difficult part is to do that when the current window is not the desktop.
It should be possible to find it with th search command - but may need some experimenting;

First, try to find the right window, using getwindowname to show the title of matched windows:

xdotool search --class Desktop getwindowname

If the result looks right, try:

xdotool search --class Desktop key F5

Otherwise, see man xdotool for many more options of xdotool search.
If you need more information about the existing windows to make it work, these commands are the most useful for inspecting them: xwininfo and xprop.


Your package name has a missing 5, its name is libqt5webkit5 not libqtwebkit5:

sudo apt-get install libqt5webkit5
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  xaw3dg xfig-libs
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libqt53d5 libqt5core5 libqt5dbus5 libqt5gui5 libqt5location5 libqt5network5
  libqt5opengl5 libqt5printsupport5 libqt5qml5 libqt5quick5 libqt5sensors5
  libqt5sql5 libqt5sql5-sqlite libqt5v8-5 libqt5widgets5 libxcb-icccm4
  libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-sync0
The following NEW packages will be installed:
  libqt53d5 libqt5core5 libqt5dbus5 libqt5gui5 libqt5location5 libqt5network5
  libqt5opengl5 libqt5printsupport5 libqt5qml5 libqt5quick5 libqt5sensors5
  libqt5sql5 libqt5sql5-sqlite libqt5v8-5 libqt5webkit5 libqt5widgets5
  libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0
  libxcb-render-util0 libxcb-sync0
0 upgraded, 22 newly installed, 0 to remove and 0 not upgraded.
Need to get 18.4 MB of archives.
After this operation, 71.5 MB of additional disk space will be used.
Do you want to continue [Y/n]?


I've noticed that Flash sometimes turns the card automatically on and then loads the driver. If the module is not used you can safely unload it after which you manually disable the card:

sudo rmmod nvidia
sudo tee /proc/acpi/bbswitch <<<OFF

If the driver cannot be unloaded, it will display:

ERROR: Module nvidia is in use

There is not much that you can do about that. A CUDA application of Xorg server is possible using it. You can check it with:

lsof -n -w -t /dev/nvidia*

It'll return a PID list unless you remove -t.


How to Ubuntu change the Plymouth theme?

Have you tried Plymouth Manager? It's easy to use.

Check the Plymouth Manager site/blog here: http://plymouthmanager.wordpress.com/


using a static "fallback /etc/hosts" if all other DNS options failed

You can't, at least with the NSS (Name Service Switch) implemetation of glibc.

You can obviously use an action for a service (like the mdns4_minimal is using [NOTFOUND=return] in your example). It's of the form:

[STATUS=ACTION]

with a preceding ! will negate the status.

The STATUS can be any one of the following four:

SUCCESS
NOTFOUND
UNAVAIL
TRYAGAIN

and ACTION can be any one of the following two:

RETURN
CONTINUE

Here RETURN will return a result without looking any further lookup functions, and CONTINUE will continue to look further. There is no way to mention a file to fallback.

You are basically looking for something like:

hosts:   files mdns4_minimal [NOTFOUND=return] dns [NOTFOUND=/read/for/this/file]

which is not possible.

In a nutshell, you are looking for an non-existent ACTION of nsswitch.


How to hide the bar above the tabs in the Mozilla Firefox browser

It is the title bar of the firefox application. To disable, click the hamburger menu (☰ button on the right), select "Customize..." and on the left bottom, remove the check from "Title bar".


I just solved after couple of hours. On this answer the /dev/video0 was actually representing the virtual camera created by v4l2loopback but in my case as I am on laptop /dev/video0 actually points to integrated webcam. So what I did is
ls /dev/video*
And note the devices returned now you can load the module like
sudo modprobe v4l2loopback
and now a new device pointer should be preset. Check it by
ls /dev/video*
Notice the new device added and that's what you have to work with. Keeping this in mind now you can follow this thread Is there any way ffmpeg send video to /dev/video0 on Ubuntu?


WIFI interrupts repeatedly on MacBook Pro 2013 Retina 15" on Ubuntu 16.04

Three drivers theoretically may more or less support this wireless module.

bcmwl-kernel-source that is seen as wl in lspci -knn | grep Net -A2 is a proprietary driver. It is installed when you use the "Additional Drivers" GUI. It blacklists all other drivers.
b43 is an open source kernel module that is installed in Linux kernels. It requires firmware that can be installed by sudo apt install firmware-b43-installer.
bcma is also an in-tree kernel module that supports some of Broadcom chips. It also claims to support the 4331 device.

Broadcom claims that wl supports the 4331, but these claims are not reliable. Some of chipstes that are listed by Broadcom simply do not work with that driver.

According to user experience the correct driver is b43.

bcma looks blatantly wrong for this adapter.

So, I suggest to blacklist bcma by

sudo tee /etc/modprobe.d/blacklist-bcma.conf <<< "blacklist bcma"

After that lspci -knn | grep Net -A2 should show b43 as the module in use. If it does not add it to /etc/modules by

sudo tee -a /etc/modules <<< "b43"

You can always remove this file to use the bcma driver by

sudo rm  /etc/modprobe.d/blacklist-bcma.conf

If you have better experience with the wl module, you can use it.

But you need to understand what you are doing. When you install the Broadcom driver from "Additional Drivers" you install bcmwl-kernel-source and blacklist the b43.


SimpleCV Error after reinstalling Ubuntu 14.04

This appears to be a known module dependency issue with SimpleCV. The suggested workaround from that GitHub thread is to install the missing svgwrite python module using pip

sudo pip install svgwrite


How can I un-check "Coming events from Evolution Calendar" in Time & Date?

The indicator regarding your question is called indicator-datetime, the following command should disable showing upcoming events:

gsettings set com.canonical.indicator.datetime show-events false

This setting could also be found via dconf-editor, which i can only recommend as it has a search option.


In the terminal (using the default Bash shell or something similar), you can use Tab to complete commands and path-/filenames.

Just type the first few characters of a file/directory/command and hit Tab once.

If the characters you entered can only be completed to one single valid name, it will do that.
Else it will display all possible options that start with the given few characters.