Does it recognize your new card

lspci | grep VGA

Have you run

sudo apt-get update; sudo apt-get upgrade

Then checked in Additional Drivers?


The terminal command to launch the ImageMagick GUI window is

display

or

display-im6


Switch Ubuntu/Xubuntu to Integrated Graphics (from AMD)

The link showing the specifications you've provided in the question gives the information that your machine has a dedicated NVIDIA GPU. That's the reason why I will provide you with instructions how to deactivate an AMD and a NVIDIA GPU in order to make only use of the integrated GPU.

1. variant - In case your PC has a NVIDIA GPU (as provided in the specification link)

Open a terminal and execute the following command : sudo nano /etc/default/grub

Add nouveau.modeset=0 to the line : GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
So that it reads : GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nouveau.modeset=0"

Press Ctrl + X to close the file and confirm the change by pressing Y and Enter.
Then execute this command : sudo update-grub (to update the GRUB configuration)

2. variant - In case your PC has an AMD GPU (as provided in the title of the question)

Open a terminal and execute the following command : sudo nano /etc/default/grub

Add radeon.modeset=0 to the line : GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
So that it reads : GRUB_CMDLINE_LINUX_DEFAULT="quiet splash radeon.modeset=0"

Press Ctrl + X to close the file and confirm the change by pressing Y and Enter.
Then execute this command : sudo update-grub (to update the GRUB configuration)

Restart the PC, now you are using the integrated GPU only, the dedicated GPU is disabled.


How do I manually partition my hard drive correctly?

See the answer in this post that may help you to partition you drive and set partition for Ubuntu How to use manual partitioning during installation?


You do not need to compile vim with clipboard support.

Try to install last version of netrw. Download vimball using this link

After that open this file using vim vim netrw.vba.gz and type this:

:so %
:q

This will install new version of netrw plugin. I hope this will solve your problem


1. I think you need to open Language Support and install Chinese(simplifed or traditional)

2. You can try to install Chinese input method manually

sudo apt-get install ibus-pinyin
sudo apt-get install ibus-sunpinyin

3. Restart IBus daemon

ibus restart

4. Then you can find Chinese(pinyin) input method in Text Entry Setting.

Hope this is helpful.


Create encrypted (password protected) zip file

This will prompt for a password:
zip --encrypt file.zip files

This is more insecure, as the password is entered/shown as plain text:
zip --password (password) file.zip files

Warning, the standard zip encryption is very weak and is easily cracked.
Note, Use -r to zip directory and subdirectory recursively.


I could finally solve the problem myself.
Before that, I did sudo update-alternatives --config python3 and switched to python 3.6

After that, I followed the answer of the same post (which I couldn't earlier because Software and updates wouldn't open) and unticked https://dl.bintray.com/aluxian/deb. Then the sudo apt-get update problem was solved !!!


Browse to the following location on the xp-pen site and search for Deco 01 V2
https://www.xp-pen.com/download/index.html
Download the BETA driver XP-PEN_3.0.5.201126-1.x86_64(New UI Beta Driver)
Extract the downloaded file and open terminal staying within that folder and run sudo ./install.sh
This should install the application to your usr/lib/pentablet folder. Even though it successfully installs you might not be able to use it as there seems to be a bug in the installation.
But there is a work around. Navigate to your usr/lib/pentablet open terminal from within that folder and run the following
sudo CHMOD +x ./pentablet
Once thats done. Navigate to usr/share/applications and open terminal from within that folder. In terminal type the following sudo gedit ./xppentablet.desktop
Change the following lines
FROM
Exec=/usr/lib/pentablet/pentablet.sh
TO
Exec=/usr/lib/pentablet/pentablet
Save and exit.
You should now see your pentable application available in the launcher


What's your computer for of all. Are you running 32 bit or 64 bit? What's the graphic card you are using? Are you running on Open Source Driver or proprietary( get on computer settings then software source, you can find what type of driver you are using) Maybe you are not running any drivers at all that might be the reason.

Also, are you in command lines? or you are on the desktop?


Ubuntu 14.04 Brightness issue with nvidia Quadro

It's probably a bug with drivers > 304 which has been around for a while:

Ubuntu 13.10 kernel 3.11.0-12.19-generic 3.11.3 -> suggested workarounds: using nvidia drivers 304
Ubuntu 13.10 kernel 3.11.0-15.25-generic 3.11.10 -> suggested workarounds: using nvidia drivers 304
Ubuntu 14.04 kernel 3.13.0-24.47-generic 3.13.9 -> suggested workarounds: none
Ubuntu 14.04 kernel 3.13.0-32.57-generic 3.13.11.4 -> suggested workarounds: none

According to these bug reports the only solution is to roll back to a driver version <= 304.


The command you're looking for is lsusb. It will return information as to what is connected to your computer and on what bus.

However, it does not (and can not) look at the connected TTYs, as this would require opening a session with the TTY and a few other things.


Atheros AR9485 wireless card doesn't work in an ASUS K53E

Solved!
Installed linux-backports-modules-cw and network-manager update. Works well. linux-backports-modules-cw can be found in software center and network-manager update can be get via normal uodatin method.
For anybody who needs this info in Tukish navigate to my blog entry : http://gkaya93.blogspot.com/2012/05/ubuntu-1204-wireless-cozumu.html . I will write an English description here:

Check the table in this page to see if your wireless card (or sth similar*) is there : http://wiki.ubuntuusers.de/WLAN/Linux-backports-modules#Enthaltene-Treiber
If there, do the following:
Go to terminal and enter "uname -r" for returning kernel version.
Search for a matching version of "linux-backports-modules-cw" in software center. Install it.
Update network-manager.
Reboot and see if it affects. It changed my experience a lot. It's really better now.

*My card was rtl8192se. It wasn't included in the table, instead, rtl8180/rtl8187. but the software healed my system. So go ahead and try if your card's model is close to included models. I guess this is safer than manipulating system configuration files.

And sth to include, on the website, it says that linux-backports-modules-cw is included in the Live image, so you can install if have no connection. I didn't try it, as I have formatted my live medium. But if you didn't, add it to your Software sources and try to use.
- Software Center > Edit > Software sources > Installable from CD-ROM/DVD... Check the checkbox below it.

I guess this thing would work well in elderly Ubuntu versions, but I'm not sure and encouraging anyone to try it because of my word. Thanks for any support made.


Edit /etc/update-manager/release-upgrades and change:

[DEFAULT]
Prompt=lts

to:

[DEFAULT]
Prompt=normal

and then:

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

and finally:

do-release-upgrade

If it tells you command not found for do-release-upgrade, install it with:

sudo apt-get install update-manager-core


The problem is that git uses tmp files during these operations and paths to tmp files might be absolute paths. You can see what paths are by changing diff cmd to echo.

[difftool "kdiff3"]
    path = "/mnt/c/Program Files/KDiff3/kdiff3.exe"
    cmd = "echo $LOCAL $REMOTE"

Output will be something like

/tmp/BPI1A2_Layout.js Layout.js

KDiff3 from windows can access Layout.js because it is relative path. The path /tmp/BPI1A2_Layout.js doesn't exist on windows so KDiff3 can not find the file.

You could use non default TMPDIR for git commands.

TMPDIR=".tmp" git difftool

Now the paths would be

.tmp/BPI1A2_Layout.js Layout.js

Both are now relative under same directory structure which windows is able to access and kdiff works as expected.

If it is OK to use .tmp directory inside project folder then easy workaround is to create alias

alias git="TMPDIR=.tmp git"


The latest LUBUNTU image will not fit on a CD. What files can be deleted to make it fit?

I don't know if you're aware of this, but the 14.04 is the newest LTS (Long-Term Support) version that's recommended for most users. Non-LTS versions are only supported for 9 months. The latest LTS image, Lubuntu 14.04LTS, fits on a 700MB CD.

It is unfortunate that the Lubuntu 14.10 desktop image is 705MB. I'm not sure, but you might be able to use overburn to make it fit on a 700MB disk. Otherwise, you can get a bigger CD, which do exist. You can get 800MB CDs and 900MB CDs. Or you could use a DVD if your computer can read them.

If you really do require 14.10 and none of the above can be used, then you'll want to get the Alternate installer. This uses a text-based "GUI", but otherwise simple to use although slightly less beautiful. It also requires a lot less resources, so it's useful for old computers with little RAM. Because it installs the system as packages, however, it is slower than using the Desktop installer.

You can get the Alternate installer for 14.10 here: http://cdimage.ubuntu.com/lubuntu/releases/14.10/release/

But again; I recommend 14.04LTS for most users.


You appear to be following these instructions: https://support.amd.com/en-us/kb-articles/Pages/AMDGPU-PRO-Install.aspx.

That command contains a subtle typo (a unicode en-dash instead of a hyphen) which will affect anyone who copy/pastes it.  Copy/paste the corrected command below:

sudo ./amdgpu-pro-install -y

I have reported the issue to them.


Why does Gnome-Shell act differently on my desktop than my laptop?

I suspect your desktop may have entered fallback mode. It's not the actual gnome-shell. Can you tell me the specs of your desktop. You'll enter enter fallback mode if you haven't got the appropriate drivers for your video card. Or if your hardware simply can't support the shell.


Keep computer locked in a view-only state

Take a look at the xtrlock package, available in the Ubuntu repositories. I think it will accomplish what you're looking for.

You can view its manual page online here: http://manpages.ubuntu.com/manpages/trusty/en/man1/xtrlock.1x.html

  While xtrlock is running, the mouse and keyboard are grabbed and the mouse cursor becomes a padlock. Output displayed by X programs, and windows put up by new X clients, continue to be visible, and any new output is displayed normally. The mouse and keyboard are returned when the user types their password, followed by Enter.


How to delete part of a line and keep the rest using Bash?

You could use awk, to print the last comma-space separated field:
$ cat file
First name, Last name, 123456789
GPA
Class
Major
University

$ awk -F', ' 'NR<4 {print $NF}' file
123456789
GPA
Class

or sed to replace the longest string up to comma-space:
$ sed -n '1,3{s/.*, //; p}' file
123456789
GPA
Class


Installing Unity on a 13.04 mini install without other packages

The dependencies for Unity are listed on this page for the ubuntu-desktop package. Dependencies can be circumvented during installation with these commands:

sudo apt-get --no-install-recommends install

or

sudo aptitude --without-recommends install

Although, these will end up installing some recommends; apt-get installing the most dependencies it seems. You can find a reference on --no-install-recommends here.


In a terminal:

sudo apt-get remove bookmarks-lens

Or simply search for bookmarks-lens in the ubuntu software center and click remove.


Blender not starting anymore, no hardware change

