How do I disable or change the " Alt+` " shortcut to switch between multiple windows of a single application?

This appears to be a bug in Compiz (Unity's window manager), in that the Alt+` shortcuts should appear in its shortcut list, but instead they show as disabled.

To disable (or change) the Alt+` and Alt+Shift+` to switch between multiple windows of one application:

Click here to install the Compiz Settings Manager (CCSM) using the Software Center

Or install it from the terminal with sudo apt-get install compizconfig-settings-manager from the terminal

Start it from the Dash or by typing ccsm from the terminal.

  Statutory Warning: Compiz Config Settings Manager is an advanced tool and one tiny mistake, typo or an accidental click of the mouse can leave your desktop unusable, requiring time and effort to fix it. Please be very careful and follow instructions...thanks. If you mess up, please see this answer on how to fix things.

Type "Unity" in the filter box on the left, and click on the Ubuntu Unity Plugin:

Click on the Switcher Tab on top, and

Look for the Key to flip through windows in the switcher entry near the bottom (scroll down if necessary)
Click on the Disabled button next to it
Check the Enabled box on the "Edit Key" popup
The keys will show, and click on the Grab key combination button
Press any keyboard shortcut combination (it doesn't matter, unless you want to remap this behavior to another shortcut); this will appear beneath the box.
Click on OK, and this shortcut will now show in place of the Disabled button
Now click this button again, uncheck the Enabled box, and click on OK so that the shortcut again shows Disabled.

The Alt+` is now disabled. To also disable the reverse Alt+Shift+` shortcut, repeat step 4 for the Key to flip through windows in the switcher entry.

Finally, close CCSM and if you no longer need it, please consider uninstalling it.


Your claim that

The theme has a launcher at the bottom and custom icons to go with it.

is wrong. GNOME theme include only the gtk themes. The screenshot may include some other programs which may not be part of the theme. For example, the background image also isn't part of the theme.
But if you want to have the icon theme and the launcher, you can follow the steps:
Icon theme
Add the ppa ppa:noobslab/macbuntu and install the macbuntu-os-icons-lts-v7 package
sudo apt-add-repository -y ppa:noobslab/macbuntu
sudo apt-get update
sudo apt-get install macbuntu-os-icons-lts-v7

I've known from your other question that you're using Zesty, and you needed to use yakkety release on the ppa source file. So, in that case, you should be able to install macbuntu-os-icons-lts-v8 icon instead.
Launcher
The launcher is plank. Install it with this command
sudo apt-get install plank

Install the specific plank theme using this command
sudo apt-get install macbuntu-os-plank-theme-lts-v7

You should be able to use the icon theme and configure plank with the specific theme now.
(Same here too. You should be able to install macbuntu-os-plank-theme-lts-v8 following the advice on your other answer. If you do so, you can have very identical configuration as the screenshot of the theme)


i found the kernel version in my 3 ubuntu machines were different.
2 out of 3 had version 4.8.0-36 and the 3rd one had 4.10.0.
looks like, batman-adv version 2016.5 and kernel version 4.10.0 are not compatible with each other.
I was also not able to install 2016.3 version in kernel version 4.10.0.

Solution that I chose was, to downgrade the kernel version to 4.8.0-36 and make sure all the PCs has same kernel version.
Installed batman-adv and batctl version of 2016.3 from following link:
https://downloads.open-mesh.org/batman/releases/batman-adv-2016.3/

once the kernel and batman version of all 3 PCs are same, they are able to discover and create mesh between each other.


Using grp:caps_switch with xkbmap for custom keyboard shortcuts

I have just added my custom layout to the gui in elementary OS Loki.

To add my custom layout I do the following:

edit existing xkb/symbols/ru file to add my layout there;
edit evdev.xml file to add the appropriate variant there;
edit evdev.lst file to add the appropriate variant there;
edit base.xml file to add the appropriate variant there;
edit base.lst file to add the appropriate variant there;

It seems, you don't do the steps #3,4,5.

Could you try it and report back?

EDIT:

I've made some testing and ready to say, that the layout definetely appears in the GUI after editing evdev.xml AND evdev.lst.
The appropriate variant seems to be:
xkb_symbols "alpha_arrows"
so one should add to evdev.lst the following line:

alpha_arrows    gb: Doms l33t layout
Editing base.xml and base.lst seems to be redundant and unnecessary.

EDIT2: Additionally, there seems to be an error in the initial guide. One should add to the evdev.xml

<layout>
  <configItem>
    <name>alpha_arrows</name>
    <shortDescription>endom</shortDescription>
    <description>Dom's l33t layout</description>
    <languageList>
      <iso639Id>eng</iso639Id>
    </languageList>
  </configItem>
  <variantList />
</layout>


The step-by-step from Canonical is really good at going through the process and letting you know what each option does.
Hope you have better success this time


I've installed Hangout extension for Google Chrome

I don't know what was the problem and how that fixed it but it worked for me


Try to install the latest version by adding the repository: ppa:gnome3-team/gnome3

Follow these simple steps:

Open terminal and execute these commands:

sudo add-apt-repository ppa:gnome3-team/gnome3
sudo apt-get -f update
sudo apt-get install gnome-shell ubuntu-gnome-desktop

If all goes well, logout and chose the gnome from the list.

Note: While installing if it still says not able to install libraries or some other packages then consider to add one more repository:

sudo add-apt-repository ppa:gnome3-team/gnome3-staging && sudo apt-get -f update

then try to install again.

If you get any problem and you want to remove the packages and repository then you can use ppa-purge to safely remove it.

Install ppa-purge:

sudo apt-get install ppa-purge

Then remove packages:

sudo ppa-purge ppa:gnome3-team/gnome3
sudo ppa-purge ppa:gnome3-team/gnome3-staging
sudo apt-get -f update
sudo apt-get remove gnome-shell ubuntu-gnome-desktop


If you have one take your liveCD/USB and open the terminal. Run these lines of code one by one.

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

Click recommended repair and do everything it tells you to.


That's linking error about missing lib:

/usr/bin/ld: cannot find -lnl-genl-3

As aircrack-ng is in repository, install build dependencies using:

sudo apt-get build-dep aircrack-ng

Carry on installing missing ones which are not checked by ./configure:

sudo apt-get install libnl-genl-3-dev

You can use Synaptic to search for missing development lib, most have lib prefix and -dev suffix.


How to solve "Unable to locate package update" when doing sudo apt-get install update

When you use sudo apt-get install update, the system will try to install a package called update which doesn't exists and because of this you get that error.

The correct command to resynchronize the package index files from their sources is:

sudo apt-get update

or:

sudo aptitude update

Now, if you want to install the newest versions of all packages currently installed on the system from the sources, use upgrade instead update.

See also man apt-get and man aptitude.


Sony Vaio WebCam shows the error "No WebCam Detected"

moved OP's answer here that was originally in their question

The fix found at https://bitbucket.org/ahixon/r5u87x

Enter the code, 1 command at a time, into a terminal window.

sudo apt-get install libglib2.0-dev libusb-dev build-essential gcc automake mercurial
hg clone http://bitbucket.org/ahixon/r5u87x/
cd r5u87x
make
sudo make install
sudo r5u87x-loader --reload

The loader will automatically be run on boot when it detects your webcam.


This is a daring claim, but the drivers to my TV adaptor were in the nonfree firmware package:

sudo apt-get install linux-firmware-nonfree


Check out the answer that is posted here
Basically you need to find which of those partitions hold your home directory and which one holds your grub and then update your initramfs. There are extensive notes here but not all of that will apply to your case.


QML: What is the difference between a Component, Element, Property, Attribute, and Object?

Components are reusable, encapsulated QML elements with well-defined interfaces.

Components are often defined by qml files.

The Component element allows components  to be defined within QML items rather than in a separate file. This may be useful for reusing a small component within a QML file, or for defining a component that logically belongs with other QML components within a file.
Elements (or types) are the predefined bricks provided by Qt Quick (or provided by the Ubuntu ui toolkit).

Elements are declared with the their name and two curly braces. Elements may be nested in elements, thereby creating a parent-child relationship between the two elements.

To see the standard QML elements listed by functional area, visit this page.
Objects are just instances of a QML type.
Attributes

Every QML object type has a defined set of attributes (id, signals, properties, methods). Each instance of an object type  is created with the set of attributes that have been defined for that object type.
Property

A property is an attribute of an object that can be assigned a static value or bound to a dynamic expression. A property's value can be read by other objects. Generally it can also be modified by another object, unless a particular QML type has explicitly disallowed this for a specific property.


Root directory only showing about half of total available drive space

It'd be interesing to see more logs but OOTB I wonder if you inadvertently setup a RAID[1] configuration.
A quick way to check is to run : sudo mdadm /dev/sda
or alternativelty check if these files exist and their contents:

cat /proc/mdstat
cat /etc/mdadm.conf

If this is indeed the case I suggest the fastest way in a new system is to simply reinstall making sure no RAID configuration is used. I believe it is possible to remove a RAID config on a live system but I'm not familiar enough with it and wouldn't risk it myself. A backup and reinstall might be the fastest path.
[1] https://en.wikipedia.org/wiki/RAID


Where can I find an older Ubuntu version of Skype that still works with alsa?

The safest way to install Skype is from the Canonical Partner repository. The latest version there is still 4.2.

The advantage with getting Skype from Canonical Partner is that certain dependency packages are automatically installed.


The screen stays off and the laptop is unresponsive after waking from sleep

After confirming in the comments that the pm-suspend command works properly with your laptop, we can now tell it to use that command exclusively to suspend it.

Open a terminal and type in gksudo gedit /etc/default/acpi-support

Enter your admin password when prompted.

Look for the line that says SUSPEND_METHODS="dbus-pm dbus-hal pm-utils"

Change the line to read SUSPEND_METHODS="pm-utils"

Save and close the editor, and then reboot your laptop.

Create suspend scripts:

In terminal, type in sudo nano /etc/acpi/events/laptop-lid-close

Paste this into the script (right-click terminal window and click "Paste"):

# /etc/acpi/events/laptop-lid-close
# This is called when the user closes the laptop lid and calls
# the lidclose.sh script.

event=button/lid
action=/etc/acpi/lidclose.sh

To save the file in nano, press CTRL+O then ENTER.  (That is the letter O, not zero.)  Then press CTRL+X to exit.

Make the file executable with sudo chmod +x  /etc/acpi/events/laptop-lid-close

Now make the next script that will be executed by the one you just made.
In terminal, type sudo nano /etc/acpi/lidclose.sh

Paste this into the file:

#!/bin/sh
# This script is called from /etc/acpi/events/laptop-lid-close

# Check if lid is opened or closed
grep -q closed /proc/acpi/button/lid/LID*/state
if [ $? = 0 ]
then
        /usr/sbin/pm-suspend; #if closed then suspend.
fi

Save and close with CTRL+O, ENTER, CTRL+X.  Make it executable with sudo chmod +x /etc/acpi/lidclose.sh

Now restart acpid with sudo service acpid restart.

Now try closing the lid, wait a few seconds and reopen it.  If it doesn't suspend, reboot your computer and try it again.


Black screen after reboot on fresh install of Ubuntu 14.04

Although it may be tedious, it never hurts to reinstall. Also, make sure you are on a 32 bit system. If you are in windows, go into the about page to check.


bash: =: No such file or directory .bashrc

The problem was that I edited my `.bashrc file and added a source variable:

source = /etc/environment

Variable assignment in bash must be without spaces. Editing it to:

source=/etc/environment

solved the problem


Ubuntu fails to start by default after upgrade 18.04 to 20.04

I had same problem yesterday. If I accept maintainer's version for the boot/grub menu and accept upgrade to grub2, virtual machine does not boot after upgrade.
I think problem is upgrade to grub2. I tried to upgrade virtual machine server with normal sequence in terminal with ssh connection
sudo apt update
sudo apt upgrade
sudo upt autoremove
sudo apt dist-upgade
sudo do-release-upgrade

With second try upgrading was hanging with 'Calculating changes'. Before that upgrade has been changed repos to 20.04 repos and when I pressed ctrl-c. I tried to upgrade manually iterating command above. I got same question to accept chained booting with Grub 2 with setting from menu.lst and I answered no. It advised me to run 'upgrade-from-grub-legacy', but I haven't done it.
Result is that I have 20.04 packages in my virtual server, but it is running last Ubuntu's 18.04 kernel from 4-series, using legacy grub which uses menu.lst, but not grub.cfg, but the system uses grub.cfg, when it upgrades kernel and those updated kernels are not those that will be on run on my virtual server.
Question is if I run no 'upgrade-from-grub-legacy' does the virtual hang again in the boot? I can try, but taking a backup takes some time. And does this fix the problem? Kernel from 5-series 20.0.4 is basically better idea than from 18.0.4 kernel from 4 series, because odd series is stable and even series is developer one, so always using even series kernel is bad idea in product time and I don't understand why Ubuntu uses even series kernels in some its LTS Ubuntus's. It does not make sense.
Contuned testing ans made a backup of virtuual server and run 'upgrade-from-grub-legacy', output (some output are in finnish, because my locales)
core.img doesn't exist, trying to create it.

Asennetaan i386-pc-alustalle.
Asennus on päättynyt. Virheitä ei löytynyt.
dpkg: varoitus: version 'dummy-version' has bad syntax: version number does not start with digit
dpkg: varoitus: version 'dummy-version' has bad syntax: version number does not start with digit
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Tuottaa grub-asetustiedoston ...
Linux-levykuva löytyi: /boot/vmlinuz-5.4.0-73-generic
Löytyi initrd-levykuva: /boot/initrd.img-5.4.0-73-generic
Linux-levykuva löytyi: /boot/vmlinuz-4.15.0-143-generic
Löytyi initrd-levykuva: /boot/initrd.img-4.15.0-143-generic
Linux-levykuva löytyi: /boot/vmlinuz-4.15.0-122-generic
Löytyi initrd-levykuva: /boot/initrd.img-4.15.0-122-generic
Linux-levykuva löytyi: /boot/vmlinuz-3.2.0-23-virtual
Löytyi initrd-levykuva: /boot/initrd.img-3.2.0-23-virtual
Linux-levykuva löytyi: /boot/vmlinuz-3.2.0-23-generic
Löytyi initrd-levykuva: /boot/initrd.img-3.2.0-23-generic
Linux-levykuva löytyi: /boot/vmlinuz-2.6.32-33-server
Löytyi initrd-levykuva: /boot/initrd.img-2.6.32-33-server
Linux-levykuva löytyi: /boot/vmlinuz-2.6.31-23-server
Löytyi initrd-levykuva: /boot/initrd.img-2.6.31-23-server
Linux-levykuva löytyi: /boot/vmlinuz-2.6.28-11-server
Löytyi initrd-levykuva: /boot/initrd.img-2.6.28-11-server
Linux-levykuva löytyi: /boot/vmlinuz-2.6.27-9-server
Löytyi initrd-levykuva: /boot/initrd.img-2.6.27-9-server
valmis
dpkg-maintscript-helper: error: environment variable DPKG_MAINTSCRIPT_NAME is required

If I reboot be virtual server, it goes to grub (Is it grb or grub2?) and I can choose my kernel to boot, but /boot/vmlinuz-5.4.0-73-generic in not in the list. If I just press return then uname -a outputs
Linux MyVirtualServer 4.15.0-122-generic #124-Ubuntu SMP Thu Oct 15 13:03:05 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

This makes sense withe menu.lst config file, but not with grub.cfg, so legacy grub is still in run. I can't try 5 series kernel now. For that I have to upgrade to grub2, but how it is done in a virtual machine?


New Dash features and Online accounts missing after 12.04 to 12.10 upgrade

Is the package gnome-control-center-signon installed?

Click here to install it or in a terminal window execute

sudo apt-get install gnome-control-center-signon


Executing a C program stored on a windows drive?

When you mount the windows partition in Ubuntu it mounts with with a noexec directive.  You could just mount that drive in your fstab if you access it from Ubuntu a lot.  You will need to run a blkid to determine what the UUID of the Windows drive is, then add a mount statement for it in your fstab.  Make sure when you get to the arguments section of the line that you don't specify noexec.


My Dell XPS Linux Developers Edition lost my password

In such a case as this, if the entire drive isn't encrypted in a way that you can't access without your username/password, then one can usually:

startup using a USB stick to access the drive where your user information is stored
edit the affected files to restore PATH (or whatever was broken--if you have a recent backup then restore what was broken from the backup easily)
restart after everything is restored the way you want it

If the drive is encrypted then forget it. Save your system as it is and restore from backup is your only solution.


Kubuntu 12.04 LTS only boots after crash

The problem turned out to be a hardware problem.

I followed this manual to adjust the blacklist.conf file:

http://www.thomas-krenn.com/en/wiki/Resolve_mei:_Init_hw_failure_or_mei:_initialization_failed

Now the PC boots fine everytime.


Ubuntu 16.04 LTS does not see Windows 10 partitions

Eventually I coped with two problems by disabling the BitLocker encryption in Windows. So now I can enter Windows without any BitLocker recovery key and I can see Windows partitions within Ubuntu (in the launcher). I attach the prtscr of "disks" tool in Ubuntu - the information about Windows partitions appeared (file system NTFS is recognized).

But one more problem occured (I don't know when this chain of problems finishes). From time to time, when shutting down (or restarting) either Windows or Ubuntu, my laptop doesn't shut down, it suspends (or may be "hangs" will be more correct to say), the screen becomes black and nothing happens. In this case, I have to push and hold power button in order to turn off computer. What can cause such a trouble? May it be somewhat related to USB connection by which the external hard disk is connected to the laptop?


cant install yaml-cpp because it conflicts with yaml-cpp?

You need to remove  yaml-cpp0.2.6-dev

apt-get remove yaml-cpp0.2.6-dev


How to change desktop background from command line in Unity?

Both Unity and Gnome Shell (Gnome 3) use GSettings now instead of GConf. So in Unity and Gnome Shell you can use the command-line tool gsettings for that. Like gconftool, it lets you get or set an individual key.

You can get the current URI of the background image as follows:

gsettings get org.gnome.desktop.background picture-uri
'file:///home/serrano/Pictures/x.jpg'

And set the background URI as follows (which will immediately update your desktop background):

gsettings set org.gnome.desktop.background picture-uri file:///home/serrano/Pictures/y.jpg

Notice that you must prepend the URI with "file://" for this to work (unlike with gconftool).

In order to make your script work with both Gnome 2 and Shell/Unity, you can let it do a Gnome version check first:

gnome-session --version

That will return the version of Gnome. If the version number starts with 3, then gsettings can be used. If it returns a version starting with 2, let your script use gconftool instead.


SSD very slow: it starts fast and then speed drops down

This is normal behavior for SSDs, especially as they get very full. The reason for this is that SSDs need a lot of time to clear up used blocks. They can only write to free blocks. To be fast, they keep free blocks for future use around. This is one of the reasons the TRIM command is important. After the available free blocks are full, the SSD needs to free up more blocks as it writes which makes writing after it ran out of free blocks a lot slower than before.


The desired command seems to be deny instead of block.

sudo ufw deny ssh


Got it to work by statically assigning the ip address by editing the /etc/network/interfaces file.

auto lo
iface lo inet loopback

auto wlan0
iface wlan0 inet static
address 192.168.1.150
netmask 255.255.255.0
gateway 192.168.1.1
wpa-ssid
wpa-psk
dns-nameservers 8.8.8.8 192.168.1.1

For some reason the DHCP discover process from my Wifi adapter is ignored by my router. I had to statically assign it outside of the DHCP scope the router uses and it works straight off the bat from boot.

all credit goes to this link.
Ubuntu 14.04 Server - WiFi WPA2 Personal


Why use a bunch PNG's instead of one SVG in icon themes?

SVG, despite the name, is not infinitely scalable. There is a loss of quality when scaling beyond certain thresholds, just as there is when scaling PNG. Single SVGs would be nice, but the icons would still need to be drawn at multiple sizes to have sharp lines with less detail at smaller sizes, while having much detail at larger sizes, such that scaling would simply result in a different layer of the SVG getting rendered.

The best way to build an icon theme is to use the single-SVG workflow of Tango, like the upstream GNOME theme uses, and have a build system which uses something like icontool to split out the various regions of the canvas into the proper PNG icons in a directory. You will still need to draw the multiple sizes to have the best possible looking theme, but having all the icons in a single canvas makes it easier to maintain consistency across sizes.


Fix resolv.conf and get comcast out of my name server list?

I have some experience with this, but I'm by no means an expert...

You may have a couple of problems...

your router may not be setup to use the DNS servers that you desire
there may be problems with dnsmasq and systemd-resolved on your 18.04 computer
you may need to edit the /etc/hosts file
you manually edited /etc/resolv.conf (don't do that)

1. tweak your router's settings...

Log into your router's admin page, and check the DNS Server settings. Set them to your desired DNS servers, and save the settings.

2. tweak your dnsmasq and systemd-resolvd settings...

dnsmasq and systemd-resolved tend to step on each others toes. Although you can run both, it may cause problems. dnsmasq is left over from previous system, and will remain after a 18.04 upgrade.

In terminal...

ps auxc | grep -i dnsmasq # to see if dnsmasq is running

ps auxc | grep -i resolv # this should be running in 18.04

After fixing your router's settings, uninstall dnsmasq, reboot, and see if your problem is fixed. If you find that you need dnsmasq, reinstall it, and you'll probably need to tweak your systemd-resolved settings.

cd /etc/systemd

sudo pico resolved.conf

change:

#DNSStubListener=yes

to:

DNSStubListener=no

reboot and see if your problem is fixed.

3. Edit /etc/hosts to include your .local names

Here's a portion of my /etc/hosts file. You'll obviously need to change the system and node names for your configuration. This is an example only.

127.0.0.1   Satellite-E55.local Satellite-E55   localhost
127.0.1.1   Satellite-E55
#
# static IP's (systemic network hardware)
#
192.168.0.1 caspurr.local       caspurr         # Netgear router
192.168.0.2 wdacbridge#1.local  wdacbridge#1    # WD AC bridge #1
192.168.0.3 ex6100.local        ex6100          # Netgear EX6100
192.168.0.4 repeater.local      repeater        # Netgear WN2500RP
192.168.0.5 av-bridge.local     av-bridge       # Cisco E2000
#
#192.168.0.6    meow-nas.local      meow-nas    # NAS
#192.168.0.7    zonet-nas.local     zonet-nas   # NAS
#192.168.0.8    woof-nas.local      woof-nas    # NAS
#
# static DHCP's
#
192.168.0.100   ubuntu-eth0.local   ubuntu-eth0 # Toshiba laptop
192.168.0.101   obitalk2.local      obitalk2    # Obitalk VOIP
192.168.0.102   vonage.local        vonage      # Vonage VOIP
192.168.0.103   laserjet.local      laserjet    # HP P1102W printer
#
192.168.0.201   hdhomerun.local     hdhomerun   # Silicon Dust DUAL
192.168.0.202   hdhomerun2.local    hdhomerun2  # Silicon Dust PRIME
192.168.0.203   hdhomerun3.local    hdhomerun3  # Silicon Dust CONNECT
#
# DHCP
#
192.168.0.253   slingbox.local      slingbox    # Slingbox
#
# cable modem
#
192.168.100.1   cablemodem.local    cablemodem  # Mediacom cable modem
#
# DNS
#
208.67.222.222  resolver1.opendns.com   dns1
208.67.220.220  resolver2.opendns.com   dns2


Binding a partition or drive after fstab

I was able to solve the problem by creating an init script that will run at the begining of the init or upstart. I have to create a file in /etc/rc2.d/ and name it like this : S(number){name} where (number) determine the order of the execution o the script and {name} is the name of the script. Assigning a small value on {number} means it is going to be executed before the other scripts that have a higher {number}. Simply editing /etc/rc.local  have a 15% chance it will work because it will run AFTER each run level .

What I do : I simply change the number of the filename of this file: S99rc.local which is located at /etc/rc2.d/ to S10.rc.local and I write the mount commands in /etc/rc.local file.


How can i3 use gnome settings in Ubuntu 18.04

Try setting environmental variable XDG_CURRENT_DESKTOP=Gnome and then running the daemon, e.g.

 XDG_CURRENT_DESKTOP=Gnome; gsd-xsettings


How can I enable autoplay to work even when the screen is locked?

You don't. It's a really bad idea to let strangers run software on your desktop when you've locked it. Instead, deactivate screen lock.


How do I access Ubuntu on Acer Chromebook after installation?

Once you have installed Ubuntu, if you reboot your Chromebook, by default it will continue to boot into Chrome OS, which lives on in its own dedicated partition.

If you'd like ChrUbuntu to be the default, open up the Terminal in ChrUbuntu (or the Developer Console command prompt in Chrome OS) and enter sudo cgpt add -i 6 -P 5 -S 1 /dev/sda to change the default boot partition. Changing it back to Chrome OS is as easy as disabling developer mode when you boot the Chromebook, or entering sudo cgpt add -i 6 -P 0 -S 1 /dev/sda at the terminal.

EDIT I:

Set boot priority

At this point we should have the following situation:

Image-A is an official Google Chrome OS which can boot either in normal mode or dev-mode.
Image-B is (or will be after the first autoupdate) another official Google Chrome OS which can boot either in normal mode or dev-mode.
Image-C is Chrome OS kernel with a modified command line and an Ubuntu rootfs, which can only boot in dev-mode.

Next, we adjust the priority among the images so we can try out our Ubuntu image. The image priority is an attribute of its kernel partition.  Run cgpt show /dev/sda, to see the kernel priorities:

  localhost ~ # cgpt show /dev/sda

  ...

 4096     32768       2  Label: "KERN-A"
                         Type: ChromeOS kernel
                         UUID: D176DC60-81F1-654E-8953-E3D28019738C
                         Attr: priority=3 tries=0 successful=1

  ...

36864     32768       4  Label: "KERN-B"
                         Type: ChromeOS kernel
                         UUID: F1A2C65C-CC22-FF4A-A8BC-67BA233F3D40
                         Attr: priority=0 tries=15 successful=0

  ...

12369920     32768       6  Label: "KERN-C"
                         Type: ChromeOS kernel
                         UUID: B6954485-4295-9749-956A-C315B01FB684
                         Attr: priority=0 tries=15 successful=0

The priority determines the order in which the BIOS tries to find a valid kernel (bigger is higher, zero means don't even try). The tries field is decremented each time the BIOS tries to boot it, and if it's zero, the kernel is considered invalid (this lets us boot new images without looping forever if they don't work). The successful field overrides the tries field, but is only set by the OS once it's up and running.

Let's change the priority of KERN-C to 5:

cgpt add -i 6 -P 5 -T 1 -S 0 /dev/sda

This makes KERN-C the highest priority, but only gives us one chance to boot it. That way if it doesn't work, we're not completely stuck.

If you reboot now, you should come up in Ubuntu!  Note that Computer Science Standard Answer #1 applies: It Works For Me™

If something went wrong and Ubuntu crashes or you powered off, the tries field for KERN-C will have been decremented to 0 and you'll fall back to booting Chrome OS.

Assuming that Ubuntu booted and you could log in, go to Applications->Accessories->Terminal to get a shell, and run

sudo cgpt add -i 6 -P 5 -S 1 /dev/sda

This will mark the Ubuntu kernel as valid, so it will continue to boot next time.

Now you can switch back and forth between the official Chrome OS release and Ubuntu just by flipping the dev-mode switch. Going from dev-mode to normal mode erases STATE (/dev/sda1), but much more quickly. Going from normal to dev-mode again would normally do a slow erase of /dev/sda1, but since we're booting Ubuntu that doesn't happen.

This works because although KERN-C has the highest priority, it isn't signed by Google. In dev-mode that's okay, but in normal mode it will be rejected by the BIOS. Since we've set the successful flag to 1, the BIOS won't mark it invalid but will just skip it each time. This makes the normal-mode boot time slightly longer, but only by a second or two.

Of course you could also switch between images from within dev-mode just by manually setting the priorities with cgpt before rebooting.

Note that if the normal image autoupdates, it will probably change the kernel priorities so that Image-C is no longer the highest and the next time you switch to dev mode, you will
  a) have a long wait,
  b) still be running Chrome OS, and
  c) have to use cgpt to raise the KERN-C priority again.

But, because autoupdate only switches between Image-A and Image-B, the Ubuntu kernel and rootfs shouldn't be affected.


I wasn't able to find a one-click solution for what you want, but I think that the USB Formatter [mintstick] service menu for Dolphin might be close to it.

To add the service menu to Dolphin's right-click menu you first have to install mintstick. Download and install its latest version (1.4.4) in your Downloads directory using the following command:
wget -O ~/Downloads/mintstick_1.4.4_all.deb http://packages.linuxmint.com/pool/main/m/mintstick/mintstick_1.4.4_all.deb

Install it using:
sudo apt install ~/Downloads/mintstick_1.4.4_all.deb

Download the USB Formatter [mintstick] .desktop file from here.

Supposing that you have saved the file in your Downloads directory, copy the file in ~/.local/share/kservices5/ServiceMenus using:
mkdir -p ~/.local/share/kservices5/ServiceMenus/ && cp ~/Downloads/FormatUSB.desktop ~/.local/share/kservices5/ServiceMenus/

The above command will also create the required folders if they do not exist.

You should now be able to find the option to format a USB with mintstick (USB Stick Formatter) by right-clicking in a directory → Actions → Format USB.

This service menu also adds an option to also have the Format USB option in the device notifier, but as the author of the service menu notes:

Note: in order to display the "Format USB" option in the removable
device notifier, you must have pressed the "format usb" button in the
dolphin menu at least one time.

Also have a look at the related video to see how the service works.

Note: I haven't tested the above, since I don't currently have an installation with KDE. Any feedback is appreciated.


Where is the Source code of calculator apps in ubuntu?

You can run this command in terminal

apt-get source gcalctool

The files will be placed in your /home directory


Scroll on touch pad is not working, Lenovo G50

Thx Fabby for the comment, that solves my problem with dkms but touchpad still was not working.
I just was able to solve it by installing Gpointing Device Settings from Ubuntu Software Center and enable scrolling on touchpad from there.


How do you end all processes called by a shell file

If pstree $(pgrep a) lists all the descendant processes of a you can send SIGTERM to all of them (includig a.sh) with:

kill $(pstree -p $(pgrep "a.sh") | awk -F"[)(]" '{for(i=2;i<=NF;i+=2)print $i}')

If that's not the case and neither kill -$(pgrep a) (notice the -) nor pkill -P $(pgrep a) can help I suggest you add a line to the beginning of the scripts and append its PID to a single file like this:

echo $$ >>/path/to/the/pidfile

This way you always have a list of PIDs available to kill with a simple:

kill </path/to/the/pidfile


How to add a launcher to a program/script inside my home dir?

The panel launchers don't do the same expansion of special characters as bash does, so ~ and $HOME don't do what you think...

The easiest solution is probably to use bash -c "~/bin/foobar.sh" as the command.


Attempt to re-install ubuntu-software fails: "no installation candidate"

I don't think Ubuntu Software Center has that name for its package; when I entered the command apt search, I didn't got that package name in the results:

$ apt-cache search software-center
app-install-data - Ubuntu applications (data files)
software-center-aptdaemon-plugins - The aptdaemon plugins for software-center
ubuntu-kylin-software-center - Software maintenance management tools

The Software Center package is named gnome-software (if you're using the GNOME desktop) on Ubuntu 18.04

$ apt-cache search gnome-software
gnome-software - Software Center for GNOME
gnome-software-common - Software Center for GNOME (common files)
gnome-software-dev - Software Center for GNOME - development files
gnome-software-doc - Software Center for GNOME - documentation
gnome-software-plugin-snap - Snap support for GNOME Software
gnome-packagekit-session - Transitional package (gnome-packagekit-session -> gnome-software)
gnome-software-plugin-flatpak - Flatpak support for GNOME Software
gnome-software-plugin-limba - Limba support for GNOME Software
libflatpak0 - Application deployment framework for desktop apps (library)

So if you want to reinstall it, just type

sudo apt install gnome-software


scap-workbench package for Ubuntu 20.04.1 LTS

This worked for me on 20.04.1
Note: markh, the user that asked this question, had already solved this as shown in the comments. I've just formalised it into an answer for future visitors.
I downloaded a tarball from releases on the Github page: https://github.com/OpenSCAP/scap-workbench/releases but you could also choose to clone the Git repo.
I installed these packages, some were already present on my system but that's fine.
apt install build-essential cmake libopenscap-dev lxqt-openssh-askpass qtdeclarative5-dev libqt5xmlpatterns5 libqt5xmlpatterns5-dev

asciidoc is not required if you download the tarball but you should install it if you used the Git repo so that you have documentation generated
apt install asciidoc

Then follow the readme:
mkdir build ; cd build
cmake ../
make

For me, make finished with
[100%] Linking CXX executable scap-workbench
[100%] Built target scap-workbench

I can now run the workbench from the build directory with
./scap-workbench


After having installed the package, log out and log in again.
Go to Settings -> Region & Language
In the Input Sources section click the + button and add Bangla (Avro Phonetic) to your list of input sources (you find it in the "Other" section or, if you have generated a Bangla locale, by clicking a Bangla submenu)

After that you can switch to Avro Phonetic - either via the input source menu in the top bar or by using the Super+Space shortcut - and start typing.

P.S. And no, since you are on Ubuntu, don't bother with IBus Preferences.


Convert TuxGuitar Drum Track to Addictive Drums

From: http://www.xlnaudio.com/forum/viewtopic.php?t=704

"Ok, then you can use the drum map available in the "User area/User Downloads" area! This will remap the midi from GP (which I guess is GM compatible) into the AD keymap.
You can also drag'n'drop files from AD's beat library into Cubase to build your drum tracks, 3600 beats and fills recorded by a real drummer!"


I never got to resolve this but took some time to test the modem on different distributions.

The modem doesn't work on following:

Ubuntu 16.04
Fedora 23
openSUSE 13.2
Ubuntu 14.04

Modem works on:

Kubuntu 16.04
Ubuntu 15.04
Ubuntu 11.04

I decided to switch from  Ubuntu 16.04 to Kubuntu 16.04. Now the modem works perfectly,


How to pass command-line arguments to atd init script in Ubuntu 16.04

What you're looking at there is an old-style SysV init file. Although systemd provides a mechanism (for backward compatibility) to start services via such files via a sysv init compatibility mode, Ubuntu 16.04 does not appear to do so in this case, so your changes to the init file are simply ignored - I'm not sure why the file is still present.

Instead, the atd service is started directly by systemd, using the unit file /lib/systemd/system/atd.service. However, rather than editing that file directly, you should use systemctl edit to create a custom configuration as described in @muru's excellent answer How do I override or configure systemd services?

Specifically,

sudo systemctl edit atd

then add for example

[Service]
ExecStart=
ExecStart=/usr/sbin/atd -l 7.5 -f

Save and quit, then restart the service unit

sudo systemctl restart atd.service

After that you can confirm your change has taken effect using

systemctl status atd.service

You should see something like

● atd.service - Deferred execution scheduler
   Loaded: loaded (/lib/systemd/system/atd.service; enabled; vendor preset: enab
  Drop-In: /etc/systemd/system/atd.service.d
           └─override.conf
   Active: active (running) since Sat 2017-06-10 09:38:30 EDT; 8min ago
     Docs: man:atd(8)
 Main PID: 17247 (atd)
   CGroup: /system.slice/atd.service
           └─17247 /usr/sbin/atd -l 7.5 -f

Jun 10 09:38:30 xenial-vm systemd[1]: Started Deferred execution scheduler.


How to create an app launcher/app shortcut in Gnome Shell?

How it definitely does work is:

copy an existing /usr/share/applications/application.desktop file
edit the names of the app, and app path and icon path accordingly.
save it as xyz.desktop

You'll have a working launcher.


Running lubuntu 14.04, easiest, fool proof way, to create a desktop shortcut and to execute sh file from desktop?

First Option:

Right click the sh file on the desktop
Choose Properties
Go to the Permissions Tab
Checkmark the box that says "Allow Executing File as a Program"
Go to the Open With Tab
Choose a Terminal-Looking Icon

Second Option:
Install nautilus-open-terminalnautilus-open-terminal package from the universe repositories and run the extra command to configure it:

sudo apt-get install nautilus-open-terminal

   nautilus -q && sleep 1 && nautilus -n

When you right click the file on the desktop, there should be an option that says Open in Terminal


Problem installing g++ ccompiler on Ubuntu 14.04

Apparently apt-get doesn't know about gcc.
If apt-get knows about a package whose name is g++, it won't attempt to to interpret g++ as anything but the name of a single package. (In contrast, I can reproduce the behavior you're seeing by attempting to install the similarly named nonexistent package q++.)
There are two likely causes of apt-get not knowing about the g++  package:

No software source providing g++ package is configured to be used.
A software source providing g++ is configured to be used but the information about what packages are available for installation hasn't been updated since then.

If it were the second reason, you could just run sudo apt-get update. But I think it's more likely the first one.
Make sure main is enabled.
g++ is provided in the main repository component. This should pretty much always be enabled, but perhaps it is not.
Many of the packages necessary for a working Ubuntu system are provided by the main component (this is the software maintained directly by Canonical rather than by the larger community, and it consists mostly of core software important to many Ubuntu systems). Furthermore, some of the packages apt-get listed as installed, such as python-gconf, are in main.
So I think what happened was that main got disabled recently, probably by accident. apt-get knows about software from main that is currently installed because it can see that it's installed. But if main is disabled, apt-get doesn't know about any software from main that you don't have.
To check if main is enabled, and re-enable it if it's not, open Software & Updates (called Software Sources on previous versions of Ubuntu). One way to open this is to click the Settings... button in the Software Updater (called the Update Manager in old versions of Ubuntu).
Then make sure the box labeled "Canonical-supported free and open-source software (main)" is checked.

If it already was, then most likely I have guessed wrong about the cause of your problem. If it was not already checked, check the box (you may need to enter your password) and click Close. You'll be told "The information about available software is out of date"; click the Reload button.

If this is an Ubuntu Server installation or other system without a GUI, see Kangarooo's answer to How do I enable the "Universe" repository? (just enable main instead of universe).

Then try installing g++ again.
Try a different APT mirror.
If the main component was already enabled, maybe there's something wrong with the APT mirror you're using. Especially if you're not using one of the official mirrors (us.archive.ubuntu.com, with us replaced with your "country code"), I recommend trying a different mirror, an official one if possible.
You can set your APT mirror in Software & Updates as well. Just change it in the drop-down menu labeled "Download from".

As when enabling a software source, when you quit Software & Updates after changing your download server, you'll be prompted that software information is out of date and you should click Reload. Then see if g++ can be installed.

If this is an Ubuntu Server installation or other system without a GUI, see How do I change mirrors in Ubuntu Server from regional to main?

Further troubleshooting.
If it still can't be installed, then you should edit your question with more information to help troubleshoot the problem.

Provide the contents of /etc/apt/sources.list. One way to do this is to copy the complete output of the command cat /etc/apt/sources.list and paste it into your question. Select it and press Ctrl+K to format it properly.
Optionally, you might want to see if you can find and install the g++  package in the Software Center. If you can, great! More likely, maybe doing so will reveal some information useful to figuring out what's wrong.


Help adding network folder in Kubuntu 20.04

Why not just create what everyone else calls a Bookmark.
Right click an empty space on the left side panel of dolphin and select Add Entry
Give the network path to the shared resource: smb://server/share
Like this:

Then it will show up under Network on the side panel:


Unable to login via ssh to remote Ubuntu machine - connection refused

You don't seem to have a running ssh server. If this is a fresh installation, it is likely that none is installed.

Install an ssh server.

sudo apt-get install openssh-server

If the server is already installed, start it:

sudo service ssh start

You should now be able to log in normally.


What packages/programs should I install to get better graphics and performance on gaming?

If you installed the driver for your videocard with additional hardware you are getting the best graphics performance you can.

You get some extra software where you can tweak settings (for amd/ati is it called AMD/ATI Catalyst:

and for nVidia:

please insert better image if available

It is important to note that it depends on what game you are talking. If it is native you probably need to depend on the ingame settings. If it is a game that you play with wine every game tends to have specific settings in wine that improve quality or speed but there are so many options it is impossible to tell. You need to rely on wineHQ for those games. And this, looks to me, beyond AU and more suited for wine forums.

Regnum Online (plays natively) has several ingame settings to improve quality over performance. Eternal Lands plays without problems at full quality.
A gane like Rose Online (wine) does not work well with my videocard and I need to keep it on lowest graphics settings. I got lots of black images (mainly floor) if I play with high perfomance.

All in all: Ubuntu is not really suited to play Windows games. But Valve is working in it ;)


How do I get cron to run my bash script which references node?

Although all the comments were helpful to was @muru's suggestion to log the result of the script which helped me the most - so make sure to give that one an upvote!

I ended up logging the result of each operation inside the script which immediately made it clear the issue was not cron running the job but rather that node was not available to the cron environment. I also updated my crontab to make the shell default to bash but this was not necessary to have the job run.

This final script works however it is still unclear to me why line 3 fails for cron but succeeds in a bash terminal, I will ask a new question for that particular issue.

Crontab:

# make default shell BASH
SHELL=/bin/bash

# start litecoin daemon on boot
@reboot /opt/litecoin-0.14.2/bin/litecoind

# check every minute to see if block scrape running and restart it if not
* * * * * /home/grayedfox/github/blockscrape/restartBlockscrape.sh

Bash script:

#!/bin/bash

NODE="$(which node)" # <-- output in terminal is as expected (gets node version in use) but is blank in cron job
PROCESS="/home/grayedfox/.nvm/versions/node/v8.9.4/bin/node /home/grayedfox/github/blockscrape/main.js"
LOGFILE="/tmp/log.out"

export BLOCKSCRAPECLI="/opt/litecoin-0.14.2/bin/litecoin-cli"

# source $HOME/.bashrc # <-- even after sourcing .bashrc, line 3 returns nothing

if pgrep -f "$PROCESS" > /dev/null; then
  echo "Blockscrape is doing it's thing - moving on..." >> $LOGFILE
else
  echo "Blockscrape not running! Starting again..." >> $LOGFILE
  echo "Nodepath: $NODE" >> $LOGFILE
  echo "Process: $PROCESS" >> $LOGFILE
  $PROCESS >> $LOGFILE
fi


How to run and where to save a downloaded package on Ubuntu?

The easiest way is apt-get, but this answer only deals with packages where you have downloaded something through another means.

If it's a .deb file, you can just double click on it. It will open Ubuntu Software Centre, and let you install it.

If it's an archive, you should first unpack it. After that, you typically need to install it from Terminal.

I recommend first getting this neat tool:

sudo apt-get install nautilus-open-terminal

Then restart Nautilus

nautilus -q

Then navigate to the folder in which you have unpacked your archive.

Typically there will be a "Readme" file inside the folder with instructions on how to install.

Sometimes there's a file called Install.sh or something like that.

Read the readme file. Now you can use that neat tool I told you about. Right click somewhere in the folder, and click "Open terminal here". Then follow the instructions from the readme file.

In some cases you have to compile the application from source.


Install Redis using a bash script, setting configuration files

Yes it's possible, but you're going about suboptimally. It's a batch process, so don't use nano, use text-processing tools. Instead of prefixing each command with sudo, wrap the whole thing in a script, and use sudo to execute the script.

Something like (by "Something like", I mean "I have not tried this,
nor installed redis-server. I view this as another example of a task I've done many times, but it should work") :

#!/bin/bash
if [[ $(id -u) != 0 ]] ; then
    echo "Must be run as root" >&2
    exit 1
fi
apt update
apt install redis-server
# Just in case, ...
systemctl stop redis-server
# Change "supervised no" so "supervised systemd"? Question is unclear
# If "#bind 127.0.0.1 ::1", change to "bind 127.0.0.1 ::1"
sed -e '/^supervised no/supervised systemd/' \
    -e 's/^# *bind 127\.0\.0\.1 ::1/bind 127.0.0.1 ::1' \
    /etc/redis/redis.conf >/etc/redis/redis.conf.new
# $(date +%y%b%d-%H%M%S) == "18Aug13-125913"
mv /etc/redis/redis.conf /etc/redis/redis.conf.$(date +%y%b%d-%H%M%S)
mv /etc/redis/redis.conf.new /etc/redis/redis.conf
systemctl start redis-server
# give redis-server a second to wake up
sleep 1
if [[ "$( echo 'ping' | /usr/bin/redis-cli )" == "PONG" ]] ; then
    echo "ping worked"
else
    echo "ping FAILED"
fi
systemctl status redis
systemctl status redis-server
exit 0


Is the Genius SlimStar 8000 compatible with Ubuntu?

You can see this review about Genius SlimStar 8000:

http://linuxhcl.com/browse/product?id=7769

  Works great, plug and play with Ubuntu Linux


Libre Office Impress opens in 11.10, but not in the launcher

It's an annoying bug.

https://bugs.launchpad.net/unity/+bug/1026426


Problem printing to a shared printer between ubuntu 11.10 machines on home network

OP answered the question

  Turns out that my firewall was blocking the printer connection from the laptop - opening port 631 solved the problem...


Switching the default session ubuntu 13.10

If you are using LightDM and Unity:
Log in at the tty terminal and run sudo nano /etc/lightdm/lightdm.conf. It should look something like this:
[SeatDefaults]
greeter-session=unity-greeter
user-session=ubuntu
autologin-user=username

To disable autologin, simply delete the line and save the file. You can also change the user-session to ubuntu-2d, which should resolve the black screen issue.
If you are using GDM and GNOME:
Log in at the tty terminal and run sudo nano /etc/gdm/custom.conf. It should look something like this:
[daemon]
TimedLoginEnable=false
AutomaticLoginEnable=true
TimedLogin=username
AutomaticLogin=username
TimedLoginDelay=30
DefaultSession=gnome

To disable autologin, change the AutomaticLoginEnable line to false and save the file. You can also change the DefaultSession to gnome-2d, which should resolve the black screen issue.


How to install Oracle 11g on Linux (non-VM)

In addition to the answer in How can I install Oracle 11g R2?

If you don't mind using 10g XE version (good enough for learning purpose), you can add the Oracle Open Source Software APT repository and use apt-get to install it.

Add deb http://oss.oracle.com/debian unstable main non-free

e.g.

echo "deb http://oss.oracle.com/debian unstable main non-free" | sudo tee /etc/apt/sources.list.d/virtualbox.list

and then

add the key

wget http://oss.oracle.com/el4/RPM-GPG-KEY-oracle  -O- | sudo apt-key add -
apt-get update && apt-get install oracle-xe

Start, stop and configure: /etc/init.d/oracle-xe {start|stop|configure}

See Installing Oracle Database XE on Debian, Ubuntu, and Kubuntu


If you have get the sqlmap from the repository use the following to update.

$ python sqlmap.py --update


Unmet Dependencies right after installing VLC

Try reinstalling libass4, there seems to be something wrong with the current installation.


Unable to launch steam/tf2 using nouveau

Give This a shot.

LD_PRELOAD='/usr/$LIB/libstdc++.so.6' steam

Hope it helps.

Steam has its own built in Runtime Library. You can find more information on it Arch Wiki

Ironically this works with Ubuntu as well.


Windows disappeared from grub menu after deleting Ubuntu partition

Do you have windows recovery disk? If yes, you can repair boot record from Windows recovery disk.

Use fixmbr command.


Debug Qt application on ubuntu with root permission using qt creator

Go to Tools-> Options-> Environment
In the Tab General under **System** Group there is a Terminal Option.
The default value is set to/usr/bin/xterm -e. Replace it with /usr/bin/xterm -e sudo or /usr/bin/gnome-terminal -x sudo.
Press Apply and OK Buttons.
Under Mode Selector click on Projects, select Run Option. Under Run Group Box select Run in Terminal.

Remember : sudo option must be there

Edit /etc/sudoers using sudo visudo

Next time when you run the program it will be invoked in a new xterm or gnome-terminal with Super User Permission and will ask for the root password.


All of the memory will be dedicated to the virtual machine when it is started. (I recommend that you buy more RAM if you want to use this VM regularly though.)
It is enough to just press Delete. That will delete the virtual machine entirely from your system.
Oracle VM VirtualBox is easily the best choice for running Windows 8.1 in a virtual machine. Just make sure you install the VirtualBox Guest Additions after you get Windows installed.
Ubuntu will (obviously) run slower when the VM is running. However, Ubuntu will not be slower when the VM is not running, as VirtualBox nor Windows will be running.


Which package do I need to use clang with asan for 32 bit?

As others have stated, this is a bug in the way that clang-3.7 and clang-3.8 were packaged: https://llvm.org/bugs/show_bug.cgi?id=22757

Luckily, fixing the broken packages after installation isn't hard.   You just need to download the correct libraries, and put them in the correct directory.

First, go to http://llvm.org/releases/download.html and find the matching version. I'm running 64-bit Ubuntu 14.04, so to patch clang-3.8 I want "Clang for x86_64 Ubuntu 14.04".  Download directly, or copy the right-click and "Copy Link Address" and use wget:

wget http://llvm.org/releases/3.8.0/clang+llvm-3.8.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz

Uncompress:

tar -xf clang+llvm-3.8.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz

Then copy the library files (using -n to avoid overwriting existing files):

sudo cp -n clang+llvm-3.8.0-x86_64-linux-gnu/lib/clang/3.8.0/lib/linux/*.a /usr/lib/llvm-3.8/lib/clang/3.8.0/lib/linux/

If desired, repeat for any older versions of clang you have installed, although note that if you are using a Linux kernel more recent than 4.1 with a clang version earlier than 3.8 you may encounter another bug with -fsanitize=memory: https://llvm.org/bugs/show_bug.cgi?id=24155


I think the problem is that you haven't got the dependencies for the program in question, as even though you have run ./configure there are just the files called makefile.in and makefile.am, whereas there should be a a file called Makefile without an extension.

If you run ./configure without the dependencies, it does not generate a makefile and then running make afterwards gives exactly the error you are getting:

make: *** No targets specified and no makefile found. Stop.

Therefore, download the build dependencies for your program by looking at the readme included in the download or if the program source is in the repositories and you have enabled the source repositories, run

sudo apt-get build-dep program

After obtaining the dependencies, run ./configure again and now make and make install should work as there will be a proper Makefile generated.

(You may also need to install such packages as build-essential which contains essential compiling tools)


flareget has moved to a new domain. Just go to http://flareget.com and click browser integration from the header menu. You can get plugin from their.  Perhaps the direct link is http://flareget.com/browser-integration-2


How to temporarily disable aa key on the keyboard after pressing it?

Try this in a bash script file:

#!/bin/bash

xinput test 11 |

while read pkc

        do
                if [[ "$pkc" =~ "key press   38" ]]
                        then
                                xmodmap -e 'keycode 38 = ';
                                sleep 0.5;
                                xmodmap -e 'keycode 38 = a A';
                fi

done

Change the number 11 in xinput test 11 to your keyboard device number. You can find this number by running xinput list. You might need to check if the id number is the right one for your keyboard. To do that choose the keyboard id numbers with slave keyboard in-front of them then check the id in the terminal by running xinput test id_number and press the a on your keyboard. If you get an output like key press   38 then this is the correct id number for your current keyboard and if no output, continue testing the other id numbers until you see output.
Change the nuber 38 in "key press   38" and xmodmap -e 'keycode 38 = '; and xmodmap -e 'keycode 38 = a A'; to the key code of the a key. You can find this number by running xev and pressing the a key.
Change the number 0.5 in sleep 0.5; to the desired period in seconds for the a key to be disabled.

Steps to creating and using the script file:

Create and open the file in an editor by running the following command in the terminal:

nano ~/no_aa.sh

Copy and paste the above code ( after modifying it ) into the editor.
Save the script file and exit the editor by pressing Ctrl + X then press Y.
Make the script file executable by running the following command in the terminal:

chmod +x ~/no_aa.sh

Run the script by running the following command in the terminal:

bash ~/no_aa.sh

Keep the terminal open and test the a key in other applications like writing in the LibreOffice writer.


What is the point of having asterisks before and after the search term while using the 'find' command?

Without it, you are asking find to search in your $HOME directory (~) for files that have name "bash"; the * characters allow for something|anything before and after the 'bash' which is a different meaning to 'bash' alone.

find ~ -name "bash"

would find a file named "bash", not not my_bash_script.  The * before and after 'bash' change the meaning and allow it to find a file named bash and my_bash_script,


I am trying to install Ubuntu 18.04LTS and stuck at grub terminal. What should I do now?

I copied this from
Stuck at GRUB command line

You got a problem with the bootloader. You should initialize kernel. First use command ls, then adjust the following commands according to it. In the place of hd0 write your disk and in 1 write your number.
FIRST, try only grub> boot

grub> set root=(hd0,1)
grub> linux /vmlinuz-4.4.0-38-generic
grub> initrd /initrd.img-4.4.0-38-generic
grub> boot

If you don't know what your version of the kernel is, write:

grub> linux /vmlTab
grub> initrd /inTab


Please follow these steps to create your installation media :
1.Download the .iso file from Ubuntu website.
2.Download a software named Universal USB installer.
3.Run it to create a bootable USB drive.
4.Use the bootable USB drive to test drive Ubuntu or install it.
If you want suggestion on how to install Ubuntu alongside Windows , please feel free to ask.
Hope this helps


Symlink for Currently Selected Alert Sound?

Workaround

Seems there are no schemas for setting the alert sound options those are available via GUI

Observations:

Sound theme can be set with gsettings

gsettings set org.gnome.desktop.sound theme-name 'mySoundTheme'

to see the current theme.. run gsettings get org.gnome.desktop.sound theme-name

Example:

$ gsettings get org.gnome.desktop.sound theme-name
'ubuntu'
$

when Bark is selected from the GUI, It uses same ubuntu theme but instead of the file /usr/share/sounds/ubuntu/stereo/bell.oga it uses /usr/share/sounds/gnome/default/alerts/bark.ogg

when Drip is selected it uses drip.ogg, in the same way for Glass and Sonar also.

In all the above 4 Selections, the system sound theme is constant which is ubuntu which is used by the Thunderbird.

When the option "Default system sound for new mail" is selected in Thunderbird it uses message.ogg file for new mails and bell.ogg file for alerts from the custom theme

Note that the names in some custom downloaded themes may vary for message.ogg and bell.ogg etc..

So the idea is to create 4 Custom Sound Themes with name bark, drip, glass & sonar..

to do so, just copy ubuntu directory and rename it with above names..

replace the files message.ogg and bell.ogg with the sounds you wish in all the four directories bark, drip, glass & sonar..

now you can choose the custom theme you want with gsettings command or via dconf-editor tool which can be installed with sudo apt install dconf-editor

gsettings set org.gnome.desktop.sound theme-name 'bark'
gsettings set org.gnome.desktop.sound theme-name 'drip'
gsettings set org.gnome.desktop.sound theme-name 'glass'
gsettings set org.gnome.desktop.sound theme-name 'sonar'

If you want to reset, run below command

gsettings reset org.gnome.desktop.sound theme-name

to remove the options from GUI for any accidental selection of "Choose an alert sound"

rename the file /usr/share/gnome-control-center/sounds/gnome-sounds-default.xml to anything you wish..

Tested in Ubuntu 18.04.2, Worked as intended.


The > operator redirects the output usually to a file but it can be to a device.  You can also use >> to append.
If you don't specify a number then the standard output stream is assumed, but you can also redirect errors:
> file redirects stdout to file
1> file redirects stdout to file
2> file redirects stderr to file
&> file redirects stdout and stderr to file
> file 2>&1 redirects stdout and stderr to file
/dev/null is the null device it takes any input you want and throws it away. It can be used to suppress any output.
Note that > file 2>&1 is an older syntax which still works, &> file is neater, but would not have worked on older systems.


Installing Ubuntu on HDD alongside with Windows 10 on SSD

No, you can pick "alongside" when it sees "unallocated space" but I would advice to manually set this up. I tend to put 25Gb in /, 10Gb in /home both on my SSD and the remainder to a data partition (on my HDD) where I store my personal files.
The 1st disk. The manual option lets you change it and will provide a drop down with possible locations. 2b: not that I am aware off.
Maybe, maybe not. I never needed to (I have a GTX1060). The installer crashed once on me but that was after the install was finished (at the "remove USB and reboot" part of the installation. 1 difference: I had both Windows and Ubuntu base on the SSD before I nuked Windows. Ubuntu benefits a lot from being on the SSD: I get a 7 seconds boot from it. With the HDD it is going to be bit longer to boot.


ubuntu Wubi SSD Windows 7 - New Linux instalation

No, Wubi is designed to try out Ubuntu without partitioning and runs a 'virtual disk'. If you have a 40 GB SSD, then you should install direct, not with Wubi.


Can I make Ubuntu graphics equivelant to Windows 7 with a hd 3000 chip?

Both operating systems should be able to be as crisp as each other but without a visual comparison (could you take a couple of pictures?) it's hard to say exactly what the problem is.

However there are two things that spring to mind:

If you're not using the "native" resolution of a TFT/LCD screen that would cause everything to not be as crisp as it's supposed to be. I don't know what your native resolution is but the Windows display properties should give you a decent idea of what you're aiming for.

With that information you should be able to use the Monitors tool in Ubuntu and match that resolution. If the same resolution isn't available, there's an issue that we need to deal with. Let me know and I'll write a follow-up on that.
You might just have font-hinting turned off. Sub-pixel hinting allows TFT displays to display things a lot more accurately by blurring parts of fonts into nearby pixels. This sounds like it would result in something less crisp, but it's actually very pleasant.

In 11.04 and its predecessors you can get to these settings by right clicking the desktop and, clicking display properties, clicking the fonts tab and then checking Subpixel Smoothing under the rendering section.

I have no idea how one does this in 11.10.


Interesting. I'd use awk

awk -F, -v seq="7,152,13,11,42,5,7" '
    BEGIN {
        n = split(seq, a)
        for (i=1; i<=n; i++) num[a[i]]=1
    }
    {
        n=0
        for (i=1; i<=NF; i++) {
            if ($i in num) n++
            if (n == 3) {
                print
                break
            }
        }
    }
' bigfile

Predictably, perl is much more terse

export seq="7,152,13,11,42,5,7"
perl -F, -lane '
    BEGIN {%nums = map {$_ => 1} split /,/, $ENV{seq}}
    print if scalar(grep {exists $nums{$_}} @F) >= 3
' file


Wifi Network is found, but cannot connect

You can try this driver

sudo add-apt-repository ppa:hanipouspilot/rtlwifi
sudo apt-get update
sudo apt-get install rtlwifi-new-dkms linux-firmware

and reboot.


Can't Control Brightness on HP Envy All-in-One 24-n014

In linux you can control screen brightness by writing to /sys/class/backlight/intel_backlight/brightness. Execute this command and enter password when asked:

echo 50|sudo tee /sys/class/backlight/intel_backlight/brightness

The brightness should become low. 50 here is the level of backlight you want. It's interpreted relative to a maximum value. You can see this fixed maximum value by executing cat /sys/class/backlight/intel_backlight/max_brightness.You can make a set of programs to modify brightness and assign keys to them using xbindkeys(this is what I've done). Ask if you need details.

Note: The path of the file can be a bit different based on your hardware. It will be somewhere in the /sys/class/backlight directory.


Can not read external hard disk with Ubuntu 14.04

I had the same problem earlier on and tried a few commands so I don't know which one actually did it but here is a list from my terminal history.

sudo e2fsck -y /dev/sda1
/dev/sda1 /media ntfs -ro
chmod /dev/sda1 -r
/dev/sda1 -r-w
sudo fdisk -lu
/dev/sda1 sodu fdisk -lu

Please note that some commands aren't real, just a mixture of commands I tried to run. In any case all of them did nothing until I restarted my PC.

Also take note to update your apt data with the cmd:

sudo apt-get update


why does ubuntu not recognise hard drive on windows 7

Looking at the dmesg output:
ata_piix 0000:00:07.01: >version 2.13
ata_piix 0000:00:07.01: >Hyper-V Virtual Machine detected, ATA device ignore set

Kernel was already patched ... but I guess we need a new Ubuntu release for it to work.
https://patchwork.kernel.org/patch/1473491/


Update for Ubuntu 18.04 and above
New installations of recent versions of Ubuntu does not use a separate swap partition any more. They use a swap file by default.
Original Answer
Ubuntu installation needs two partitions in their own formats. It won't work with FAT32.

Make sure you don't have any any important data in the external hard
drive. If you do, copy them some place else. After you select Something else, make sure you are modifying your external hard drive and not the internal one. The internal drive is usually /dev/sda. The external one can be /dev/sdb or /dev/sdc or something else.

Delete the existing FAT32 partition in the external hard drive.

Create two partitions. The first is called /. This is the main
partition where Ubuntu will be installed. Create format this
partition ext4. Leave 2 to 4 GB space in the end for the next
partition.

The second partition is called Swap. This is used as virtual
memory. Use the remaining 2 to 4 GB space to create this partition.
It should have the partition type Linux-Swap. It does not have any
mount point.

Make sure Device for bootloader installation: at the bottom points to your external hard drive. It can be /dev/sdb or dev/sdc or something else.
Hope this helps


Ubuntu 14.04.3 64-bit xbindkeys do not recognize mouse button depression

Well I made it work with the following modification:

"/usr/bin/xte 'mouseclick 2'"
control + b:1 + release

I do not know why this is not the case with keyboard shortcuts but for compound shortcuts consisting of keyboard and mouse buttons this is the case.


need helpto install gnome 40 on kubuntu 21.04

Gnome 40 is not officially supported in 21.04.
You can install it with a ppa, but it is not intended for productive use.
Please carefully read the description of the PPA before proceeding.

WARNING: GNOME 40 is not yet officially supported in Hirsute Hippo. This PPA is just for testing. It breaks sometimes, especially when I'm upgrading the packages.

Also, you need to manually update mutter and install gnome-session, etc.
You should regard the additional Installation Instructions after adding the PPA.
sudo add-apt-repository ppa:shemgp/gnome-40
sudo apt-get update


Ubuntu 17.10 - shortcut to show me window with all key. shortcuts?

I got so fed up with hunting for this page in the help that I made my own. Just cut & paste the following into spreadsheet/document and change the column widths to suit. Would be good to have similar help page on latest Ubuntu.
Launcher            Switching
Super (Press)   Open Launcher, displays shortcuts.      Alt + Tab   Switch between applications.
Alt + F1    Open Launcher keyboard navigation mode.     Alt + ` Switch between instances of current application.
Super + Tab Switch applications via Launcher.
Super + 1 to 9  Same as clicking on Launcher icon.      Workspaces
Super + Shift +1 to 9   Open new window of the app.
Super + S   Spread workspaces.
Activities          Ctrl + Alt + Up or Down Cursor  Switch workspaces.
Shift + Ctrl + Alt + Cursor Keys    Moves focus to different workspace.
Super (Tap) Open Activities Overview.
Super + A   Open Apps.      Windows
Ctrl + Tab  Switches between Activities.
Cursor Keys Moves the focus.        Ctrl + D    Minimise all windows.
Enter & Return  Open currently focused item.        Super + Up  Maximise the current window.
Super + Down    Restores or minimises current window.
HUD & Menu Bar          Super + Left or Right Cursor    Snap window to Left or Right
Alt + F4    Close active window
Super + F10 Open Application Menu.      Alt + Space Opens accessibility menu.
Cursor Left or Right    Moves focus between indicators.
Cursor Left or Right    Moves focus between indicators.     Tabs
Cursor Left or Right    Moves focus between indicators.
ctrl + Tab or Up or Down Cursor Move between tabs (e.g. in Web Browser)
ctrl + w    Close tab.


What does the syntax of pipe and ending dash mean?

The pipe command (|) means take the output of the command on the left and pass it in as input to the command on the right.  So, you are almost correct in your understanding of what

curl -sL https://blabla | sudo -E bash -

does.  What you are missing is capturing the output of the first command, and passing that into the second command.  What you have above needs to be something like the following:

curl --silent --location https://blabla >/tmp/output
sudo -E bash - </tmp/output

The dash (-) at the end of the second command is just telling bash to read in standard in and process it.  So,

sudo -E bash - </tmp/output

is equivalent to

sudo -E bash </tmp/output

The "-E" option is actually associated with sudo, not with bash.  Running the command:

man sudo

shows that -E preserves the environment.

Hope this helps clarify some things for you.

Good luck with learning linux!  :)


Cron jobs no longer working after upgrade from Ubuntu 16.04 to 18.04

First, I ran the command on Ubuntu.

crontab -e

In the second step I did this:

* * * * * cd /var/www/html && php artisan schedule:run >> /dev/null 2>&1


Does UEFI support mean Wubi will now work on laptops shipped with Windows 8?

No.

Ubuntu already supports secure boot, as mentioned in the real source of the news:

  Does this mean Linux distributions can now support Secure Boot?
  They've actually been able to for a while. Ubuntu shipped with Secure Boot support last October, and Fedora shipped with Secure Boot support in January. Both used Shim rather than the Linux Foundation loader, and Shim's also being used by a variety of smaller distributions. The LF loader is a different solution to the same problem.

Wubi doesn't work on UEFI systems because it uses grub4dos which doesn't support GPT  (GUID partition table) disks. This is unrelated to secure boot, other than the fact that Secure boot requires UEFI. That's the first problem.

The secure boot would be the second problem to solve since whatever solution provided would have to be signed to be useful (I would guess since I claim no expertise on this).

The third problem would be that someone should be working on it and - unless it's top secret - no information I have seen indicates that anyone is addressing the problem. The bug report has seen no change from Wishlist and remains Unassigned: https://bugs.launchpad.net/wubi/+bug/694242


xubuntu power pc low requirements iso mirror

Just recently put Lubuntu 12.04 on my old imac g3 500.  It was a bit tricky, but here's what happened with me.  Had to start with 12.04 for ppc.  No GUI when I was done, only a command line.  It asked me if I wanted to upgrade to 14.04.1 and since I really hadn't gotten what I wanted, I went ahead with it.  Loaded up nicely and now have a good GUI.  Some minor graphics issues, but very workable.  I did it with 256 MB RAM.  Have since upgraded to 1GB, which was a pretty minor cost and it runs way faster.


Please read this document, this issue has been adressed there:

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


I suggest you make use of L2TP IPsec VPN package in the repos. It makes things much easier.

sudo apt-get install l2tp-ipsec-vpn


This is impossible. The Ubuntu ISO must be booted from the BIOS or EFI system.

Open another question about failure to boot the stick/DVD.


You need to know which partition you installed on. In those instructions you listed, you're setting root to /dev/sda3 to load the kernel, and then saying that root is /dev/sda1. Which is normally used if you have a separate boot partition on /dev/sda3 with / (root) on /dev/sda1 - either that or you're entering instructions from the website without understanding how they apply to your setup - because this isn't a normal setup.

That first menu you see - are you sure it's a Grub menu or is this in fact a Wubi install and it's really a Windows Boot Manager screen. i.e. did you install from within windows? (because that matters).

If it's a Windows boot manager, then you need to check this out: Ubuntu 12.04 (Wubi) not starting - root.disk corrupted

This answer was too long for comments (even though I'm asking for clarification), but you should edit your question with more information and the comment when you're done. Then I'll either delete this or adjust the answer as required.


I used TwinView on 10.10 without problems, so I think it's just an issue with old settings.

Try deleting Xorg.conf altogether (that's okay to do, because no Xorg.conf file is default now), restarting, and then checking that your Hardware Drivers is selected on the recommended one, and setting up TwinView via the Nvidia tool once again.


Replace Ubuntu 16.04 by Windows (7 or 8.1)

General answer (is true for installing any OS):

You need an installation media (dvd, usb, recovery partition) and boot from it. You boot from it by editing your BIOS and setting it to do so or by selecting the device that has the media (also from BIOS). How you do that  depends on the BIOS and how you want to install. You might also need a(n) (U)EFI partiton (also created from BIOS).

If you have the installation media in your system and it still boots to the currently OS installed the system does not know you want to boot from some other media.


Yes, but not on a FAT filesystem. ssh will only use private keys with permissions set to 400 or 600, but FAT doesn't truly allow for this.

To get around this, I made several partitions on my USB key. This gives me a Linux partition for my OpenSSH keys, and a FAT partition for my PuTTY keys. I can then use ssh-add/pageant to load the appropriate key, and connect without specifying my key location.


I found this which suggested to me the following work around. In the file /usr/bin/scratch I modified the line

VMOPTIONS="-encoding UTF-8 -vm-display-x11 -xshm -plugins /usr/lib/scratch/plugins/:$SQ_DIR/"

to look like this (i.e. I removed the -xshm flag)

VMOPTIONS="-encoding UTF-8 -vm-display-x11 -plugins /usr/lib/scratch/plugins/:$SQ_DIR/"

This doesn't fix the bug but let's you forget about it. Hope it helps.

Kind regards,

/Adam


It would appear that the PPA for gearman-job-server is a little broken. I'd suggest reporting this as a bug here:

https://bugs.launchpad.net/gearmand/+filebug

That said, there is a working version of gearman-job-server in lucid, v0.10. Its a little older and doesn't have libdrizzle support, so persistence will have to be through other means, but it should work.


What's the best way to report a kernel panic bug

Ubuntu wants us to use apport for reporting bugs. You will be asked a bunch of questions to provide information (so that takes part of the information you need to collect to file a bug report).

This is the official bug reporting method (page has not yet been updated to include links for Natty) with step by step how to in getting you to filing it.

There is just 1 small piece about kernel bugs:

For sound, X drivers, and kernel bugs: please open a new bug instead of commenting
on a similar bug: chances are that your hardware does not match the existing bug's
hardware, so the bug will not be addressed.

Good luck and please leave a comment if the answer left any questions :)


Apache SetHandler not working with multiple PHP version

This seems to fix the problem
<FilesMatch \".+\.ph(ar|p|tml)$\"> # Apache 2.4.10+ can proxy to unix socket
   <If \"-f %{REQUEST_FILENAME}\">
      SetHandler \"proxy:unix:/run/php/php7.4-fpm.sock|fcgi://localhost\"
   </If>
</FilesMatch>


The output of apt-cache policy php5 clearly shows that the package php5 was pinned to a specific version.

php5:
  Installed: 5.3.10-1ubuntu3
  Candidate: 5.3.10-1ubuntu3
  Package pin: 5.3.10-1ubuntu3

You have to unpin the package, so that it would be upgradeable.

Run the below command to unpin the php5 package,

sudo apt-mark unhold php5

Then try to update that package,

sudo apt-get install php5


You will have to use data recovery software to try to recover the data from the hard drive. Check out these other similar questions:

How to recover deleted files?
Can files/directories deleted with rm be restored?


Ok, it was resolved by the help of intel community. I sourced the *.csh (I am using tcsh) files in bin directory where I installed my compilers. They accepted "source" command with "intel64" as the parameter so it resolved it.


There is no "trial" login or password. The login is the name entered when installing Ubuntu and the password is also set when installing the operating system the first time.

If you haven't installed Ubuntu yet and are running it from a flash drive or DVD, there is no need for a password since the system just boots up then.


From your question it looks like you are using EncryptFS for something like an encrypted /Home partition and can not open it.

  ecryptfs-unwrap-passphrase /dev/sda7 Passphrase:     # i entered the
  correct passphrase here...

Because your partition is not using LUKS, it will not show as a LUKS partition for the use of luksDump. Instead, EncryptFS is a stacked filesystem that uses metadata headers much like LUKS does but with a major drawback, it only uses one password. Recovering that password may not be much hope as covered in their FAQ: http://ecryptfs.sourceforge.net/ecryptfs-faq.html#lostkey

I would keep trying your last couple of passwords and if you manage to open the partition, migrate the data to LUKS, a much more versatile encryption system.


I need a simple proxy app to modify user agent header.

You should be able to do this using mitmproxy (may need some Python scripting) or Privoxy.

In Privoxy, you can just set the hide-user-agent setting.

I wonder if that will actually fix it.  What a horrible ISP.


can I use bind9 as a DNS to resolve to an external IP?

Yes sure you can.

for your case you have just to insert the external IP in forwarders
 in the /etc/bind/named.conf.options file

 Sudo nano /etc/bind/named.conf.options
 forwarders {
 # Give here your IP
  };

Please read this to learn the full configuration of bind9 in Ubuntu. How do I do a complete BIND9 DNS Server Configuration with a hostname?


Plugin the USB stick.
Check the partition in the USB for errors:

sudo fsck /dev/sdb5

You might have to change the partition name (sdb5). Look in the error window again when you mount it.


How can I recover the passphrase (not the password) of sda5_crypt

If, when installing, you chose to encrypt a FULL PARTITION, most likely you are using LUKS encryption and not ECRYPTFS.

With LUKS there is no passphrase wrapping AFAIK and that's why

ecryptfs-unwrap-passphrase .ecryptfs/wrapped-passphrase

does not work when run from your home directory.

In the Ubuntu setup, ECRYPTFS encrypts just a folder. you can choose whether that folder is going to be your home folder or a Private folder inside your home folder.

Just to make sure you are not using ECRYPTFS, look for a hidden folder, in your home directory, named .ecryptfs (could be a symlink). In the case there is no such a folder, you are not using ECRYPTFS and the wrapped passphrase does not exist.


How can I make Nautilus file manager remember my open tabs?

(Very) limited command line options of nautilus

Unfortunately, nautilus does not offer command line options to read the opened directory of its windows, nor does it have any option to send an existing window to another directory. Since you cannot remember what you do not see, we are running out of options at first sight.

However

We do have xdotool, not to do what nautilus doesn't, but to at least fake the behaviour that you describe. We can do that in such a way that "you would believe it" if you didn't know how it is done.

Although the solution below does not survive a restart, "remembering" (possibly tabbed) window and all opened directories is very well possible within one session. Since you mentioned to be interested in that as a "second choice", here it is.

How it works; the process

Although We cannot close a window and preserve its tabs and opened directories, we can make an existing window seemingly (and completely) disappear, with the help of xdotool.

If we subsequently change the behaviour of the nautilus launcher in such a way that it first looks for possible unmapped windows to remap, before opening a new one, effectively we have exactly the same behaviour as if nautilus would remember the last used window(s).

How to set up

Copy the script below into an empty file, save it as remember.py

#!/usr/bin/env python3
import subprocess
import os

app = "nautilus"

wfile = os.environ["HOME"]+"/.unmapped_"+app

def get(cmd):
    # simply a helper function
    return subprocess.check_output(cmd).decode("utf-8").strip()

def check_windowtype(w_id):
    # check the type of window; only unmap "NORMAL" windows
    return "_NET_WM_WINDOW_TYPE_NORMAL" in get(["xprop", "-id", w_id])

def get_pid(app):
    # (try to) get the pid of the application
    try:
        return get(["pgrep", app])
    except subprocess.CalledProcessError:
        pass

def get_matches(pid):
    # get the window list, select the valid (real) app's windows
    ws = get(["wmctrl", "-lpG"]).splitlines()
    matches = [w.split() for w in ws if pid in w]
    return [w for w in matches if check_windowtype(w[0]) == True]

try:
    # try to read the file with unmapped windows
    wininf = [l.split() for l in open(wfile).readlines()]
except FileNotFoundError:
    # if there are no, unmap the current app's windows
    filebrowserwins = get_matches(get_pid(app))
    if filebrowserwins:
        open(wfile, "wt").write(("\n").join((" ").join(l) for l in filebrowserwins))
        for w in [w[0] for w in filebrowserwins]:
            subprocess.Popen(["xdotool", "windowunmap", w])
    else:
        arg = "--new-window" if app == "nautilus" else ""
        subprocess.Popen([app, arg])
else:
    # re- map unmapped windows
    for w in wininf:
        wid = w[0]; geo = w[3:7]
        subprocess.call(["xdotool", "windowmap", wid])
        subprocess.Popen(["wmctrl", "-ir", wid, "-e", "0,"+(",").join(geo)])
    os.remove(wfile)

The script needs both wmctrl and xdotool:

sudo apt-get install wmctrl xdotool

Copy the nautilus launcher from /usr/share/applications to ~/.local/share/applications

for 15.04 and later:

cp /usr/share/applications/org.gnome.Nautilus.desktop ~/.local/share/applications

for earlier Ubuntu versions:

cp /usr/share/applications/nautilus.desktop  ~/.local/share/applications

open the local copy with gedit:

gedit ~/.local/share/applications/org.gnome.Nautilus.desktop

(in case of 15.04 +)

and look for the first line, starting with Exec=. Change it into:

Exec=python3 /path/to/remember.py

Save and close the file.
Create a keyboard shortcut with the same command: Choose: System Settings > "Keyboard" > "Shortcuts" > "Custom Shortcuts". Click the "+" and add the command:

python3 /path/to/remember.py

Now log out and back in

How to use

The use is very simple:

To open a window, do as usual: click on the nautilus launcher. Tab the window as you like:

To close a window definitively, close it by clicking on the window's "close" (x) box.
To preserve the window(s) + all its tabs:
press the shortcut key. The window(s) will vanish (seemingly close).

Next time when you click the launcher, the nautilus window(s) will appear exactly like the last time, even the window position(s) will be preserved.

That's it

Note

In the tests I ran, I couldn't find any downside (14.04). If you
might run into any, please mention!
In the How to use -section, I suggested to click on the nautilus icon to remap possible unmapped windows. The shortcut key will do the same however, so you can see what works the most convenient for you. Also, if you opened a folder by double click after you unmapped on or more folders, unmapped folders still will be remapped by the shortcut.

EDIT:

Nemo users

Nemo users can equally use the solution above, but:

In the head section of the script, change:

app = "nautilus"

into:

app = "nemo"

In point 3, use:

cp /usr/share/applications/nemo.desktop ~/.local/share/applications

In point 4, use:

gedit ~/.local/share/applications/nemo.desktop

Tested, proved to be working with nemo


Use built-in program disks from ubuntu launcher, select your pendrive, click on gear icon, and select benchmark option to run read/write speed test


How am I connecting to Ubuntu 14.04 server via FTP? No vsftpd or proftpd installed

The ftp package is just a client. You are connecting using sftp if you are using keys, which is part of openssh-server.

Creating new unix user, you will allow this user to log in also over sftp, if you have default configuration.


Dell M6800 with Windos 8.1 on part-1, cannot run if Ubuntu and Fedora are 2nd and 3rd OSsen?

For me, the fix was a sub-option of the UEFI which was to boot with the UEFI in a 'non-safe' mode.  This allows me to boot both Win8.1 and Ubuntu 14.04, whereas with the legacy option or the EUFI 'safe' option I cannot boot both systems correctly.  My system is a dell 15r, and at boot time there is an option in BIOS to choose to boot from alternate sources.


You are using Unity as window-manager ?! Check please if xfce4 has the same result like in unity. It could be that xfce4 is working better together with usb-keyboards and/or usb-mouses.


Installed 13.04 alongside Windows 7, now I cant boot into Windows

You definitely havent installed it into same partition as it would have deleted Windows.
Linux uses much better partitionsystemwhch windows cant use. important when manualy adjusting the partitions rather then using automatic opton offered is to keep windows as first partiotion as windows's boot manager cant find its files if they are elswhere
you do not need to format disk. but that would be the quickest way

you can skip the  boring solution and jump to recommended way

he most effective way would be toswat partitions very complex but possible
the longer but easier way is to copy  content of windows's home directories into ubuntu, using some live distro for example rescuecd or gparted CD, you can do it using gparted
deleting windows partition and moving all the partitions to the right (this will take computer hole day to go through, so go for a walk in a park.

once done reinstall windows (only up-to the stage where it wants to restart.

now use liveCD from which you installed your ubuntu and install grub again.

boot into grub and copy your old home directory back.
reboot and chose grubs entry for windows and finish windows installation...

Eesy and recended

install virtualbox
copy full content of the windows partition into it

if it doesn't start working strait away make new installation choosing not to format drive  in the process.

don't forget that instead of usual drivers you will need guest additions

now you can remove windows partition and using some live distro increase linuxes partitions size...


How to install firefox on AWS ubuntu codebuild?

I have finally worked out that in the AWS buildspec.yml file, these were the lines I needed:

- apt-get update && apt-get install -y firefox wget
- export FIREFOX_BIN=/usr/bin/firefox

Now, I can run my Angular project Karma tests with Firefox on AWS codebuild.


How to do a fresh re-installation of Ubuntu safely on dual boot?

When Ubuntu 13.10 becomes stable and released, then you can upgrade to 13.10 without the need of re-installing. You should see the message in update-manager when the upgrade becomes available.

If for your own reasons you want to re-install, then first you must create a Live USB with 13.10 (I prefer USB, you can create DVD if you want). After that, boot from the USB you've made and at the installer window probably you will see the option of upgrade Ubuntu 13.04 to 13.10 . Because the installer now is changing I cannot upload a picture of it because I don't know the final form. Either way the option of upgrade should exist.

Another way is through something else option. There you should know for sure the partition that you have installed Ubuntu 13.04, then click on this partition and then click change. Mount this partition to root (/) and proceed with the installation. You should click the Format box also, in order to have a clean installation of 13.10. Be aware that if you don't have a separate /home directory, all your personal files will be deleted.

In any of above ways you should not have any problem with Windows 7. Grub will be reinstalled and will recognize automatically the Windows 7 installation.

If for any reason you have a problem with grub (or grub menu) , use boot-repair to repair the grub.


Is there easy and safe way to resize /boot

If it is full you can uninstall older Linux images so you can avoid the procedure of resizing/moving partitions:

Do ls /boot and check the "older" versions of the kernel. You can do uname -r to see your current kernel version (the one you should NOT touch!). Then for each older version run

sudo apt-get remove linux-image-<version>

where <version> is the version of the older image. For example, ls /boot gives me:

abi-3.8.0-21-generic         initrd.img-3.8.0-22-generic
abi-3.8.0-22-generic         lost+found
config-3.8.0-21-generic      memtest86+.bin
config-3.8.0-22-generic      memtest86+_multiboot.bin
Debian                       System.map-3.8.0-21-generic
extlinux                     System.map-3.8.0-22-generic
Fedora                       vmlinuz-3.8.0-21-generic
grub                         vmlinuz-3.8.0-22-generic

Say I want to remove version 3.8.0-21-generic (which is older than my current one) then I run

sudo apt-get remove linux-image-3.8.0-21-generic

After it has been uninstalled I run

sudo apt-get autoremove

in order to finish the removal completely (for there might be things to be 'autoremoved').


Limit user1 access to allow wired connection only, allow user2 access to wired and wireless access

Easiest way I've found would be to (on a sudo capable account) create a Systemd service file in /etc/systemd/system/ with something like the following (replacing <user> and <wireless interface> with their respective values):
[Unit]
Description=Disable wireless for user <user>
After=network-online.target
Wants=network-online.target

[Service]
Type=oneshot
ExecStart=/usr/sbin/iptables -A OUTPUT -o <wireless interface> -m owner --uid-owner <user> -j DROP
ExecStop=/usr/sbin/iptables -D OUTPUT -o <wireless interface> -m owner --uid-owner <user> -j DROP
RemainAfterExit=yes

[Install]
WantedBy=default.target

Name it something like disable-wireless-<user>.service, then run sudo systemctl daemon-reload followed by sudo systemctl enable --now disable-wireless-<user>.
You can find a list of network interfaces on your system via the ip link command, which will display something like this:
$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether ??:??:??:??:??:?? brd ??:??:??:??:??:??
3: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DORMANT group default qlen 1000
    link/ether ??:??:??:??:??:?? brd ??:??:??:??:??:??

In this case, wlp3s0 would be the wireless interface.


How to install drivers for macbook pro 2018?

gcc: Command not found means that gcc is not installed.
Run
sudo apt install build-essential

to install required packages.


How to have DISPLAY 'automatically' set by Eclipse's remote debugging session?

One easy solution is that you can simply prepend the environment variable when launching eclipse:

DISPLAY=localhost:N.0; eclipse

You could then add an alias for this, for example:

alias eclipse-remote='DISPLAY=localhost:N.0; eclipse'

and put it in .bashrc (or .bash_aliases).  Make source you run source .bashrc for the change to take effect.


How do I find version of Intel graphics card drivers installed?

You can view all your video adapters with the lspci command

lspci -k | grep -EA3 'VGA|3D|Display'
  |    | |   |    |        \- Only VGA is not good enough,
  |    | |   |    |           because Nvidia mobile adapters
  |    | |   |    |           are shown as 3D and some AMD
  |    | |   |    |           adapters are shown as Display.
  |    | |   |    \---------  Print 3 lines after the regexp match.
  |    | |   \--------------  program for searching patterns in files
  |    | |                    (regular expressions)
  |    | \------------------  pipe used for passing the results of the
  |    |                      first command (lspci -k) to the next (grep)
  |    \--------------------  Show kernel drivers handling each device.
  \-------------------------  utility for displaying information
                              about PCI buses in the system and
                              devices connected to them

The output will be something like this:

00:02.0 VGA compatible controller: Intel Corporation HD Graphics 620 (rev 02)
    DeviceName:  Onboard IGD
    Subsystem: Dell HD Graphics 620
    Kernel driver in use: i915

01:00.0 3D controller: NVIDIA Corporation GM108M [GeForce 940MX] (rev a2)
    Subsystem: Dell GM108M [GeForce 940MX]
    Kernel driver in use: nouveau
    Kernel modules: nouveau, nvidia_drm, nvidia

As you can see, I have an Intel GPU and an Nvidia GPU. The Intel GPU is using the i915 driver and the Nvidia is using nouveau. You can check this in the Kernel driver in use: section of the output.


You likely need to load this sudo pactl load-module module-bluetooth-discover then delete the pairing and then pair again and you should then be able to change the audio output setting to your headset


WPA2 Enterprise with TTLS and PAP on ubuntu-touch

With the latest OTA 7 release (Ubuntu 15.04 r26) the button is functional.
You can also use a ssh connection via wifi to create a Network Manager Configuration file directly on the device.


prompt only appears correctly after I use "bash" command

I figured it out, i just entered the following code into ~/.bash_profile:

if [[ $- == *i* && -f ~/.bashrc ]]; then
    . ~/.bashrc
fi


Is there any Ubuntu PDF reader which can select (snapshot) , save, and export pages?

Foxit for Linux does not have the full feature set that the Windows version does, although I use it myself and find it to be pretty handy. You can use PDF-Shuffler to extract a single page, or print the single page to a cups-pdf printer. Libre-office can read pdf as images, I believe.


The notify-osd functionality was provided by the third-party extension xul-ext-notify.

The firefox maintainers have discussed this on launchpad.

In summary - the maintainers of xul-ext-notify looks like they have abandoned the project.  Canonical themselves will not support this integration.  Thus unless someone steps forward, this capability will not be included in natty or future versions of Ubuntu.


Can't power on if once after battery drains the last drop

Maybe you can teach the system to warn ealier and change to the suspension mode by changing the %-values of the battery charge in the battery options. Since you didn't say which environment you use, I can't tell you how it's called on your system specificly.


file not found error while upgrading to 17.10

The package account-plugin-facebook was dropped from the Ubuntu repositories after 17.04. It does not exist in 17.10.

Uninstall the package before trying to upgrade to 17.10 or newer releases of Ubuntu.


Apparently, somehow it was a faulty website running a script in my browser, resulting in waking the computer.

I will leave this unsolved since I didn't find a program to answer my question.


Here is the output of:
grep -rE '^Exec=unity-control-center( --overview|$)'
    /usr/share/applications ~/.local/share/applications


How to put ubuntu 14.04 LTS into Performance mode

Try this:

Install cpufrequtils:

sudo apt-get install cpufrequtils

Then edit the following file (if it doesn't exist, create it):

sudo gedit /etc/default/cpufrequtils

And add the following line to it:

  GOVERNOR="performance"

Save and exit.

Disable ondemand daemon

sudo update-rc.d ondemand disable

You can check your settings with:

cpufreq-info


I checked all the gsettings of gedit and there isn't one...

You might try to do a "Feature Request"

Sorry to be the harbinger of bad news.