Have you tried checking the "Additional Drivers" application?
Maybe your graphics drivers aren't working correctly, I've found that's the best option to quickly reset the driver installation.
It should say "Using Proprietary Driver" (see image).
Additional Drivers dialog
If it doesn't, select that, let it install and reboot before you do anything else.
If it does say that, you could try setting it back to nouveau, rebooting, then setting it back the the nvidia drivers and rebooting again to reset the install.


How to make custom desktop background with multiple images?

There are 2 ways to achieve this, firstly you can create a slideshow which will transition multiple images 1 at a time.  See How do I create a desktop wallpaper slideshow? on how to do it.

However, if my understanding is correct, you are asking how to create a customised background with multiple images.

To do this you need to use an image editing software (like GIMP) with layering capability.  In this software you can build your custom background as you like with multiple image with the ability to place, resize, rotate etc.  You can the "lock" the layers and use the image you create as your desktop background.  FYI, GIMP is available from the ubuntu software centre and is quite difficult to use for a novice.


Fixing wifi on a clean install of Ubuntu Mate 16.04.

Killer 1525 specific firmware:

Download:
https://github.com/kvalo/ath10k-firmware/blob/master/QCA6174/hw2.1/board.bin
and put it in the /lib/firmware/ath10k/QCA6174/hw2.1/ folder (create the folder if it doesn’t exist)
Follow steps described here:
http://www.killernetworking.com/support/knowledge-base/17-linux/20-killer-wireless-ac-in-linux-ubuntu-debian

Briefly:

Download:
https://github.com/kvalo/ath10k-firmware/blob/master/QCA6174/hw2.1/firmware-5.bin
Note: At the time of editing this article, it is posted as:
https://github.com/kvalo/ath10k-firmware/blob/master/QCA6174/hw2.1/firmware-5.bin_SW_RM.1.1.1-00157-QCARMSWPZ-1
and put it in the /lib/firmware/ath10k/QCA6174/hw2.1/ folder as firmware-4.bin.


how can i open a web page on my phone: webpage is on my computer

If you are on the same subnet, you would type your computer's local IP Address (which can be found by running the command ifconfig) into your phone's web browser.

If you are on another network (wifi or 3G/4G) you would first need to set up port forwarding on your router so web requests can transverse your NAT. Then you would type your Public IP address into your phone's browser. Your public IP can be found by searching what's my IP on Google, or by the command curl icanhazip.com

NOTE! Some ISPs block common ports such as port 80 (web server). In this case you would have to use an alternate port number like 8080 and specify this value in your browser.

For example, if your public IP is 1.2.3.4 and your port forwarding is set up to the public facing port 8080, you would type 1.2.3.4:8080 into your web browser.

Word of warning though. If something as simple as pulling up a web page running on a local server requires a question on a forum, you should probably do more research before deploying this server unless you want to be attacked. This is a digital age, one small misconfiguration on that server could compromise your entire network.

Be safe,
Lisenby


Cron job. Runs at minutes interval but otherwise when set at another time

As pointed out in a comment above, the most obvious pbm is that you are not using the -O option correctly.

Look up  man wget in terminal. Here is an extract:

  -O file --output-document=file.  The documents will not be
  written to the appropriate files, but all will be concatenated
  together and written to "file".  If - is used as file, documents
  will be printed to standard output (stdout), disabling link conversion.
  Use ./- to print to a file literally named -. Use of -O is
  analogous to shell redirection:  wget -O file http://foo is
  intended to work like wget -O - http://foo > file; where "file" will be
  truncated immediately, and all downloaded content will be written
  there.

If, as a non root user, you run a GUI cmd or direct yr output to stdout in an already running X session, make sure yr cron environment knows about the active display. To make cron GUI aware, i.e. to tell it, what display the program should use (:0 is the default in a desktop environment)

0 1 * * * export DISPLAY=:0; XAUTHORITY=~/.Xauthority /usr/bin/wget -O - http://192.10.10.1/mypage/myscript.php

or, if you want to set the DISPLAY environment variable ONLY for a specific cmd:

0 1 * * * DISPLAY=:0 XAUTHORITY=~/.Xauthority /usr/bin/wget -O - http://192.10.10.1/mypage/myscript.php

or, if redirecting output to a file for later perusal, the need to specify the correct display disappears because nothing actually goes to stdout :

0 1 * * *  /usr/bin/wget -O <filename> http://192.10.10.1/mypage/myscript.php

The latter solution makes more sense, if you run yr cron job at 1am and you are not sitting in front of yr desktop display.

==
Let us known in case of continuing problems.


Install Canon i-SENSYS LBP7200Cdn network printer on Ubuntu 12.10 64bit

Unzip the contents of the driver download, select the 32-bit or 64-bit folder, debian, and extract the .deb files to a directory. To install, open in console and run:

sudo dpkg -i ./*.deb


"\r" is how bash prints the Carriage Return character. ("^M,0x0B) that some other systems use as part of their End-of-Line marker ("^M^J", Carriage Return, followed by LineFeed). Linux uses only "^J" (LineFeed) at End-of-line.

One way of clearing out the "\r" characters is through dos2unix, in the package of the same name.

Another way is:

tr -d "\r" <name.sh >a.tmp
mv a.tmp name.sh


Transmission Remote Error: portTested: http error 0: No Response but port is open

[SOLVED]: I think the issue was on the bind-address-ipv6 i did the following modifications and now its working:

10c10
<     "bind-address-ipv6": "::1",
---
>     "bind-address-ipv6": "::",
68c68
<     "umask": 2,
---
>     "umask": 10,


Gpu passthrough unable to blacklist drivers?

I had the same problem with the GPU. But from this post, I learned that I had to manually add the device in the blacklist.conf.

First open

sudo mousepad /etc/modprobe.d/blacklist.conf

And add

blacklist radeon

And lastly,

sudo update-initramfs -u

Hope that helps.


Why is the output of wall command not displaying in stdout?

Type the mesg command, and if it says "is n" (messages from wall are blocked), do mesg y. Of course, do man mesg;man wall first.


you can download myunity from the ubuntu software center, you can change with it a lot of options, and you cane change the icons and appearance themes.

or you can use this simple way explained in this post:
http://www.omgubuntu.co.uk/2012/03/how-to-easily-skin-ubuntus-unity-desktop/


Can’t get network applet back in Ubuntu MATE 18.04

I don’t know what it was, but I was able to get the network applet back by going to System > Preferences > Look and Feel > MATE Tweak, and in Panels, first saving the existing layout, then re-selecting the Familiar layout.

Note that this will delete any customizations (if you’re not ready to part with them, be sure to keep a backup around). However, now I have the notification area with Bluetooth, network, mail, battery and sound icons (previously there was only the sound icon), as well as the combined Settings/Shutdown icon (previously I had the Shutdown icon instead).

Since there have been doubts about this: this solution has also survived multiple reboots.


Usually shortcuts involving Super (i.e. win-logo) key are mostly unused, and F[1..12] keys with modifiers. And even without a modifier the F1 never does anything useful. Well, usually it calls "help" in different apps — but c'mon, nobody looks in there anyway, peoples are using either man command or the Internet. And even if they would — this is the last thing one would want to bind to a hotkey.

So you could use something like Super+n for Next. If it turn out to be used by WM, add one more modifier, e.g. Shift, that combination is definitely unused.

UPD: some more keys:

Insert: I don't recall anybody using it. Whilst I do admit the usefulness of Shift+r action in VIM-like editors, but this is a very special case (I can elaborate further, but not sure anybody interested), and doesn't involve Insert key. FWIW I've took Insert out of my keyboard at home, and bound a noop action on Kubuntu at work (I couldn't afford to cripple a keyboard I don't own ☺) because before my touch-type got better I kept accidentally pressing it. But you can bind something useful in there instead. (nowadays I'm binding XF86AudioPlay to be produced by Insert)

Scroll Lock: that key is so unused, that distro-makers are actually using Scroll Lock LED to show a language layout instead. So you can bind something there too.

Num pad keys: this one depends on your workflow. E.g. I am, as a programmer, have got touch-type good enough to use the numbers of the keyboard part with letters. So I never ever use num pad. And recently that I've got a keyboard without media keys, I seriously am thinking of rebinding num-pad keys through xdotool to media ones.


It sounds like you don't have your computer configured to boot from the DVD drive or USB stick that you have Ubuntu on.  When your computer first powers on, you press a special key to bring up the computer's boot menu.  Here's a web page that can show you what key to press for your computer model.  Press that key several times when the computer first boots, and you should be taken to a menu that asks you if you want to boot from the hard drive, the DVD drive, or the USB device.  Pick the choice that has the Ubuntu live disk or live USB stick, and you'll soon be trying Ubuntu.  (The boot repair tool is a tool to use after something goes wrong with a Ubuntu installation, which is a fairly rare problem.)

Some computers have booting from any device other than the hard drive turned off in the BIOS, but this is fairly rare.  In that case you must go into the BIOS setup menus and configure your computer to allow booting from the DVD drive or your USB stick.  You get into the BIOS setup menus by pressing another key as the computer is first booting; the same web page I mentioned earlier will tell you which one.  In the BIOS setup menus you can also change the default boot order, so if you wanted you could make the computer always try to boot from the DVD drive or USB stick first, before trying to boot from the hard drive.  I wouldn't recommend that though, because if you leave a Windows DVD in the drive your computer could boot into the Windows installer by accident!  Yikes!

Good luck, and let us know how it goes.


How to not wipe the whole disk, only the partition i want ubuntu on?

Consider using advanced partitioning:

Choose Something Else at this menu.
Let it scan your partitions.(It does this automatically, and shows a spinner below the table while it is doing this)
Select your C: drive(It won't be called that, but something like(not exactly that) /dev/sda1, and it should be the second-to last partition)
Click Delete below. This will delete after this step so if you make a mistake it can be undone.
Click Add after selecting the empty space left over.
Set size to 4000.
Set the Use As field to Linux Swap.
Click OK.
Click on the free space remaining. Click Add below.
Create a new partition. Use As: Ext4, check the format box.
Click Edit on that partition. Set the mountpoint to /.
You cannot undo after this step. Click Install and continue as normal.


Checking extensions on command parameters?

You can use the =~ operator for regular expression matching:

#!/bin/bash
v1="$1"
v2="$2"
pat1='.*\.txt$'
pat2='.*\.dat$'
if [[ ! ($v1 =~ $pat1 && $v2 =~ $pat2 && -e $v1) ]]; then
    echo Ending program
    exit
fi
echo Continuing program


ant install error: BUILD FAILED java returned exit code 1

What you need to do is to edit the file

nano /dspace/config/local.cfg.EXAMPLE

change the db.password = with the password you entered twice after the command:

createuser -U postgres -d -A -P dspace

save the changes to file local.cfg.EXAMPLE and save it as local.cfg, then run the command

sudo ant fresh_install

again and this will do it.


Make sure you have a currently supported version OS. If your OS version is not currently supported, update your software sources by following the instructions in How to install software or upgrade from an old unsupported release? and then skip steps 2-6 since they don't apply in case you have an unsupported release.
Search in the Dash for Software & Updates.
Click the Software & Updates icon to open a new Software & Updates window.
Select the first tab called Ubuntu Software.
Under the Downloadable from the Internet heading put a check mark in the first four checkboxes in the list.
Authenticate with your user password to apply any changes that you have made to the software sources and close the window.

Open the terminal and type:

sudo apt-get update
sudo apt-get install tasksel
sudo tasksel

A Package configuration window will open. Select a task by scrolling down or pressing the down arrow key ( ↓ ) and pressing space. This will put an asterisk beside the selected task and mark it for installation. Tasks that are already installed tasks are marked by an asterisk. If you make a mistake, press space again to unselect a selected task. From the Software selection list select LAMP server (LAMP server = Linux, Apache2, MySQL, PHP) and use the Tab key to select <Ok> and then press Enter as shown in the below screenshot:

You may need to wait a while for the packages in the selected task to finish installing.

Alternatively run the following commands to install LAMP server:

sudo apt install tasksel
sudo tasksel install lamp-server


It appears that you had an empty service file or you have a duplicate service file in /etc/systemd/system/. This will usually get masked.

Check if the file /etc/systemd/system/apache2.service exists. If so, remove it and proceed below.

Apache2 service file should exist in /lib/systemd/system/. Please check if the file /lib/systemd/system/apache2.service exists. If yes, check the content against this:

[Unit]
Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target
Documentation=https://httpd.apache.org/docs/2.4/

[Service]
Type=forking
Environment=APACHE_STARTED_BY_SYSTEMD=true
ExecStart=/usr/sbin/apachectl start
ExecStop=/usr/sbin/apachectl stop
ExecReload=/usr/sbin/apachectl graceful
PrivateTmp=true
Restart=on-abort

[Install]
WantedBy=multi-user.target

If not, create the file and copy and paste the above content to it. Then try to enable the service by running:

sudo systemctl enable apache2

If successful, reboot your system


How to mount a Microsoft basic data partition

I eventually discovered what was causing this issue.   Unbeknownst to me the Dell Inspiron was using Bitlocker so the disk partitions in question were encrypted.  Just how this can be is a mystery to me - to the best of my knowledge Windows 10 Home (which I have) does not support BitLocker.  Perhaps it is a tweak added in especially for Dell.


Ubuntu Touch onscreen keyboard disappeared | Meizu MX4 Pro

Thanks to the guys at Freenode #ubuntu-touch I was able to get my osk back. I downgraded to the former OTA-version and then reupgraded to latest OTA. I followed this piece of advice:
http://thinkonbytes.blogspot.de/2016/06/how-to-install-older-ota-release-in.html

Unfortunately Libertine seems to have been deleted in the process.


Is there a simple way with pygi to make an entire window a drop target for external input?

Set your window "main_win" Widget drag_data_received callback to on_main_win_drag_data_received.  The URI is printed in the status bar.

from gi.repository import Gtk, Gdk

builder = Gtk.Builder()
builder.add_from_file("assets/ui/design.glade")

class UI():
    def __init__(self):
        #get window
        self.window = builder.get_object("main_win")
        #add drop target
        self.window.drag_dest_set(Gtk.DestDefaults.ALL, [], Gdk.DragAction.COPY)
        self.window.drag_dest_add_uri_targets()
        self.window.set_title("Main Window")
        #show the window
        self.window.show_all()

#get an instance of the gui specific code
ui = UI()

class Worker():
    """
    Real worker code
    """

#get a worker instance
worker = Worker()

def log(uri):
    status = builder.get_object("status_bar")
    context = status.get_context_id('')
    status.pop(context)
    status.push(context, uri.rstrip())

class Handler():
    """
    Gtk callback handlers
    """
    def on_main_win_delete_event(self, *args, **kwds):
        Gtk.main_quit()
    def on_main_win_drag_data_received(self, widget, drag_context, x, y, data, info, time):
        log(data.get_data())

#connect handlers
builder.connect_signals(Handler())

if __name__ == '__main__':
    Gtk.main()

Tested and functional.


Running a command as soon as I save a file

You can do this using tools from the inotify-tools package, available in the archives or using other libraries such as pyinotify.


Overheating Ubuntu 20.04 Dell Inspiron 7570

gnome-shell

When viewed with the top command, gnome-shell should only be using 3% or less of CPU. Yours is using 85%. This is usually because of a bad gnome-shell extension.

Go to https://extensions.gnome.org/local/ and immediately disable ALL extensions. Then reload gnome-shell this way:

ALT+F2, in the box that appears, type r, then hit the ENTER key

Now view the top command again, and confirm that gnome-shell is only using about 3% of CPU. Monitor the sensors command and confirm that temps are below 50C.

We'll discuss re-enabling gnome-shell extensions later.

cpupower is a very suspect extension.

Once the top and sensors commands are in line, we'll enable ONE EXTENSION AT A TIME, and continue to monitor these commands. Understand that the impact from re-enabling an extension may not be seen right away.

Discord

re: When I run Discord, the gnome-shell increases to 85%, 95% of CPU.

In its snap application format, Discord is a major security and privacy problem. Use snap list to determine if your Discord is a snap application. Use dpkg -l *discord* | grep ii to determine if Discord is a standard binary application.

From one of my previous answers regarding Discord...

Disk space suddenly used up for no apparent reason in 20.04

The snap application called Discord is the bad guy...

From the Ubuntu Software center...

All-in-one voice and text chat for gamers that's free, secure, and works on both your desktop and phone.

Snaps are confined, as such Discord may be unable to perform some of the tasks it typically does when unconfined. This may result in the system log getting spammed with apparmor errors. Granting access to the system-observe interface when in the snap will enable the features, and thus reduce the logging.

snap connect discord:system-observe

Note: granting access may be a security risk, and a privacy issue.

Note: from @mchid, see https://github.com/snapcrafters/discord/issues/23

Personally, because of the privacy and security concerns, I wouldn't use Discord. I'd remove it from my system. sudo snap remove --purge discord. Any snap app that needs access outside of its sandboxed environment to perform its actions are very suspect... especially ones that have code to figure out what other apps you're running at the same time as Discord.

Then delete the large /var/log/syslog and /var/log/kern.log files.

If you wish to continue to use Discord, uninstall the snap version as per my instructions above, and install the binary version, which can be downloaded at https://discord.com/download. Continue to monitor top and sensors.


nccl did update, but the database used by the locate command still reflects the old library file name.

You can update the locate database by running sudo updatedb. See also:

How come the locate command doesn't find obvious files?


You would need to compile Unity yourself (with dependencies) if there is no PPA for this (I dont think there is). For a simple bug like this, I don't think that this is worth the hassle.

If you are curious about how to compile it yourself, please refer to this Ask Ubuntu Question.


Ubuntu forgets custom DNS server after a while

I am not sure what you are editing where, BUT In Ubuntu 17.10 they changed to netplan to manage networks.

for desktop it is now netplan/networkmanager
for server (headerless) it is now netplan/networkd

So basically anything you have edited in the past doesn't really work anymore. To make life more confusing it is all still there, and editing it can just add further layers of problem (that's experience talking). Once I just started working with only the netplan stuff, everything started to work again.

As far as I understand you now edit gui from within the gui (I don't use the gui), if you google ubuntu 18.04 static ip netplan networkd you will probably find what you are looking for. I have only just discovered most of this, and I am still not 100% sure how it all works, which is why I have not told you how I setup my network stuff. Bad advise only makes things worse.

My key info was found here: https://websiteforstudents.com/configure-static-ip-addresses-on-ubuntu-18-04-beta/

Hope this helps.


Just as a troubleshooting step, have you tried this both with "Legacy USB support" turned on, and off, in your computer's BIOS?


Software center not downloading anything?

You could try updating all of your packets first of all (this will include software center):

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

When you've updated all packets on your system, you can try installing it again from software center, or you can install VLC straight from the terminal (aw yeah) by typing this:

sudo apt-get install vlc


i think it was a dual boot, if it was win 7,  you will have to borrow a windows installation disk and boot from it,
then you have to go to the repair option and then the command prompt,  there u will have to type "bootrec.exe"

it will fix your boot sector and thus, it will enable to boot win 7.

http://support.microsoft.com/kb/927392


'sudo apt-get install' is showing "Not using locking for read only file /var/lib/dpkg/lock" warning on Ubuntu Touch

Warning: This is by design. What you're trying to do can very quickly make your device unusable. Phones, which are updated by apt-get upgrade for example, are not tested; only the ones using the OTA update system are. If your phone breaks, you may need to re-flash it. If you understand the risk, then see below.

To remount the root filesystem as read/write, run the following command
sudo mount -o remount,rw /


Make Samsung Portable SSD T3 work on Ubuntu

I managed to make it work and mount my drive after installing exfat-utils.

The command I used:

sudo apt-get install exfat-utils


Open LibreOffice Writer and change the following settings.
Tools --> Options --> LibreOffice --> Application Colors --> Document Background --> Set to White or Automatic
Most likely only the application background is set to a different color, but your saved documents don't inherit the background.


Install inotify-tools. Then something like this would work, I believe:

while true
do
    inotifywait /media/$USER
    find /media/$USER -type f -exec chmod +x {} \;
done


Comic book project using all open source apps

"Ubuntu" has trademark protections and the logo has trademark and copyright. Ubuntu has a fairly loose trademark policy which does explicitly allow most things for non-commercial use as long as you're not hinting that Canonical or Ubuntu are endorsing you, and that you follow their logo guidelines.

If you want explicit permission (and I think it would be silly not to), talk to Canonical. At the very least they should be able to give you a written confirmation of what I'm saying.

Most big projects will have trademarks on their logo and name for software use. Use of them is usually okay in a non-commercial, non-endorsement role but again, it costs nothing but a few minutes to check.


Ubuntu 19.04 did not recognized Realtek 8723DE.  I tried the Ubuntu Desktop Guide procedure first but I was not able to solve the problem and it should be the first place to start to try to solve problems first.
I was able to solve it with the following procedure from this link:
https://ibcomputing.com/install-rtl8723de-realtek-d723-ubuntu-18-04/

$ git clone https://github.com/lwfinger/rtlwifi_new.git
$ cd rtlwifi_new
$ git checkout extended
$ sudo make install
$ sudo modprobe -r rtl8723de
$ sudo modprobe rtl8723de

Wireless work without rebooting, but if it this not happens to you follow with:

$ sudo -i
# reboot


Cannot find NodeJS in softwarecentre of Ubuntu

You would open a terminal window (detailed instruction for bloody beginners in my comment above) and execute those two commands:

curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo apt-get install -y nodejs

Source: https://github.com/joyent/node/wiki/installing-node.js-via-package-manager


Unlike windows, Linux is case sensitive. Use this:

cd Software

instead of:

cd software

because "software" does not exist but "Software" does.


ubuntu-minimal 18:04 how to login via ssh?

Please make sure your /etc/ssh/sshd_config file configured as below to ssh with password authentication.

edit /etc/ssh/sshd_config file.

To enable password authentication, uncomment

#PasswordAuthentication yes

To enable root login, uncomment

#PermitRootLogin yes

To enable ssh key login, uncomment

#PubkeyAuthentication yes
#AuthorizedKeysFile .ssh/authorized_keys

Sample config file

root@test:~# cat /etc/ssh/sshd_config
#       $OpenBSD: sshd_config,v 1.101 2017/03/14 07:19:07 djm Exp $
# This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented.  Uncommented options override the
# default value.
#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
#HostKey /etc/ssh/ssh_host_ed25519_key
# Ciphers and keying
#RekeyLimit default none
# Logging
#SyslogFacility AUTH
#LogLevel INFO
# Authentication:
#LoginGraceTime 2m
PermitRootLogin yes       #prohibit-password
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
#PubkeyAuthentication yes
# Expect .ssh/authorized_keys2 to be disregarded by default in future.
#AuthorizedKeysFile     .ssh/authorized_keys .ssh/authorized_keys2
#AuthorizedPrincipalsFile none
#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes
# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication yes
#PermitEmptyPasswords no
# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no
# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no
# GSSAPI options
#GSSAPIAuthentication yes
#GSSAPICleanupCredentials no
#GSSAPIStrictAcceptorCheck yes
#GSSAPIKeyExchange no
# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
UsePAM yes
#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
PrintMotd no
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS no
#PidFile /var/run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none
# no default banner path
#Banner none
# Allow client to pass locale environment variables
AcceptEnv LANG LC_*
# override default of no subsystems
Subsystem       sftp    /usr/lib/openssh/sftp-server
# Example of overriding settings on a per-user basis
#Match User anoncvs
#       X11Forwarding no
#       AllowTcpForwarding no
#       PermitTTY no
#       ForceCommand cvs server**


Can't use 100% of my hard drive partition

According to the mount output:

/dev/sda6 on /media/boi/92e9f385-9a3d-45b1-afca-a2a3aab1c8e4 type ext4 (rw,nosuid,nodev,uhelper=udisks2)

the partition in question is mounted as read-write (rw) which is correct and the type is ext4 which is default on Ubuntu. This filesystem maintains file permissions (unlike FAT or NTFS, for example).
Since this partition does not appear in your /etc/fstab file, it was probably created by another Linux installation, in your case Mint.

The file permissions are still kept, including the original owner of the files which is most likely different from your current user ID. To reset owner of all files on the partition to you (boi), run the following command:

sudo chown -R boi:boi /media/boi/92e9f385-9a3d-45b1-afca-a2a3aab1c8e4

Then you should be able to write into this partition.

If you’re going to use the partition regularly, you should create a permanent mount point for it and add it to /etc/fstab.


How do you assign an icon to a specific program or window in the panel?

After some extensive looking and attempts to do what desgua suggested, I have found that the Skype beta as well as the Pidgin windows are hard-coded into the programs and cannot be edited by copying over the icons. I can edit the Pidgin notification icon, but not the Skype one, and I cannot edit either the Pidgin or Skype window icons.

Feel free to answer if you have anything to add, but this as far as I have been able to get with it on any theme. Specifically if you know how to change the Pidgin window icons, it would be greatly appreciated.


Panels disappear often in Xfce. The developers are still trying to resolve the issue. This seems to be a particularly difficult issue for them. You can try installing the panels when they are missing. A good guide for doing that exists at https://help.ubuntu.com/community/XubuntuPanels .


How to check battery status history in a text format?

I’m not sure whether past data is easily readable, but you can write the current status to a file like this:
upower -i `upower -e | grep 'BAT'` >> history.txt

If you were to put this into a cron job that ran at regular intervals, it may give you what you’re looking for.


Install fbreader
right click on the .mobi file and chose open with entry

then chose fbreader from it

you can access .mobi file next time onwards by double clicking it

or
use ubuntu-tweak to associate extensions with applications


Finally after trying different solutions my problem got solved.
I replaced GRUB2 with BURG. See here for install instructions


To make a program your default; right click any .torrent file on your computer, "properties", go to "open with" tab. Choose the program you like and set it as default.

This would set the default program to open .torrent files, but it would not change the program that opens magnet links (sadly).

Setting the program that opens magnet links is a little bit harder. Try to follow this or try following me:

Firstly we need to check that your program's ".desktop file" (in /usr/share/applications) has this line:

MimeType=application/x-bittorrent;application/x-torrent;

To check, open the text editor (called gedit) and hit "open" up to the left, then navigate to your program's .desktop file. As stated; you should find it in the folder /usr/share/applications. After you open it, search for "MimeType" (by pressing Ctrl+f and typing "MimeType" in the box that shows up).

...If you did find that it has this line then proceed. (if not then just put the line in. Modify the existing line.) Close gedit.

Now that we've done the checking; open the file /usr/share/applications/defaults.list (the same way you opened the .desktop file). Search for "x-scheme-handler/magnet" (same way also). If you found it, make it look like this;

x-scheme-handler/magnet=YOURPROGRAM.desktop;

Replace YOURPROGRAM by the program you want to set default. The name must exactly match the name of your program's .desktop file.

example: x-scheme-handler/magnet=kde4-ktorrent.desktop;


Not able to do multitouch gestures(except two finger scrolling) on touchpad

On my Sony Vaio VPCEG15FB on Ubuntu 14.04 when I use two fingers spaced on touchpad (to up or down) I have the following results:

On firefox:
Scrolling

On Shotwell
Zoom

File (Explorer)
Scrolling

On https://wiki.ubuntu.com/Multitouch/TouchpadSupport say:
"Unfortunately, X can't send touch events if it is also sending other events caused by the same touches. For example, if you have two finger scrolling enabled for a touchpad, X can't send touch events until you put three touches down."


have a look at this digital diary

Lifeograph


First, try checking it's installed with sudo apt-get install indicator-datetime.

Also, check the setting's checked at System Settings->Time & Date->Clock:


Installing missed packages should fix that.

sudo apt-get install duplicity python-gi


I repeat I think it's not an ubuntu realted question, but here is my answer based in the popen link I sent you

#include <iostream>
#include <stdio.h>

using namespace std;

int main() {
    FILE *in;
    char buff[512];

    if(!(in = popen("dpkg -l > ~/appslist", "r"))){
        return 1;
    }
    pclose(in);

    if(!(in = popen("cat ~/appslist", "r"))){
        return 1;
    }

    while(fgets(buff, sizeof(buff), in)!=NULL){
        cout << buff;
    }
    pclose(in);

    return 0;
}

(I used the path ~/appslist to have permission as a normal user)


It really depends on what you want. Personally I like to keep operating systems separated and each using their own boot manager, but that means pressing a few extra keys at boot up which can irritating if you switch between operating systems a lot.

Option #1

Install Windows 7, and then install Ubuntu. This will result in 1 boot manager (Grub2) which means when you boot up you will see Grub2 and be able to choose whether to boot Windows or Ubuntu. This makes it easier to boot the operating systems, but more complicated to replace them since they share a boot manager.

Option #2

Install Windows 7, remove the hard drive, install Ubuntu, and re-add the Windows 7 hard drive. This will result in each OSs being unaware of each other, and each using their own boot manager which is great if you ever replace 1 of the operating systems. When you turn the computer on it will automatically boot in Windows 7, no menu will be presented, but if you press the appropriate F# key at boot up you can use your quickboot menu to boot into Ubuntu instead by selecting to boot from the second hard drive. This option assumes your computer is capable of choosing which internal hard drive to boot from so if you go that route check your menu first to see if your system supports it.


Skip a particular package for update and proceed for all others

Ok, first of all, especially on production servers, you must have only source lists you really need. Everything else must be removed.
Then, every source list you have should provide trusted packages, and the way to check that is easy - every provided package is signed by the one who provides it. Your system has keys which can verify the package signature. Those keys can be viewed with apt-key list. You lack a key for http://download.owncloud.org/download/repositories/stable/Ubuntu_16.04. I saw that Owncloud's key has expired few months ago and they have released a new one. You can obtain it from http://download.owncloud.org/download/repositories/stable/Ubuntu_16.04/Release.key. Download it wget ... and import it with apt-key add <filename>. Run apt-get update to refresh your cache.

Next - you're asking how to mask a package from being updated. This can be done with sudo apt-mark hold package_name. Hope that helps you.


Regardless of the bug ASUS is not on the affected list of systems. Besides all Lenovo's it also affects:

Acer Aspire E5-771G
Acer Aspire ES1-111M-C1LE
Acer TravelMate B113
Toshiba Satellite S55T-B5233
Toshiba Satellite L50-B-1R7
Toshiba Satellite S50-B-13G
Dell Inspiron 15-3531
Mediacom Smartbook 14 Ultra M-SB14UC
Acer Aspire E3-111-C0UM

So you are fine.

For users using one of these systems: all direct downloads that have this bug have been revoked so you can not download the broken version anymore. If you have an old download download 17.10 again to make sure you deleted the bugged version.

Or skip 17.10 and stick with 17.04. There is not a lot in 17.10 that is that different over 17.04 anyways.

For people already affected see this notice in the bug report.


Atheros QCA9565 / AR9565 Wireless Card Doesn't Work After Updating

This card is now recognised by the updated drivers backported from later kernels, so you no longer have to compile your own. To install, work out which kernel you are currently using

$ uname -r
3.2.0-56-generic-pae

Note the generic-pae, and install the appropriate backported driver:

sudo apt-get install linux-backports-modules-cw-3.12-precise-generic-pae

If you have just the generic kernel, use

sudo apt-get install linux-backports-modules-cw-3.12-precise-generic

This installs the wireless drivers backported from linux kernel version 3.12. The backports repository should already be enabled in 12.04.

This is the latest version backported at the time of writing, but you can check for newer versions with:

apt-cache search backported wireless


Your error message leads me to this Ubuntu bug via Google..

https://bugs.launchpad.net/ubuntu/+source/qt-at-spi/+bug/890240

I'm surprised it hasn't gotten more attention if it is affecting Skype.. it may help if you chime in with your experience :)


How to supply matching shared libraries to a self compiled program?

On Linux the dynamic linker does not by default look in current directory.
If you indeed include all needed libraries in current directory, it should work:

LD_LIBRARY_PATH=. ./myprogram

If you do not provide all necessary libraries, it might complain or just crash (due to binary incompatibilities that the linker cannot detect only comparing library version numbers).

Reference: man ld.so

  LD_LIBRARY_PATH A colon-separated list of directories in which to search for ELF libraries at execution-time.  Similar to the PATH environment
  variable.  Ignored in set-user-ID and set-group-ID programs.


LibreOffice removed (&uninstallable) after Ubuntu 14.04.4 snapshot update

It seems that  you had held/broken packages that sudo apt-get -f install has fixed

You can now update the system by opening unity and running

update-manager

(Ubuntu's software updater)

Or you can run

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

In a terminal.
After updating clean your system using

sudo apt-get autoremove

And you are ready to install office with:

sudo apt-get install libreoffice


Wireless Stops Working, Other Devices Kicked Off Network [Solved]

Make sure you have the recommended wireless encryption settings:

WPA2-AES only! Not any WPA/WPA2 mixed mode and certainly not TKIP.


Is There A Guide to Debian Live's Seemingly Undocumented Ubuntu Extension?

As noted by Alan Pope, there is not currently documentation for cross-building for ARM with live-build and it will be necessary to pore over the source code.  The documentation does not exist...yet.


"No such file or directory" when trying to run a file

The error resulted because I was using the upper arrow to find a cmd that I used in an earlier run and, even though the recovered cmd read good in the terminal window, the code won't run. By retyping anew the same cmd it worked fine! I think that the corrupted cmd was the result of an ubuntu error (indicated to me by ubuntu) as startup after I put the system to hivernation the day before. I think this is the reason because it happened again, and only retyping the cmd anew resolved the problem. Somehow I have problems every time I startup after I put the system to sleep (the corruption of cmd stored by ubuntu do not happen if I startup from a full shut down).


XUbuntu 17.04 - Install KDE without breaking Xfce config files

Don't quote me yet (I'm still working through this myself, but I have done this in the past as well -- and it worked). Simply reinstall ubuntustudio-desktop after you finish with your kubuntu-desktop (or plasma-desktop) install. I had to redo some things I had customized (like panels) but I didn't backup my xfce configuration first (which you can do if you go into your panel preferences -- though it is a bit janky). I'm currently working through the hybrid installs with 18.04.


I think what you try to achieve is to use the output from your script in your iptables command.

You need to enclose your script in $() or `` like this:

iptables -t nat -A PREROUTING -i wlan0 -p tcp -m tcp --dport 80 -j DNAT --to-destination $(<some_script.sh>)
iptables -t nat -A PREROUTING -i wlan0 -p tcp -m tcp --dport 80 -j DNAT --to-destination `<some_script.sh>`

In that way the output from your script will be used as the parameter in the iptables command.
You need to make sure your script will output an IP address. Something like 192.168.1.13, because iptables expect an IP there.


Copy to Amazon S3 is not successful when running from cron

Path and Other Environment Variables are not in cron
cron does not have many environment variables set. The default value of the path variable in cron is just /usr/bin:/bin. Try adding the full /path/to/the/aws command in the script.
See this answer for a different solution: cronjob cannot find environment variables defined in .bashrc
Also see Crontab execution of multiple commands but last command is omitted
Hope this helps


Does your user has a Samba Password?

sudo smbpasswd -a <myunixusername>

This can be the same pswd as the password for your user -- it has not to be. It makes it easier though.


Trouble purging WINE after upgrade (17.10 to 18.04 LTS)

The reason that it didn't work is that there was a file in the current directory that matched the pattern you tried to pass to apt.

When bash sees an (unquoted and unescaped) asterisk, question mark or other glob character in the command line, it checks the files in the current directory, and if any of the match the pattern, the word containing the special characters is replaced by a space separated list of the matching files. You can see this in your terminal if you type

echo *

where a list of the files/directories under current directory will be printed. In your case the pattern wine* matched the file winehq.key that was located in the current directory, so your command was transformed to

sudo apt purge winehq.key

which of course resulted in an error message since there are no packages with that name in the repository.

In this case, we want the glob pattern not to be interpreted by bash, but to be passed on literally to apt. This is done by escaping or quoting the special characters, like so:

sudo apt purge wine\*

or equivalently:

sudo apt purge 'wine*'

The reason that you might see it work in a different directory, is that when no files match the pattern, the glob is left as is, e.g. with the literal asterisk. So if you ran your command in a different directory it would probably work. But to be on the safe side it is always a good idea to quote/escape any special bash characters, if you want them passed on to the command you are running.

This behavior can be avoided by setting the nullglob bash option with the command

shopt -s nullglob

If this option is enabled, then any pattern that doesn't match files will be set to null instead of retaining its initial value, so it will be much easier to spot such bugs. It's really unfortunate that this option is not enabled by default, it would avoid countless erratic bugs that are only apparent if the right files exist in the current directory.


How can I move the results of a Recoll query to a folder?

You can use the command-line search:

recoll -t "yourquery"

and then filter it to have a list of filenames. For example (surely you can do that more  neatly and safely):

[:~/tmp/lalla/out] % files=$(recoll -t "x11vnc" | awk '{print $2}' | grep file:/// | sed 's+\[file://++' | sed 's/]$//')
[:~/tmp/lalla/out] % echo $files
/home/romano/personal/archivio/Tricks/remote-ubuntu-login.txt
/home/romano/lib/Jed_Backups/remote-ubuntu-login.txt
/home/romano/software/documentation/Ubuntu:Maverick.html
/home/romano/personal/library/Unknown/Ubuntu_Maverick
/home/romano/.wajig/romano-asus/Available.prv
/home/romano/.wajig/romano-asus/Available
/home/romano/.wajig/asus-romano/Available.prv
/home/romano/.wajig/asus-romano/Available

and then using them:

 cp $files my-new-dir/

To understand the complex pipe, recoll -t outputs something like:

8 results
text/plain  [file:///home/romano/personal/archivio/Tricks/remote-ubuntu-login.txt]  [remote-ubuntu-login.txt]   322 bytes

the first awk prints just the second (space-separated) items (and will mess things up if there are spaces in file names, I suppose);
the grep selects only lines with "file:///" in it
the first sed remove the leading [file:// (note the use of + as separator)
the second sed strips the trailing ]

Probably the correct way would be to write a little python program using the recoll python bindings.


How can I read a crash file from /var/crash

In case if you don't want to install a bunch of sub-dependencies for apport-retrace tool, you can unpack apport format into separate files and to use only CoreDump dump with gdb as usual.

apport-unpack systemGeneratedCrashReportPath.crash yourNewUnpackDirectoryHere

cd yourNewUnpackDirectoryHere/

gdb `cat ExecutablePath` CoreDump (pay attention to tildes here!)

bt (output actual back-trace)
Note: apport-unpack will sometimes crash itself on unpack operation (apport seems broken all around... xD), but your CoreDump and other files will be there, just ignore it and delete all .crash files in /var/crash after you move them elsewhere in order to allow system to output new crash reports from same apps there.


dpkg: error: reading package info file '/var/lib/dpkg/available': Is a directory

I'll suggest to remove the problematic directory with:

sudo rm -rf /var/lib/dpkg/available

create empty file with

sudo touch /var/lib/dpkg/available

and proceed with package installation:

sudo apt-get update
sudo apt-get upgrade
sudo dpkg --configure -a


I am not able to find many of the options in my mouse settings in Ubuntu 16.10

Ubuntu 16.10 uses libinput instead of xorg-synaptics by default.

Ubuntu GUI does not support libinput options yet. Nor does libinput support synclient commands.

You can either configure libinput using the /usr/share/X11/xorg.conf.d/60-libinput.conf, or uninstall libinput by

sudo apt remove xserver-xorg-input-libinput

In this case xorg-synapics will be used, and you will have the GUI options back.

Make sure xserver-xorg-input-synaptics is installed. It contains xorg-synaptics software. It should be installed by default though.

For libinput configuration options see http://manpages.ubuntu.com/manpages/yakkety/man4/libinput.4.html


You need to launch CCSM and make sure that Enable Ubuntu Unity Plugin is ticked.

If you don't have CCSM installed, do the following:

Press Ctrl+Alt+T to launch the Terminal.
Type the following command and press Enter

sudo apt-get install compizconfig-settings-manager

Now, launch CCSM by running this command from the Terminal:

sudo ccsm

In the CCSM window, select Desktop → Ubuntu Unity Plugin.

In the next window, make sure Enable Ubuntu Unitu Plugin is checked.


you can see all the processes that are using port 80 at the time you are starting apache2 :

sudo lsof -i TCP:80

and also I think the easiest way to resolve the problem you are facing is to change your port to something else ,
you can change them in this two files in your apache 2 configs:

/etc/apache2/ports.conf
/etc/apache2/sites-enabled/000-default.conf

after these you should restart the apache2 with this command :

 sudo /etc/init.d/apache2 restart

also for getting better result you can run this command to see whats missing or making problem in starting apache2:

 systemctl status apache2.service


Formatting a external HDD and the computer turn off

If the computer shut off because the battery ran out... and if you were trying to badblock the /dev/sdc1 partition... then it didn't complete. Never run fsck whilst on battery alone.

And... if you were trying to badblock /dev/sdc1, you didn't give it a proper command. It should be...

sudo e2fsck -fck /dev/sdc1 # read-only test

or

sudo e2fsck -fcck /dev/sdc1 # non-destructive read/write test

The -k is important, because it saves the previous bad block table, and adds any new bad blocks to that table. Without -k, you loose all of the prior bad block information.

The -fcck parameter...

   -f     Force checking even if the file system seems clean.

   -c     This option causes e2fsck to use badblocks(8) program  to  do  a
          read-only  scan  of  the device in order to find any bad blocks.
          If any bad blocks are found, they are added  to  the  bad  block
          inode  to  prevent them from being allocated to a file or direc‐
          tory.  If this option is specified twice,  then  the  bad  block
          scan will be done using a non-destructive read-write test.

   -k     When combined with the -c option, any existing bad blocks in the
          bad blocks list are preserved, and any new bad blocks  found  by
          running  badblocks(8)  will  be added to the existing bad blocks
          list.


Try these commands,

sudo apt-get purge xserver-common-lts-raring
sudo apt-get -f install

Now run any of your commands like sudo apt-get upgrade or sudo apt-get dist-upgrade.


Remmina does not support opening RDP files. Instead you can open RDP files directly with xfreerdp, the actual RDP client that Remmina uses under the hood for RDP.

You have two options, both described in https://ubuntugenius.wordpress.com/2012/06/18/ubuntu-fix-add-program-to-list-of-applications-in-open-with-when-right-clicking-files-in-nautilus/

Option #1: create a mime-type file association:

Create file /usr/share/applications/xfreerdp.desktop with following contents:

[Desktop Entry]
Name=FreeRDP
Exec=xfreerdp %f
Terminal=true
Type=Application
MimeType=application/x-rdp

Now when you right-click the rdp file and go to options there will be an option to open it with "FreeRDP". The 'Terminal=true' option will open xfreerdp in the terminal (as it's a console application), where xfreerdp will ask for user credentials.

Option #2: use mimeopen:

Run mimeopen against your RDP file with the '-d' flag:

$ mimeopen -d <path to rdp file>
Please choose a default application for files of type text/plain

1) gnome  (gnome-usercreated-1)
2) LibreOffice Writer  (libreoffice-writer)
3) gedit  (org.gnome.gedit)
4) Vim  (vim)
5) Other...

use application #

Type the number corresponding to 'Other...'. In this case it's 5. You'll be asked to type the command:

use application #5
use command:

Because xfreerdp is a console app, you can't just type xfreerdp here. Instead pass xfreerdp as an argument to your terminal app, in my case gnome-terminal:

use command: gnome-terminal -x xfreerdp

The xfreerdp will then launch in a terminal window and will open the RDP file.


Difference between Ubuntu 64 bit for Macs and just Ubuntu 64 bit?

The standard DVD supports both BIOS and UEFI booting, using a multi-catalog where the device is supposed to decide which should be booted.

Although Mac uses EFI (an earlier version of UEFI), it does not support the "multi-catalog", and as a result will not boot.

The Mac DVD uses just the one specific boot image for Mac.

[Ref]


That is a well known bug and I think I saw some progress on it. Actually, I don't think I've experienced that in a while. Make sure to install the newest upgrades. It might have been fixed. If not, until it does get fixed, you can easily "fix it" by pressing alt+f2 and typing killall unity-panel-service. This will restart the indicators and it will be back to normal.

Unless you want to actually fix the code, there is nothing you can do to prevent it, save add some information to the bug report.


Automate keystroke enter in curses with command from bash

Thanks, i found that the easiest way to install a package ,with script ,that need confirmation (enter pressed) from the user.

First you have to find where you will echo the true value. Open a terminal and install the package, let's say  the package that you want to install is the oracle-java8-installer

1)"sudo apt-get -y --force-yes install oracle-java8-installer" (i used force yes so it don't ask for y/n)

Find the name of the parametre that need to be set true.
2) "sudo debconf-show oracle-java8-installer" ,with this you ll see the parametres of the package . In this example the bash replies with:

shared/error-oracle-license-v1-1:
* shared/accepted-oracle-license-v1-1: true
  oracle-java8-installer/local:
  oracle-java8-installer/not_exist:
  shared/present-oracle-license-v1-1:

From the above list we need the "shared/accepted-oracle-license-v1-1" this is the parametre that sould be true.(now it's already true because the installation is done in this machine)

3)So now that you know the parametre, in the script you'll write:
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections (for setting the value)
and
sudo apt-get -y --force-yes install oracle-java8-installer (to install)


How to remove ( Delete ) the MGSE & Mate packages?

If you have install MATE via the linux mint repository, then you will have upgraded many of the core ubuntu packages.  You will find it very difficult to "remove" MATE after this sort of upgrade.  I would suggest a restore from backup or just a complete reinstall...

However - if your concern is that software center/synaptic is not working then you can fix this as per the linked question.

N.B. IMHO the better way to experiment with MATE is per my answer here: How do I install MATE (the desktop environment)?

Linked Question:

How to I fix software center after installing the Linux Mint MATE desktop?


What is best hard disk configuration for Ubuntu 11.10?

if you just want to try it out I suggest you create a Live CD. and boot from that and click on the alternative try it out.

OR

you could go to the Ubuntu homepage and try out Ubuntu via a webbrowser.

When you want to install it you can easily go back to the live cd and choose Install instead of try it out. In the next menu you will be asked if you want to make a partition or if you just want to use the whole disk.

If you have any further questions, just ask in the comment and I will explain it more in my answer.


Removing source dependencies after building from source

Yes, apt-get autoremove is the command to use; it'll remove dependencies that were installed automatically and are no longer required.

You can choose during removal of a program to remove the dependencies at the same time with apt-get remove --auto-remove packagename.

You can also use Bleachbit - it does the following:

  BleachBit deletes unnecessary files to free valuable disk space, maintain privacy, and remove junk. Rid your system of old clutter including cache, cookies, Internet history, localizations, logs, temporary files, and broken shortcuts. Designed for Linux systems, it wipes clean Adobe Reader, APT, Bash, Beagle, Chromium, Epiphany, Firefox, Flash, GIMP, Google Earth, Java, KDE, OpenOffice.org, Opera, RealPlayer, Second Life viewer, Skype, VIM, XChat, Yum, and more.

Probably what you're looking for...


Just go ahead and build it, it's not hard. I'll walk you through it.

Go to https://github.com/Genivia/ugrep.
Click on "Code" and download ugrep-master.zip.
Open the download folder.
Open ugrep-master.zip.
Drag the ugrep-master folder out of the zip.
Open the new ugrep-master folder in the terminal.
Enter ./build.sh and let it finish.
Enter sudo make install and let it finish.
Type man ugrep to make sure it has installed properly.

That's it. It's straightforward and installs just fine on 18.04. See the following image:

Note: You'll probably need to install 'build-essential', if you've not already done so. It's just the following command:
sudo apt-get install build-essential

Anyhow, there's no real need for a .deb with this one. It's really easy to compile and install. Just follow the above directions and everything should go fine.


Why doesn't Ubuntu have any media codecs?

Ubuntu's commitment to only include completely free software by default means that proprietary media formats are not configured 'out of the box'. See Ubuntu's Free Software Philosophy and the Free Formats page for a more comprehensive discussion of these issues.

Notable part from the 1st link:

  Ubuntu 'main' component licence policy

  All application software included in the Ubuntu main component:

  Must include source code. The main component has a strict and non-negotiable requirement that application software included in it must come with full source code.
  Must allow modification and distribution of modified copies under the same licence. Just having the source code does not convey the same freedom as having the right to change it. Without the ability to modify software, the Ubuntu community cannot support software, fix bugs, translate it, or improve it.

and from the 2nd link:

  What is a Free format?

  Some file formats are proprietary, which means that they are owned by a company or other organisation. Sometimes, the owners of such formats charge licensing fees or impose legal restrictions on the use of their formats. This means that people may be unable to use or distribute these formats without first paying a fee or applying for a license.

  A Free or open format is one which can be used by anyone, free of legal restrictions on how they use the format. Free formats are very popular - the World Wide Web is based on the open HTML standard. Ubuntu supports many free formats and the open-source community as a whole encourages their wider use.

  Restricted Format MP3, AAC, WMA, WMV, MPEG-4, H.263, doc, xls, ppt

  Preferred format Ogg Vorbis, Ogg Theora, WebM, OpenDocument format

edit: are you sure Lubuntu installs lubuntu-restricted-extras by default? A small search would suggest not. This suggest Lubuntu uses the same method as Ubuntu:

  When you installed Lubuntu, you had a chance to check a box enabling you to install restricted addons that enabled things like MP3/DVD/Flash playback. If you forgot to do this, you can still install these packages by opening the Lubuntu Software Center (version 12.04 and later) in the menu under System Tools. Search for “lubuntu-restricted-extras” and, when the selection loads, click “Install.”


When in doubt, read the source code.  =)

Bash 4.3, shell.c line 830, in function parse_shell_options():

  /* A single `-' signals the end of options.  From the 4.3 BSD sh.
     An option `--' means the same thing; this is the standard
     getopt(3) meaning. */
  if (arg_string[0] == '-' &&
       (arg_string[1] == '\0' ||
         (arg_string[1] == '-' && arg_string[2] == '\0')))
    return (next_arg);

In other words, the - is saying that there are no more options.  If there were any more words on the command line, they would be treated as a filename, even if the word started with a -.

In your example, of course, that - is completely redundant, as there is nothing following it anyway.  In other words, bash - is exactly equivalent to bash.

Bash takes its commands

from a script file if it's provided on the command line, or
non-interactively from its stdin if its stdin is not a TTY (such as in your example: stdin is a pipe, so Bash will execute the contents of that URL as a script), or
interactively if its stdin is a TTY.

It is a misconception that bash - tells Bash to read its commands from its standard input.  While it is true that in your example, Bash will read its commands from stdin, it would have done so regardless of whether there was a - on the command line, because, as stated above, bash - is identical to bash.

To further illustrate that - does not mean stdin, consider:

The cat command is designed to interpret a - as stdin.  For example:

$ echo xxx | cat /etc/hosts - /etc/shells
127.0.0.1 localhost
xxx
# /etc/shells: valid login shells
/bin/sh
/bin/dash
/bin/bash
/bin/rbash
/bin/zsh
/usr/bin/zsh
/usr/bin/screen
/bin/tcsh
/usr/bin/tcsh
/usr/bin/tmux
/bin/ksh93

In contrast, you can't get Bash to execute /bin/date then /bin/hostname by trying this:

$ echo date | bash - hostname
/bin/hostname: /bin/hostname: cannot execute binary file

Rather, it tries to interpret /bin/hostname as a shell script file, which fails because it's a bunch of binary gobbledygook.
You can't execute date +%s using bash - either.

$ date +%s
1448696965
$ echo date | bash -
Sat Nov 28 07:49:31 UTC 2015
$ echo date | bash - +%s
bash: +%s: No such file or directory

Can you write xargs bash instead?  No.  curl | xargs bash would invoke bash with the contents of the script as command-line arguments.  The first word of the contents would be the first argument, and it would likely be misinterpreted as a script filename.


Ubuntu Studio is Linux-based operating system designed as a free, open, and powerful platform for creative people to create their art.

  Ubuntu Studio is also Free and Open Source Software (FOSS). Ubuntu
  Studio free to download and use. You can get the source code, study it
  and modify it. You can redistribute Ubuntu Studio and can even
  redistribute your modified version. Read more about these freedoms at
  GNU.org’s Free Software page.

  As an officially recognized derivative of Ubuntu, Ubuntu Studio is
  supported by Canonical Ltd. and an amazing and continually increasing
  community.

  Ubuntu Studio is released every six months, but a long term release
  (LTS) version is released only every 2 years.

  Contents:

  Audio
  Graphics
  Video
  Photography
  Publishing1

  KXStudio is a collection of applications, artwork and plugins, targeted at audio and video production. KXStudio is also a Linux
  Distribution, currently based on Ubuntu 12.04. Although focused on
  GNU/Linux, some of our applications work in other Operating Systems.

  The KXStudio project is divided into 4 categories:

  Applications
  Artwork
  Plugins
  Repositories (it uses Ubuntu repositories (PPAs))2

Based on the information above, I would recommend that you go with Ubuntu Studio.

1Source:Ubuntu Studio

2Source:KXStudio


Refresh rate is 120Hz while my screen is 60Hz

Compiz interferes with the driver's ability to actually refresh at 120 Hz.

You can spend hours of your time wondering why everything (include glxgears) reports a 120 Hz refresh rate, yet the screen isn't actually updating that fast. If you have "Desktop Effects" or anything of that nature enabled, turn it off to compare both xrandr and glxgears refresh rates.

Source


Issues burning .iso images with 14.r04 Trusty Tahr

codecs are not involved with ISO burning. Permissions
would already interfere at the beginning of the burn run.
So it's most probably your drive which fails to burn
the given media in a recognizable way.

You could try a different media type and/or brand
or a different burner drive.

Have a nice day :)

Thomas


Virtualbox , Ubuntu 11.10 , linux-kernel 3: cannot start virtual machine

Have you tried to build the kernel module?. It should have been builded during the installation, but it looks like it failed. You can try:

sudo dkms install virtualbox/4.1.2

This should build the module.


WI-FI adapter not found , and Git repo not available to fix that?

Larry Finger's rtlwifi_new git repo is not available.
He created a new rtw88 repo.
https://github.com/lwfinger/rtw88
For Ubuntu it is recommended to install using dkms. The dkms.conf file is available there.


Mounting with discard is not very good, because it affects performance, if you delete many files.

Swap is always trimmed automatically, as far as I know.

You can setup trim as you like in crontabs. In Ubuntu it is set by default to once a week.


How can I install a package from Octave Forge?

If you  use -forge then only put the name  and not the version.

pkg install -forge package_name   # (not the version)

is what you want

You can alternative do this:-
This is permanent fix.
In your terminal type

sudo apt-get install octave-<package_name_you_want> (eg-image)

and then in octave type

pkg load <pkg name>


Mono-Server4, Apache2, and Ubuntu 14.04.2

Try using the latest version of mono found here http://www.mono-project.com/docs/getting-started/install/linux/

make sure you follow the instructions for ubuntu 13.10 or later

this should correct the mono installation -- worked for me (thanks to my son)


Ubuntu 17.10 freezes on shutdown or restart - a stop job is running for TLP system startup/shutdown

It is probably this bug: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1724317

It should be fixed and be released till 05.11.


This sounds like everything is setup correctly and it should indeed work. Please check with your ISP if port 80 (http) is blocked.

Alternatively you can configure apache to use a different port (e.g. 1234) and then use the URL http://your.ip.he.re:1234/owncloud to try to reach the server.

If that's successful than your ISP is blocking port 80 (and potentially other ports too) and you'll need to use a port different from the blocked ones.


Here I founded some voodoo tricks that helped me, maybe useful for you :
https://bugs.launchpad.net/ubuntu/+source/mysql-5.5/+bug/989353

I removed the following packages and then reinstalled mysql-server :

sudo apt-get --purge remove mysql-server-5.1 mysql-server-5.5
sudo apt-get install mysql-server


Ubuntu won't boot after GUI crash, now bad superblocks?

I had a laptop with a Samsung hd that started doing this (a crash, and a badblock on the following restart) and the SMART tool still gave an "ok" status.

Try to boot for a live CD or USB and doing a search for bad blocks on the disk/partition affected:

fsck -vcck /dev/<device-PARTITION>

(Warning: it is bound to be a really slow and long thing --- in the hour range). In my case, it listed a couple more. After repair it all worked ok during maybe a couple of weeks, and then I had another one. SMART still saying that the disk was ok.

I replaced the disk (with an SSHD, nice thing!) and now it's all working ok. So my advice is, at the first badblock --- make a backup every day and, at the second badblock, trash the disk and go for a new one.

(BTW - as commented in the question, checking the SATA cable is also worth a shot - random errors in different spots can be a telltale symptom).


Blurry wallpaper of downloaded image even after using image compatible to screen resolutions

I suspect you have downloaded the low-resolution thumbnail from the google images search, not the original image. You need to click on the image and choose "view original image" and download that one.


How to delete all first-level subfolders that do not have a specified string in their names

Let us say you want to start find in the current directory, and restrict it to the first level of subdirectories:

find . -maxdepth 1

The find command has a useful flag -not (or !) which negates the following test. So in order to find a name which does not contain a substring, add

-not -name "*substring*"

IMPORTANT: you will want to exclude the current directory itself as well. Otherwise, the whole current directory would be deleted.

-not -name "."

Then you want to test for directories only:

-type d

And, if everything looks good, you want to delete these directories:

-exec rm -rf {} \;

which says "for all found directories, execute this command". The {} is a placeholder for the name of the directory (including the full path, so it works on the correct one). \; indicates the end of the command to be executed.

Summarizing:

find . -maxdepth 1 -not -name "*substring*" -not -name "." -type d -exec rm -rf {} \;

should work. But first, try it out without the -exec part.


Is there a shortcut to re-open a recently closed program?

As requested in comments, a conceptual answer, no ready-to-use script.
Explanation on concept; how to log the most recently closed application

Introduction
From a list of processes & pids, it is hard to decide which belongs to an application or another process. Since you mention GUI applications however, we can log windows, which gives us all information we need to decide which was the most recently closed application.
Using wmctrl to list running GUI applications
wmctrl (not on your system by default) is a command- line tool that can give you information on currently existing windows. The command:
wmctrl -lp

produces a window list, looking like:
---
0x02c0000c  0 23772  jacob-System-Product-Name Hud
0x02e0000a -1 23877  jacob-System-Product-Name Desktop
0x0480001d  0 28367  jacob-System-Product-Name Ask Ubuntu General Room | chat.stackexchange.com - Mozilla Firefox
0x05200007  0 26724  jacob-System-Product-Name System Monitor
0x05800084  0 27183  jacob-System-Product-Name *Untitled Document 1 - gedit
---

In the second column of the list, you can see the pids of the currently opened windows, like: 23877, 28367
From these pids, we can retrieve the process (application) that owns the window, using the command:
ps -o cmd= <pid>

e.g.:
$ ps -o cmd= 27183
gedit

Then all we need to do is run a loop with a period of a few seconds, comparing the (unique) list of processes, owning a window (=applications), with the list of a few seconds ago. If a process "left" the list, that's the most recently closed window. In short:
(Conceptual) overview of the loop (python style)
applications1 = get_applications()
while True:
    time.sleep(3)
    applications2 = get_applications()
    closed = [app for app in applications1 if not app in applications2]
    if closed:
        most_recent = closed[0]
        # store the process in a file, to be available to run as most recently closed
        open(f, "wt").write(most_recent)
    application1 = application2

where f is the path to a file where the most recent application is written to. Subsequently have another process/command start the application in the file and the setup is completed.
Language?
No doubt this can be done in pretty much all script languages. To me, python seems just the right one for easily producing scripts like this...
Note
Note that the schematic code above is just for example, no tested code!


Install Ubuntu Netbook 10.10 without CD/USB/WUBI from HDD on WinXP

It is not currently possible to migrate a Wubi installation to a dedicated partition.

In order to do a full installation of Ubuntu that isn't reliant on your Windows partition to operate, you will need to use a CD, USB disk, or PXE boot from another computer containing the live media.

We are working on fixing this, but it is a longer-term goal of Wubi and will likely not make the 10.10 release.


Synaptic requiring too many additional removals?

This should not be a problem

sudo apt-get remove llvm-3.4 llvm
sudo apt-get autoremove


Open Updates(probably named Update manager), click on Updates tab and select Notify me about new version: Any new version (or so, I have different language installed).
Then, run your update manager and it should give you an option to upgrade.


Ctrl+click on link in a browser doesn't open page in a new tab

I eventually discovered that CTRL cause a drag operation evidenced by the change in the mouse pointer.  By holding CTRL down I am able to drag a Window around not only by the title bar but by any part of the window including the hyperlink in the browser window.  I had to turn this off in Unity under Windows > Moving and Resizing Windows > Special Key to move and resize Windows > Alt.  (from Ctrl.)

Then under Mouse and Touchpad on the Touchpad tab I had to set Advanced > Two-finger click emulation > Middle Button, which apparently Chrome accepts as a mechanism for opening a link in a new tab.  So while I don't have CTRL+click on a link working I have a two-finger touchpad press on a link working, which is acceptable.

Later, I restarted Chrome and CTRL+click appeared to be working again.  Thus I suspect the first issue was the main thing.


I forgot my username, how do I get it back?

If you can not even log in because you cannot remember your username, there is still a way to recover your data. Note that this guide assumes you're the only user on the system.

Boot the system into Recovery Mode through GRUB.
Select the Root Shell option.
Type in this command into the terminal window that opens: awk -F: '$3 == 1000' /etc/passwd
Your username will be at the very beginning of the line on one of the returned lines. Typically there will only be one, but there may be more depending on your system.
Reboot into normal mode and use the username specified.

If you are not the only user, replace the code on step 3. Look for a user with an ID greater than or equal to 1000 by:

awk -F: '$3 >= 1000' /etc/passwd

One of them is bound to be you. Or ask another user on the machine to pull the account list.


Just for the curious ones: dd copys the UUID of the USB drive as well so the result of the command found under the link in the questions really creates an exact copy which boots fine without any modification.


Intel's Platform Trust Technology on Ubuntu 18.04

I received help from a wonderful Netzien who helped me decipher A TPM error (378) in the dmesg logs above.  In hex 378 = 0x17A, which I was able to track down in the kernel source code.  The kernel in Ubuntu 18.04 does not support this TPM command, but Ubuntu 18.10 with kernel 4.18.0 does!  I see /dev/tpm0 in Ubuntu 18.10.  :)


Conjure Up : Unable to deploy OpenStack Cloud on LXD Configuration Ubuntu 16.04LTS (LXD not found)

I encountered the same issue on Ubuntu 16.04 and found out there is a compatibility issue with LXD (default Ubuntu's lxd or installed via snap) and conjure-up. Conjure-up could not access LXD containers or something (look into the logs). So what I did to make it to work is to install the latest LXD from its PPA and start the conjure-up again.

1. It's better to have a fresh server to start with so I re-installed Ubuntu 16.04t

2. Instead of using the default LXD, I added the LXD's stable PPA and upgraded it (important):

$ sudo apt-add-repository ppa:ubuntu-lxc/stable
$ sudo apt update
$ sudo apt dist-upgrade
$ sudo apt install lxd zfsutils-linux

3. Configure LXD (important):

$ sudo lxd init

Just answer the questions using the default values except for the IPv6's one. Then you will have a bridge network interface (e.g. lxdbr0: 10.x.x.x) and a zfspool.

4. Disable IPv6 on all the network interfaces:

$ sudo sysctl -w net.ipv6.conf.lxdbr0.disable_ipv6=1
$ sudo sysctl -w net.ipv6.conf.enp2s0.disable_ipv6=1

Note: change lxdbr0 and enp2s0 to your correct network interface names

5. Install conjure-up using snappy:

$ sudo snap install conjure-up

6. Then you will be able to deploy OpenStack NovaLX using conjure-up:

$ conjure-up

I also put the instructions here: http://www.dangtrinh.com/2017/09/how-to-deploy-openstack-in-single.html

Hope that will help.


PIA Client installation on Ubuntu system with encrypted home folder (ecryptfs)

OP's answer (taken from the question)

  Thanks to Chris W. and Mason D. at PIA Support for the help getting
  the PIA client for Ubuntu working on a system using ecryptfs! I
  thought I should share this guide I compiled from information I was
  given as well as things I discovered with anyone else experiencing
  issues with the PIA client on Ubuntu using an encrypted home
  partition.    First of all, untar the installer file using tar xzvf and
  run ./pia-v62-installer.sh and follow the normal installation prompt.
  The applet will open and here you should enter your username and
  password and change desired port settings and security, all of which
  will remain after you move the directory later.   Note that the PIA
  client will NOT connect because, according to Mason D., "This error
  message normally appears when you have an encrypted home directory
  using eCryptfs. Our application makes use of suid; SUID stands for Set
  User ID. Essentially, this lets our application run as root without
  requiring the user to enter a password. However, eCryptfs, does not
  allow suid binaries in users home directories to be executed. It is
  set this way by default to prevent privilege escalation attacks."
  Then, you must type the following in your terminal:

cd /
mkdir pia
sudo chown root:root pia
sudo mv /home/your_username/.pia_manager /pia/.pia_manager
ln -s /pia/.pia_manager /home/your_username/.pia_manager

  In summary, you are creating a new directory for pia to occupy in the
  root filesystem, changing the access permissions to the root default,
  moving the application files there, and creating a symbolic link with
  the same name in your home directory so that dependencies are not
  broken (it will not work if you fail to create the symbolic link).

  In Ubuntu, the process of connecting with ipv6 leak protection enabled
  in the PIA client also appears to be faster when ipv6 is disabled for
  the regular internet connection in the system network manager. Click
  the network-manager applet, then go to 'Edit Connections' =>
  'Your_Network' => 'Edit'. In the 'IPv4 Settings' tab, check 'Require
  IPv4 addressing for this connection to complete', under 'Method'
  choose 'Automatic DHCP addresses only', then click the 'IPv6 Settings'
  tab and under 'Method' and select 'Ignore' to disable ipv6. The reason
  why disabling ipv6 is important is because your device's physical MAC
  address is included in an ipv6 address (very, very bad for privacy).

  Now, take notice of the pia.sh file placed in your home ~/ directory
  from the installer. Modify the permissions to that of a default script
  using the command 'chmod 755 ~/pia.sh', and change the name to
  pia-manager using the command 'mv ~/pia.sh ~/pia-manager'. Create a
  directory for user-defined scripts, using 'mkdir ~/Documents/scripts',
  then move the script file there using 'mv ~/pia-manager
  ~/Documents/scripts'. Now open the pia-manager file with your favorite
  text editor (I like emacs, type 'emacs -nw
  ~/Documents/scripts/pia-manager') and change the content to the
  following:

#!/bin/sh
/pia/.pia_manager/pia_manager/run.sh > /dev/null 2>&1 &

  Save the file (in emacs it's ctrl-x, ctrl-s) and then edit your path
  using 'sudo emacs -nw /etc/environment' to include the directory
  /home/your_username/Documents/scripts. Make sure to add a colon :
  after the last path in the file, then append the path to your scripts
  directory. Your file should look something like this:

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/Qt/5.7/gcc_64/bin:/home/your_username/Documents/scripts"

  Now for the icing on the cake (and correct startup for that matter),
  open Startup Applications from the Unity dash, select 'Private
  Internet Access'=>'Edit' and delete the whole line in the 'Command'
  box and replace it with the name of your script, 'pia-manager'. Reboot
  your computer, and the PIA client should automatically connect.   Note
  that you can now exit the application and at any time relaunch the PIA
  client using your script by simply typing 'pia-manager' anywhere in
  your filesystem in a terminal! Because this script is in your path,
  tab completion also applies, making it very convenient to launch the
  PIA client. I hope you found this guide useful and informative!


How to check if there is already a swap area?

There are many ways for it, here are my favourite ones-

Type in the terminal and press Enter:

 cat /proc/swaps

Type in the terminal and press Enter:

swapon -s

Type in the terminal and press Enter:

free


Gnome keyring doesn't unlock after loging in using Pam-face-authentication

That is because your keyring is encrypted with your login password, and since you don't enter the password to log in, pam can not unlock your keyring automatically.  There may be a way to disable the keyring password, but I am not sure how.  Of course, this would mean that if your system is compromised, someone could read all of your passwords and keys stored in the keyring.


Command to switch on/off sharing Ubuntu desktop

It's not so easy on the new Ubuntu releases :(
To enable desktop sharing, you have to:

Install vino package. The entry for Desktop sharing should appear somewhere in your applications menu.

You have to set some configuration parameters for vino-server, but probably the only way to do it is via dconf-editor or gsettings (the GUI to set these parameters has been removed long ago). In dconf-editor, go to /org/gnome/desktop/remote-access and set your parameters.
For example, if you want to authenticate with a password, you should:
a) set authentication-methods to ['vnc']
b) set prompt-enabled to false
c) set require-encryption to false
d) set vnc-password to base64 encoded value of the password you want to use to connect

Start vino-server by clicking the desktop sharing entry from the menu.

On the other system, use any VNC client (eg. Remmina, which is installed by default) to connect.


If you remove OpenJDK, it will break dependencies, but these dependencies are only related to Java. If you uninstall it, anything that requires Java to run will not work until you install OpenJDK again. Also, there's not big reason to uninstall OpenJDK 7. It still works with everything v8 does, and is more stable.


Attempting to install overgrive but getting dpkg/python error

In the standard Ubuntu repositories, pip is only available in the pretty outdated version 1.5.6, as can be seen in the example output below of my 15.04 installation:

$ apt-cache policy python-pip
python-pip:
  Installed: 1.5.6-5ubuntu2
  Candidate: 1.5.6-5ubuntu2
  Version table:
 *** 1.5.6-5ubuntu2 0
        500 http://[...]/ubuntu/ vivid/universe i386 Packages
        100 /var/lib/dpkg/status

However, on PyPI (Python Package Index), the place where pip gets its packages from and which can always be considered up to date, the latest available version is currently (Oct 12, 2015) version 7.1.2.

It is known that the old pip 1.5.6 often causes problems when other, newer Python packages get installed. It either breaks entirely after having installed e.g. the Python package requests, or as in your case, fails to install a specific Python package.

To fix this problem and be able to install overgrive, you just have to upgrade your currently installed pip with the PyPI version, not through apt-get from the repositories. To do so, just perform the following command:

sudo -H pip install --upgrade pip

The command above installs pip 7.1.2 (or newer) from PyPI to your system. The old 1.5.6 version of pip from the repository will still be available, but when you just type pip into the terminal without an absolute path, the version installed through pip itself will always be preferred. You should not uninstall the repository version of pip using apt-get though, because that might lead to dependency problems. Just leave and ignore it.

To update pip3, which is pip for Python 3, you would use the following command instead:

sudo -H pip3 install --upgrade pip

If pip is broken and fails to install anything, you may temporarily use easy_install instead to get the latest version which usually fixes the problem. The commands for Python 2 and 3 respectively would be:

sudo -H easy_install --upgrade pip
sudo -H easy_install3 --upgrade pip


This is nonsense. Data flows over IP packets, which have to be sent and received. If you're only interchanging packets with one site (your provider), there is NO WAY to keep that site from counting packets.

If you're going to use that much traffic (games, porn, business, or whatever), you'll have to pay for it.


Is the Ubuntu 16.04 box behind a firewall - like your ISP modem's firewall? If so you have to configure the modem firewall to have a NAT route for the ssh port (22) from the external network to your Ubuntu box.


Echo to file apparently needs double escaping backslash (\\\n) to write \n. Why?

The problem seems to come from the builtin echo in dash (which is sh in Ubuntu by default), which seems to process its \ arguments differently from other implementations (/bin/echo and the builtin echo in Bash):

$ sh -c "echo '\\n'"

$ sh -c "/bin/echo '\\n'"
\n
$ bash -c "echo '\\n'"
\n

This is not surprising, as using \ arguments in echo is non-standard:

http://pubs.opengroup.org/onlinepubs/009695399/utilities/echo.html

  If the first operand is -n, or if any of the operands contain a backslash ( '\' ) character, the results are implementation-defined.

You should use printf instead of echo, like this:

printf '$template GRAYLOGRFC5424,"<%%pri%%>%%protocol-version%% %%timestamp:::date-rfc3339%% %%HOSTNAME%% %%app-name%% %%procid%% %%msg%% \\n"\n' | sudo tee -a rsyslog.conf

As a added bonus, using sudo tee to write to files as root instead of sudo sh -c + shell redirections makes the command cleaner, since the string is parsed only once (as an argument to printf) instead of twice (first as an argument to sh -c and then as an argument to echo).


Simple Scan: PDF does not open on Android (Adobe reader) (dated 1970!)

I found out that there was a related thread on the Adobe forums http://forums.adobe.com/thread/1029452 which does not solve the problem. It is not a download issue since I just tried transferring the files over wifi with AirDroid and the problem persisted.

Temporary solution (question is still open though):
Use pdftk to fix the files:

pdftk broken.pdf output fixed.pdf

This made the files open on Android with Adobe Reader but I am still wondering what the problem is and how not to face it with future scans.


Which package provides this login screen?

According to the wiki, the package is unity-greeter and it is part of lightdm, these are the relevant files for customization

/usr/share/lightdm/lightdm.conf.d/*.conf
/etc/lightdm/lightdm.conf.d/*.conf
/etc/lightdm/lightdm.conf

Specifics can be found at the wiki link.


Installing Win7 SP1, Dual Boot with Ubuntu, using GRUB and not Win Sys Reserved partition

So I went ahead and clicked on the Windows 7 partition under Disk management in Win7 environment and set it as Active. I was then able to perform the SP1 update on it. The GRUB2 bootloader was not affected at all and now I'm on Linux Ubuntu with no problem. I think the only thing to denote is that the Active partition now is Win7 instead of Linux. However, the same effect of dual effect still holds. Hence; mission accomplished with no problem. Ty anyways. :)