The way it is done in the screenshot that you posted, is via TreeView and ListStore. You will want to create a window with Grid widget inside it, create TreeView widget within it and provide the content via ListStore. After that you can attach some other widget on the right using grid.attach_next_to(self.some_other_widget, view, Gtk.PositionType.RIGHT, 2, 1). In this case the example is a label, but you probably could attach a Gtk.Box inside with other widgets within.

Note  that this example provides Gtk-3 example. PyGTK is for Gtk-2, which is slowly becoming less and less widespread.

from gi.repository import Gtk
import sys

class MyWindow(Gtk.ApplicationWindow):

    def __init__(self, app):
        Gtk.Window.__init__(self, title="Some Title", application=app)
        self.set_default_size(100,100)

        listmodel = Gtk.ListStore(str)
        listmodel.append(['one'])
        listmodel.append(['two'])
        listmodel.append(['three'])

        view = Gtk.TreeView(model=listmodel)

        cell = Gtk.CellRendererText()
        col = Gtk.TreeViewColumn("Column Header", cell, text=0)
        view.append_column(col)

        view.get_selection().connect("changed", self.on_changed)

        self.label = Gtk.Label()
        self.label.set_text("")

        grid = Gtk.Grid()
        grid.attach(view, 0, 0, 1, 1)
        grid.attach_next_to(self.label, view, Gtk.PositionType.RIGHT, 2, 1)

        self.add(grid)

    def on_changed(self, selection):
        model,iterator = selection.get_selected()
        self.label.set_text("You selected "+model[iterator][0])
        return True

class MyApplication(Gtk.Application):

    def __init__(self):
        Gtk.Application.__init__(self)

    def do_activate(self):
        win = MyWindow(self)
        win.show_all()

    def do_startup(self):
        Gtk.Application.do_startup(self)

app = MyApplication()
exit_status = app.run(sys.argv)
sys.exit(exit_status)

On the other hand, it would probably be simpler and prettier to use Gtk.Notebook.

See for more info:

https://www.tutorialspoint.com/pygtk/pygtk_treeview_class.htm
https://developer.gnome.org/gnome-devel-demos/stable/treeview_simple_liststore.py.html.en


Ubuntu 16.04 gnome terminal double-click to highlight/copy

Double-click to select text is the default behaviour of gnome-terminal (v3.13.3 for reference). However, I came across this question because it stopped working for me. The solution, for me, was in the "Mouse & Touchpad" settings, I had to change the "Double-click" slider and set it about half-way between Slow and Fast.  I think gnome-terminal doesn't pick up my double-click when the setting is too far on the Fast side.


Multiple JDK is not working properly in Ubuntu 14.04

There is too much reasons why you can see this error.

Could you please run all this commands one by one, and post output here:

file /usr/bin/java
type /usr/bin/java
echo $JAVA_HOME
echo $PATH
ls -ahl /usr/lib/jvm

Then - using update-alternatives choose jdk1.7.0_55 and run this

$ ldd $(which java)

using update-alternatives choose jdk1.7.0_21 and run this

$ ldd $(which java)

then again for jdk1.7.0_21 run this

$ sudo java -version

UPDATE. Answer

For everyone who has same problem:

First of all, run sudo ldconfig. It is safe to run ldconfig at any time

After a long discussion we concluded that jdk1.7.0_21 is corrupted.

How we determine it:

When choose java jdk1.7.0_21, sudo java -version give error even if run as root.
find /usr/lib/jvm -name "libjli.so", this command must show that libjli is located in folder where jdk1.7.0_21 installed. In our case it was not.

In other cases:

Check that jdk belongs to root:root

Check that /usr/bin/java is a symlink, not executable.

Check PATH, java should not be in the PATH, if you are using update-alternatives.

Also here is helpful links:

https://unix.stackexchange.com/questions/16656/problem-to-launch-java-at-debian-error-while-loading-shared-libraries-libjli

https://www.centos.org/forums/viewtopic.php?t=16398

https://superuser.com/questions/310371/problem-launch-java-on-debian-error-while-loading-shared-libraries-libjli-so


ipv6 causes slow download speeds, but if disabled cannot use vpn Ubuntu 18.04

There's a lot to unpack here about your issue, but since you only asked for a way to disable ipv6 permanently that doesn't interrupt the VPN service, simply add these lines to /etc/sysctl.conf at the end:

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1

This should work since your manual command did.


I have just installed AMDGPU-PRO driver (current version is 16.30) and the sound now works from my screen using the HDMI cable!

$ sudo lspci | grep VGA

gives me

[AMD/ATI] Tonga PRO [Radeon R9 285/380]


No cronjobs are running but cron logs are generating in syslog

Have a look at /var/spool/cron/crontabs

If it is not empty, then there is your culprit.

You will need root privileges to look at that directory.

The filenames will be of the owners usernames.


Ubuntu 16.04 intel graphic driver install problem

If the monitor you are trying to connect is the one in the picture, then looks ok to me.

You can see the desktop wallpaper on the HP monitor, for me there is signal.

That is the same configuration I use when plugging my laptop to my TV via HDMI cable.

You won't see the folders you have on the PC/laptop desktop unless you select the mirror display option.

Same for the launchpad bar, if you want it on both monitor you have to select it from the drop down menu in the corrispondent option.


How to redirect all subpage to its main page?

Try this rule in your .htaccess file:

RewriteEngine on
RewriteCond %{REQUEST_URI} ^/main-page/.*$ [NC]
RewriteRule ^(.*)$ http://www.example.com/main-page/ [R=302,NC,L]


Xubuntu upload photos to Facebook or Picasa via shotwell

Shotwell 0.13, as Yorba has developed it, does not require Ubuntu Online Accounts.  Ubuntu modified Shotwell to use their UOA system, which is why you're seeing this problem.  We did not realize that this change would make Shotwell not work on Xubuntu.  I don't know if Ubuntu is aware of this either.

I can offer three solutions for you:

Use Yorba's PPA to get the latest version of Shotwell for Quantal: https://launchpad.net/~yorba/+archive/ppa
Download, build, and install Shotwell from our tar ball: http://yorba.org/shotwell/install.html
Install Ubuntu Online Accounts, if it works with Xubuntu (I don't know if it does).

We like to track all bugs with Shotwell, and so this one is ticketed here: http://redmine.yorba.org/issues/6069

UPDATE: Ubuntu has acknowledged this is a problem on their end and are working to fix it: https://bugs.launchpad.net/shotwell/+bug/1078642

UPDATE #2: Ubuntu has committed a fix to this problem, I don't know when it will be released.


I just solved it !! I just went to pavucontrol, in the input i press in unlock icon tab, then just muted the front right channel and it started working perfect!


Is there any terminal viewer of CHM files in Ubuntu?

Not a perfect viewer but a workaround.

Install archmage: a CHM(Compiled HTML) Decompressor,
extract the file
open the output in a non-graphical (text-mode) web browser, e.g. lynx:

sudo apt-add-repository universe
sudo apt-get update
sudo apt-get install archmage

sudo apt-get install lynx-cur

archmage file.chm output_dir

lynx output_dir

Another extract tool is extract_chmLib, also in the universe repository:

sudo apt-get install libchm-bin
extract_chmLib file.chm output_dir


How can I download the source code of kernel 3.5.0-17-generic image shipped with Ubuntu-12.10

If you are looking to just get the sources to the kernel that you are currently running you can:

apt-get source linux-image-$(uname -r)

source code for all ubuntu releases http://kernel.ubuntu.com/git/

Please check this https://launchpad.net/ubuntu/+source/linux/3.5.0-17.28 the source code and the patches are available here available here. If you want generic source code then better look for it on kernel.org.


how to download applications from https://apps.ubuntu.com

Click on choose an application

Go to /usr/bin and click on software-center and select open.

Now the software-center will be added to the application list.

Then click on the software-center and press ok to download and install gimp.


How to use KDE Storage Service Manager with Google Drive?

On Ubuntu 18.04 LTS install the package kio-gdrive and then execute the following command in terminal kioclient5 exec gdrive:/
This will make the google drive available as a Network Drive in the Network section of the File manager (Dolphin, as you mentioned you are using KDE). Thus to use your Google Drive, just go to Network section and choose the google drive Network folder.


Ubuntu To Be Used to Review Bad Disk/Sector

You should be able to view the files on the hard drive just from the Ubuntu live CD/DVD or USB Flash. Select 'try linux without installing' option.

After the Ubuntu starts, it should be visible from the File Manager - no guarantees, of course, but Nautilus should be able to read the file system present and mount it automatically.


Recovering OpenOffice files from corrupted OS

If you have a 13.10 Live USB, you should be able to boot from it and do a repair install. During the installation process, if you select this, it will reinstall Ubuntu but keep all your original files that were in the home folder.

If you open the file manager while in a Live USB session, you should see your Ubuntu installation in the shortcut panel on the left. The users' files are in the home folder.

Also, if you have everything backed up to some place like Ubuntu One, it should be no trouble to restore the files.


How to Customize Ubuntu ISO to install programs, scripts and certificates on many machines

For me ansible has worked great. Pretty simple to start, and it works well. It should also work for more massive server installations, but I cannot speak from experience here.

Anyway, as others commented, it is a much better approach than burning CD/DVDs....

Hope this helps,

Jeroen


I discovered in System Settings → Keyboard → Shortcuts → Typing that the Alternate Characters Key is set to Disabled.
I changed Disabled to Alt-Gr (right Alt key) and it works now. No need to change and reconfigure the keyboard type.


Ubuntu 12.04 disable release notification of 14.04 in Update Manager

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

Prompt=never

In the [DEFAULT] section (Use sudo with your favourite editor).
And never run update-manager with -d. That checks for the next development release available and overrides the above setting.


To have persistent connection (we assume that you want to reconnect to existing session),  you have two options

upgrade your Ubuntu 14.04 to a higher version.

The upgrade will allow you to use the new xrdp package (version 0.6-1.x) which allows you to reconnect to existing sessions (out of the box - no tweak necessary). You can see info here

if you stick with ubuntu 14.04, you can

either perform a custom installation of xrdp (see instructions here) or
get your hands on xrdp package available in ubuntu repository for 14.10. Ubuntu 14.10 released the xrdp package version 0.6-1.x which support out of the box reconnection to the same session

Hope this info is useful to other


Can æ with a macron be obtained with the compose key?

Yes. One built-in way to do it is:

Compose followed by _ followed by æ => ǣ

But if you don't have æ easily accessible in the keyboard layout you are using, you can create an ~/.XCompose file as Characters writing mentioned and add for instance this line:

<Multi_key> <underscore> <a> <e> : "ǣ" U01E3 # LATIN SMALL LETTER AE WITH MACRON

At next login you should be able to do:

Compose followed by _ followed by A followed by E => ǣ


to get ncpmount up and running I went to https://launchpad.net/ubuntu/+source/ncpfs/2.2.6-7/+build/1697927

Then I got the deb's for the following:
libpam-ncp_2.2.6-7_amd64.deb
libncp_2.2.6-7_amd64.deb
ncpfs_2.2.6-7_amd64.deb

I installed them with Software Center in the order I listed above.  ncpmount was then available in terminal


Why the DNS changes after a short time, with an AWS VPN?

After a couple of hours of failed attempt, it turns out that Network manger requires Search domains to be set.

This doesn't example the behavior itself (DNS resolution works correctly for 30 seconds, then not anymore), however it solves the problem.


Strange CPU usage behaviour with systemd, sleep, initctl or gvfsd processes owned by user

I was also experiencing the same issues running latest Xubuntu LTE, updated.I also noted problems with my internet connection (DNS failures, low response).
The offending task could have several names. There was (of course) a main task monitoring the system and reopening the CPU angry one.
Running "top", even if renamed, made the child task kill itself. The only way to see the task running was through task manager.
If you deleted the offending files they would reapear.

So... Grabbed my Holmes hat, my House cane, and this is what I have found.

This autostart file seems to have the code that makes the virus run at startup:

~/.config/autostart/dbus-daemon.desktop

The exec code line:

Exec=/home/(your username)/.local/share/accounts/services/dbus-daemon

This files seems to have the code to make the virus gain privileges:

~/.profile
~/.bashrc
~/.bash_profile

The code:

linux_bash="$HOME/(the path seems to be different, according to dissemination)"
if [ -e "$linux_bash" ];then
setsid "$linux_bash" 2>&1 & disown
fi

Since this files had a timestamp of 20:33, I searched for all files modified right after (there were a few more but I already deleted them for test purposes):

dom 20 jan 2019 20:33:19 WET ./.bash_profile
dom 20 jan 2019 20:33:19 WET ./.bashrc
dom 20 jan 2019 20:33:19 WET ./.config/autostart/dbus-daemon.desktop
dom 20 jan 2019 20:33:19 WET ./.profile
dom 20 jan 2019 20:33:19 WET ./.local/share/accounts/services/.dbus-daemon.bin
dom 20 jan 2019 20:33:19 WET ./.local/share/icc/.icc-daemon.bin
dom 20 jan 2019 20:33:19 WET ./.local/share/icc/.icc-daemon.log
dom 20 jan 2019 20:33:24 WET ./.kodi/addons/script.module.python.requests/lib/requests/packages/urllib3/connectionpool.py
dom 20 jan 2019 20:34:06 WET ./.local/share/accounts/services/.dbus-daemon.sys
dom 20 jan 2019 20:34:08 WET ./.local/share/icc/icc-daemon
dom 20 jan 2019 20:34:08 WET ./.local/share/icc/.icc-daemon.sys
dom 20 jan 2019 20:34:44 WET ./.local/share/accounts/services/dbus-daemon

The dissemination seems to create 3 files:

One timestamp
One base64 lookalike
The offending script

What I've done:

1- Deleted autostart file;

2- Delete offending code from ~/.profile, ~/.bashrc, ~/.bash_profile

3- Empty ~/.cache folder

4- Empty /tmp folder

5- Restarted

I don't know what this virus does. I did save the HEX file if someone wants to inspect any further.
As I don't know how my machine got infected, (that Kodi urllib3 file looks suspicious!) I can't guarantee this is a final solution, though all seems OK now...
I will keep my system in check the next few days to see if this was all there was.

I hope this helps someone.
Forgive my poor English...

UPDATE

I have another machine running LibreElec, also infected.


Mate 20 panel widget won't show temperature even though the box is checked

If you're seeing something like "0°F", as in the first image below, then you'll need to specify your location to have the correct temperature.

Right click on the widget and choose "Preferences"
Ensure the units of measure are to your liking:

Set your location ... or something approximating it:

Confirm that you have data:

If this isn't what you mean when you are asking about widgets, do update your question with a screenshot of what you're seeing, as a picture is worth a thousand words


Reinstall unity-lens-applications and unity-lens-files logged out and back in and it should work.


How to authenticate myself as root over rsync+ssh into a remote server?

The easiest method when a root login is available is:

rsync -av /etc/apache2 root@10.0.2.21:/etc/

Note: there is no need for sudo rsync if all configuration files in /etc/apache2 are world-readable.

If you do not mind some additional interactive commands involving sudo on the pi, try this approach:

Pack all files (files in /etc are generally small, so it should not be an issue to pack everything):

tar -czC /etc apache2 | ssh pi@10.0.2.21 'cat > /tmp/apache2.tar.gz'

Uncompress all files on the pi:

sudo tar -xzf /tmp/apache2.tar.gz -C /etc

There is a third possibility that involves configuring a rsync daemon, but this requires more effort and might be less secure since the wire protocol is unencrypted and may grant access to anyone who can connect to the daemon.


18.04 Core: RaspberryPi 4 install requires SSH key to add to SSO

https://ubuntu.com/download/raspberry-pi-core tells us you need to create an Ubuntu Single-SignOn (SSO) account, which you make at https://login.ubuntu.com/ unless you already have one.

Then, following https://help.ubuntu.com/community/SSH/OpenSSH/Keys , you can import the ssh key into your SSO account.

If you've never made one, then install ssh-keygen here to make one, then move it over to the Raspberry Pi on a USB flash drive, by carving it onto a stone tablet, skywriting, or another transfer method of your choice.


How to Adjust screen brightness on Dell Inspiron Mini 1010?

As you boot, at the grub menu, type e to edit the boot options.

On the linux (kernel) line, near quiet splash add nolapic

quiet splash nolapic

If that works, we can add it to the default boot options. Edit /etc/default/grub

# command line
sudo -e /etc/default/grub

#graphical
gksudo gedit /etc/default/grub

Change the GRUB_CMDLINE_LINUX_DEFAULT to read

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nolapic"

Save your edit, then update grub

sudo update-grub

If nolapic does not work, try acpi_backlight=vendor


How do I add to "system software sources"?

Start Ubuntu Software Center.

From the top menu select the Edit menu item and then the Software Sources... menu item.

This brings up a dialog box:

Select the Other Software tab.

On the Other Software tab dialog, click the Add... button

A dialog box will come up:

Copy the "deb ... precise main" line into the Edit box in the dialog and click the Add Source button.


It might be as simple as adding the second hard disk with Windows and running

  sudo update-grub

This should add Windows to the grub boot menu, and if grub had not been showing up before, because there was only one OS, it should show up now and give you a choice of what to run.

So you have shown both disks are bootable, run the sudo update-grub to add the Windows boot menu choice and reboot, select OS desired.


make does not find X11 library (Ubuntu 18.04.3 LTS)

(From the command apt-file search /X.h)

The package you're missing is x11proto-dev.


Minimize, Maximize and Close icons are not displayed on ubuntu 20.04

Re installing gnome-shell worked. Though I lost all my extentions. For more information on how to do that, check here


The .cmake files for Qt components live in the corresponding -dev package, so for this one you need to install qtmultimedia5-dev as @steeldriver correctly pointed out:
sudo apt install qtmultimedia5-dev

Notice how the package names are quite different from the names of the Qt modules: Qt5Multimedia vs. qtmultimedia5.
Please notice that the Kid3 project also provides links to  PPAs and official Ubuntu repositories where you can install ready-built binary packages directly:

https://kid3.kde.org/ (Project home page)


How do I stop byobu from hijacking highlighting by `ls`?

Just run:

byobu-disable-prompt

You can toggle this with:

byobu-enable-prompt

Or interactively with:

byobu-prompt

Full disclosure: I am the author and maintainer of Byobu.


What does the command 'set `who am i` do in Linux?

set 'who am i' stores the result of who am i in $1.
it can be used to display/store username and time-stamp in shell scripting.


Ubuntu 12.04 wired ethernet not working and wireless not working, How do I fix it?

You need to add IP address in wired Internet settings.


Unable to mount 1TB USB external HDD - Error

cat /etc/fsta and look for /dev/sdb1 , /dev/sdb2 etc

If these lines exist you need to comment or remove them. then remount the drives.

You might be forcing a non-standard file system upon your HDD.


Trying to sync my google calender with my ubuntu desktop using conky and gcalcli but I am getting an error

I use gcalcli almost everyday.  It is a great program, but in order to display my Google calendar in Conky I use Kaivalagi's Conky Google Calendar Python Script.

See the thread at: http://ubuntuforums.org/showthread.php?t=837385

The script uses conky keyring to securely transmit your credentials .
All of the documentation is very clear and easy to follow with the possible exception of the keyring.

To setup the keyring in a terminal type:
conkyKeyring -u gmail_address -p gmail_password

Here is a screenshot of my calendar in conky via this script:


Try making ./configure executable.

In a terminal, cd into the directory where ./configure is (cd /path/to/configure/containing/folder), then run chmod +x configure, then try run ./configure as you were before.


Frequent change of file-system to read-only

It sounds like you may have some file system corruption, possibly caused by a failing hard disk. (Normally this is the only way for the system to spontaneously mark the file system as read-only, to prevent further damage.) Try running:

dmesg | less

And scroll to near the bottom to see if there are errors related to your file system and disk. Look for messages about uncorrectable read or write errors (probably on sda), or file system errors (e.g. messages about ext3 or ext4 errors).  then investigate whether the disk itself is failing (in which case you'll need to get a new one), or whether it's just a logical failure (in which case you can probably repair the file system with fsck to fix your problem).

Another issue:

If your filesystem supports journaling try to disable it and see. To disable journaling

sudo /usr/sbin/diskutil disableJournal /path-to-your-disk


How to use fixed width font in python indicator in Unity's top panel?

You'll probably want to set the label-guide property to the maximum width.

According to the docs:

  An optional string to provide guidance to the panel on how big the
  #AppIndicator:label string could get. If this is set correctly then the panel should never 'jiggle' as the string adjusts through out the
  range of options. For instance, if you were providing a percentage
  like "54% thrust" in #AppIndicator:label you'd want to set this string
  to "100% thrust" to ensure space when Scotty can get you enough power.


Its quite simple. Just go to Machine A and fireup browser. Type //192.168.0.2/xampp


Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the commands below.

gksudo nautilus

Browse, to the correct folder, and delete the file.


Once above command is executed ,it asks for FNEK.
Filename Encryption Key (FNEK) Signature [13e8b1bc6090e91d]:

Is there any way I can pass this through file to automate the whole process ?

You forgot to add ecryptfs_fnek_sig= to the options with the FNEK signature you want to use or have used before. I use ecryptfs though mount and it doesn't ask me for FNEK because I have the options set in my command.


Are there any official Ubuntu AMIs pushed to AWS China?

The instances listed in your link are the official ones.

  thus I don't feel comfortable

Why? You should assume -all- instances are monitored, copied and viewed by the Chinese government.

The list from drift-aws is 2 numbers, one is official Canonical but excludes China and the other is for China. Because of the 1st number I would assume the 2nd is official too.

# Pick either one!
OWNERID=099720109477  # All regions except China, https://www.canonical.com/
OWNERID=837727238323  # China, some Ubuntu user. Who knows. Hopefully Canonical.

This is likely to comply with Chinese law: only citizens are allowed to own a business in China. Outsiders need to appoint a citizen to be owner of that company.

I can find 837727238323 at apcera-orchestrator-20190327 (ami-0cdbde1f9ee4b4704), and continuum-base-20190327 (ami-03bd834b5b06063b7). Both are not from Canonical (the am i is not listed on the site) and not China but Asia Pacific Singapore.

Besides that... there are no other numbers and only 1 for China.


Firefox - Your browser does not currently recognize any of the video formats available. Ubuntu 20.04 New Install

I've run into the same problem and it looks like installing ubuntu-restricted-extras did the trick:

sudo apt install ubuntu-restricted-extras

Hope it helps!


Shutdown dialog only appears after about 30 seconds in GNOME while using Caffeine extension

There is a known bug in the Caffeine extension which causes GNOME shell to temporarily stop responding on first power button event. Disabling the extension should get rid of the issue.

As a replacement you may use another extension called Keep Awake! which provides similar (but with fewer options) functionality or wait (or hope) for the Caffeine extension to get updated with a fix.

Alternatively you may install the Caffeine application instead of the extension by running

sudo apt install caffeine


I doubt that this file is being used by anything at all. But to confirm this, you can do the following:

Looking for other configuration files referencing /root/http-proxy.conf:

grep -Ri "/root/http-proxy.conf" /root/
grep -Ri "/root/http-proxy.conf" /etc/

Looking for processes reading this file (probably won't find anything):

lsof | grep "/root/http-proxy.conf"

Check if this variable is actually set:

env | grep "10.10.10.10:1234"


Will an upgrade install all main ubuntu desktop package?

One of the more common areas where an upgrade fails is when the ubuntu-desktop meta package has been removed when uninstalling various packages.

Most often you get the error unable to calculate.

You should always reinstall the ubuntu-desktop metapackage before the upgrade. This will reinstall all ubuntu-desktop dependencies described in the packages wiki

sudo apt-get install ubuntu-desktop

You will have to remove any packages afterwards then was reinstalled but you no longer want.


Android Studio ignoring environment variables

OK solved it, delete (or better move, in case it breaks something else in the future) the .jars slf4j-log4j12-1.5.8.jar and slf4j-api-1.5.8.jar from /usr/java/packages/lib/ext/


New laptop runs hot and has low battery life

If you are facing same issue on windows and linux both operating systems, you should go to service center to solve this issue.


High pitched continuous static noise at boot up. Stops after login

This problem is very likely linked to your sound card.

The start-up static is nothing but the start-up sound of Ubuntu. The static you are listening while turning on/off the monitor is nothing but system sounds.

One way to fix this is to find a suitable and working driver for your sound card. This should really fix your issue.

If the problem still persists, chances are your sound/speaker hardware might have been damaged.


Is it possible to have modelica compiler installed on the arm64 build of scilab for Ubuntu 20.10?

Yes, it is possible. We need to patch the debian/rules file in the source tree.
The complete walk-through is below:

Enable deb-src URLs in the /etc/apt/sources.list using text editor or by Software & Updates (software-properties-gtk)

Get the source code of Scilab package, patch and build it
cd ~/Downloads
apt-get source scilab
cd scilab-6.1.0+dfsg1/
sed -i "s/--without-modelica/--with-modelica/g" debian/rules

dpkg-buildpackage -uc -us

Install the just compiled packages
sudo apt-get install ~/Downloads/scilab*.deb

Open Scilab, go to ? → Scilab Demonstrations, select Xcos demos → Modelica demos → RLC circuit and enjoy the simulation.

Note: I have reported bug 1905039 to inform package maintainers in the Ubuntu.


The default option for the U410 to enter the BIOS is Fn+F2 if it is in hotkey mode.
If it is in legacy mode you need to use F2.   Ubuntu should not change this at all.  Have you tried doing a cold boot and hitting Fn+F2 or F2?

Note: You need to do this very early. If you see the Lenovo text logo, it's probably too late. Your best bet is to probably force restart (with OS) and, holding down Fn, keep tapping the F2 key.


Is it possible to unzip documents into a directory which is created on the fly in a single command?

The correct way to do this is to use the -d-option in the unzip-command

mkdir new_folder && unzip zipped_docs.zip -d new_folder

From man unzip:

[-d exdir]
              An  optional  directory  to which to extract files.  By default,
              all files and subdirectories are recreated in the current direc‐
              tory;  the -d option allows extraction in an arbitrary directory
              (always assuming one has permission to write to the  directory).


Problem with creating folders on Gnome app menu on Gnome 3.8

This feature will be available only in the 3.10 version.
For now, you can do that : http://worldofgnome.org/how-to-create-custom-appfolders-in-gnome-shell-3-8/


ubuntu 12.04 alongside windows 8 not booting

I had this same issue, the problem was that when my PC booted, it was booting straight into UEFI boot-loader without an Ubuntu option rather than Grub2.
I tried two possible solutions:

The first was to follow the instructions at the end of this page on adding Ubuntu as an option to the boot-loader, the part about EasyBCD is the one I'm talking about. This worked for a while in my case but then for some reason it stopped working after an update and my Ubuntu entry didn't do anything anymore.
The second which has worked for me since is to boot via USB into a Linux session and use boot-repair:

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

  Using boot-repair I was able to fix my issue as it does all the work for you. I'd suggest going straight for this option as it worked flawlessly for me.

Note: All credit for the second fix goes to Luis Alvarado for his work on this answer


connect to an hp printer using ethernet cable

The only ways it will work is if you enable a DHCP server on the laptop to enable the printer to get an IP from it, or a pass through internet connection sharing on that port on the laptop so it will get an IP from your router. This is why it works when connected to the router, it gets the IP from there then your laptop sees it and can print. Without an IP it will never be seen.


Open the Terminal CTRL+ALT+T and run this command:

 sudo apt-get remove stellarium

This will remove the stellarium package.


Lubuntu usb only booting on one computer

try the step by step from this link to see if it helps.

How do I install Ubuntu to a USB key? (without using Startup Disk Creator)

From your description, looks like you do not have the GRUB set up for boot, or you have another kind of boot (UEFI) set for your Windows 10, that´s maybe the cause you can´t boot your USB.
But if you change the UEFI boot configuration in BIOS, you might not boot Windows until change it all back later.

Regards


You ran sudo apt-get update, and the problem still happens. So you probably just have a newer version of linux-image-server and linux-headers-server than any linux-server package available from your configured software sources.

This could occur for a very short time even if you're using the central server (or for a longer time if there were a problem updating it). My understanding is that it can occur for longer periods of time if you use a mirror. That doesn't mean you shouldn't use a mirror--the central server (http://archive.ubuntu.com) is usually very slow, and national, regional, or other mirrors are much faster.

A package search reveals that version 3.2.0.37.45 of both linux-image-server and linux-server exist for Ubuntu 12.04. So it's probably related to your mirror.

Here are some alternatives:

Ignore It

If you're able to use the package manager for other purposes, for example, to install other packages, then you can just ignore this. When your mirror gets updated, you'll probably just get the package.

It's not a problem not to have the latest linux-server package, as it's a metapackage that doesn't provide any actual software. It exists only so it can list three packages as dependencies, ensuring they remain installed:

linux-generic-pae (this is only a dependency on i386--32-bit, that is--systems)
linux-headers-server
linux-image-server

You already have the latest versions of linux-headers-server and linux-image-server. My guess is that this is a 64-bit system, which is why no message about linux-generic-pae was shown. It seems like everything is fine.

However:

If the problem is  preventing updating and installing other packages from working (as opposed to just showing those messages whenever you do so but not interfering with it), then you should apply some other solution.
You may also wish to do so, if you just don't like seeing these messages all the time and want to get rid of them.
It's a little strange you're not getting this package, even if you use a mirror that lags a bit behind the main download server, because this package is also provided by http://security.ubuntu.com. That server should always been enabled in /etc/apt/sources.list. So I recommend checking to make sure that is enabled. You may want to back up sources.list before editing it (sudo cp /etc/apt/sources.list /etc/apt/sources.list.old). The problem could also be a consequence of a caching web proxy (if you use one) with stale data. (The solutions below will work around that, too.)

Change to a Different Download Server

I'd guess you're running an Ubuntu Server system and probably don't have a GUI installed. So, see:

How do I change mirrors in Ubuntu Server from regional to main?

After changing your mirror, run:

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

If you like, you can change your server back after linux-server is updated.

Manually Download and Install the .deb Package File

You can manually download and install the .deb file for the latest version of the linux-server metapackage in Ubuntu 12.04.

cd to wherever you want to download the package.

If this is a 64-bit system, run:

wget https://launchpad.net/ubuntu/+archive/primary/+files/linux-server_3.2.0.23.25_amd64.deb

If this is a 32-bit system, run this instead:

wget https://launchpad.net/ubuntu/+archive/primary/+files/linux-server_3.2.0.23.25_i386.deb

(I obtained both those links on the Launchpad page for the linux-meta source package in Ubuntu.)

Now (for both 64-bit and 32-bit), run this command to install the package:

sudo dpkg -i linux-server_3.2.0.23.25_*.deb

(Or just start typing the package's name and use Tab to complete it.)

Remove the Package

Since it's a metapackage providing software you already have, you can remove the package. Then you won't get the error anymore. You can install it again later if you like (you could periodically run apt-get update && apt-cache policy linux-server to see if the new version is available).

There are two steps, if you want to remove it. The first is to uninstall linux-server. the second is to make sure the packages won't be automatically removed later.

The dependencies will not be removed immediately. So it doesn't matter which of these steps you do first.

1. Uninstall linux-server.

To uninstall linux-server, just run:

sudo apt-get remove linux-server

2. Mark Its Dependencies as Manually Installed

To tell APT (the package manager) about packages that you intend to have installed even if nothing remains that declares them a dependency, mark them as manually installed.

To do that, run this command, if this is a 64-bit system:

sudo apt-mark manual linux-image-server linux-headers-server

If it's a 32-bit system, run this instead:

sudo apt-mark manual linux-image-server linux-headers-server linux-generic-pae

(You should have apt-mark but if you don't and you cannot install software, you can use apt-get install instead of apt-mark manual--specifying a package manually for installation causes it to be marked as manually installed even if if was already installed.)

Source: Mark a deb package as used, so it's not suggested for autoremoval
(In particular, Lekensteyn's answer.)


Unable to install from Ubuntu Software Center

In the Ubuntu Software Centre, go to the Edit menu and click on Software Sources. Then go to the "Other Software" tab, and remove the ppa's that are failing to download.

If you want to add any of the ppa's again, the best way is usually by running sudo apt-add-repository ppa:someppa/ppa in the terminal. You can usually find the exact ppa:someppa/ppa string on that PPA's launchpad page. This will ensure the PPA gets added with the right signing keys, so it should stop giving you as many warnings.


I was just having this problem myself. Seems Unity Tweak Tool is broken in this sense.

You can still get the desired effect by using CompizConfig Settings Manager.

To install CompizConfig Settings Manager, on your terminal:

$ sudo apt-get install compizconfig-settings-manager

Then alt-f2 and type ccsm

Once open, you need to look for the Ubuntu Unity Plugin, select the Switcher tab, and click on the key bindings you wish to change.

Voilà!


Problem in openldap with TLS configuration

I receieve the error message...

It looks like the service listening on localhost:389 does not use SSL/TLS. The equivalent in the non-ldap world would be to use openssl s_client to connect over port 80 rather than port 443. In the case of port 80, there's no SSL/TLS and you will get a similar failure.

Have you tried port 636? I believe that LDAPS or Secure-LDAP. See, for example, How to enable LDAP over SSL with a third-party certification authority.

Otherwise, you'll need to figure out how to make OpenLDAP start SSL/TLS on port 389.


GNOME III 12.04 Draws Desktop Off Top Of Screen (Overscan)

Adjusting overscan settings visibly reduces the image quality even when upping the image sharpness.

Solved by adjusting NVIDIA panel settings:

X server Display Config ==> Advanced ==> Panning ==> 1680x1050, & set Panning ==> Mode Name:  1680x1050_60


How to fix sudo after "chmod -R 777 /usr/bin"?

Accepted status notwithstanding, I'm now convinced this answer is wrong. (I hope to improve it soon, after consulting with the OP about the accept.) I think I recall others saying this worked, but I believe their problems were at least slightly different. The method described herein remains valuable for some situations where chmod -R 777 /usr/bin is interrupted with Ctrl+C or otherwise does not complete. But once it does, pkexec is un-setuid'd too and it won't work any better than sudo, as Damien Roche and Oli have rightly commented.

On an Ubuntu desktop system, PolicyKit is installed, so pkexec can be used to repair a broken sudo executable or sudoers file. You do not need to boot into recovery mode and you do not need to boot from a live CD. You don't even need to reboot.

In this case, run the following commands:

pkexec chown root:root /usr/bin/sudo
pkexec chmod 4755 /usr/bin/sudo

See this question for more information.


Define a globally available bash function to be used by any script

You can put the definition in a file with extension .sh in /etc/profile.d.

Do man bash for details.


System only showing/using 3.1 GB of RAM on notebook with 4 GB

According to the specs (see footnote):

  Above 3-GB, all memory may not be available due to system resource requirements.

(this warning is repeated on page 4)

Later it also states:

  Intel Graphics Media Accelerator 950 with up to 224-MB shared system memory


Ubuntu either has picked the wrong driver (I read years ago that certain Ralink chips are prone to that) or the dongle is just incompatible and you should get another one from this list: http://wireless.kernel.org/en/users/Devices

Note that makers switch chips from different vendors between versions.


Is there a way to launch Terminator when right clicking "Open in Terminal" for Ubuntu 18.04?

It doesn't show in default applications settings so set it from the command line:

sudo update-alternatives --config x-terminal-emulator


How do I diagnose "There was an error launching the application"?

Found an answer to this question here: https://askubuntu.com/a/836842

Try this :

desktop-file-validate my-app.desktop

It outputs errors in your .desktop file. For example mine returned :

error: first group is not "Desktrop Entry"

So once I corrected the typo to Desktop Entry, the script ran successfully.


sudo apt-get install nvidia-319 nvidia-settings-319 nvidia-prime

After installed enter the nvidia control panel and change the settings.


No. Networking is a system-wide thing, not a per-user thing.


Lenses available in software centre should be working OK.  All other lenses are probably private efforts and you should talk to the author if they are not working in current releases.  Because much is still changing in Unity there have been a few problems.

Here's the cooking lens project Launchpad page.

Here's the Launchpad bug report for the cooking lens problem you are experiencing.


Bash script using output of mount as a variable throws numerous errors

Well you're assigning output of a command incorrectly. Should be:

reply=$(sudo mount 192.168.0.2:/home/dk/NFS /home/dk/NFS)

That's called command substitution. Sometimes you see it in old Bourne shell syntax with backquotes instead of $(...), but that's not recommended nowadays because backquotes can't be nested easily, while you can do nested $( cmd1 $(cmd2))

  Why did it not consider "if" to be a command?

If statements operate on commands, but what you give is variable $reply, which only exists temporarily ( see later in the answer about that) so it exists only for mount command's environment, but the shell running the script knows nothing of it - it doesn't exist. To compare strings use [, and yes it's a command also known as test. So do

if test "$reply" == 0

See quotes? That's important, otherwise if there's spaces, shell will expand variable to two or more separate entities not one.

But if you want to check exit status of command, just do

if mount 192.168.0.2:/home/dk/NFS /home/dk/NFS

See no sudo? That's because it's usually redundant to use sudo in script multiple times. Just call script itself with sudo and all commands will have root privilege.

I'd also say echo is redundant because mount command already can print errors to terminal, but if you want custom message, you can do

if mount 192.168.0.2:/home/dk/NFS /home/dk/NFS 1> /dev/null
then
       echo "Success"
else
       echo "Fail"
fi

Because of 1> normal output is suppressed (actually redirected to /dev/null especially for that purpose)  but errors will show if anything goes wrong.

  Why did it ignore the "sudo" before "mount" ?

As for why you're getting error message that's because the form

reply=sudo mount 192.168.0.2:/home/dk/NFS /home/dk/NFS

is treated as envvariable=value command arg1 arg2, i.e. you're putting variable result with value sudo into environment of mount command. The command will know about it, but after command exits - the variable is gone too.

  Why did it not print the (non-zero) value of $reply?

Because reply doesn't store exit status as explained before. There's actually a variable for that provided by shell already, $? so use that as

if [ $? -eq 0 ]

Rinse and repeat the suggestions for other statements in your script.

Good luck


Those are instances where your webpage is open some place. I wouldn't worry about it. Every time someone (or something) opens a page on your webserver, that process will start. The process wont tell you who (outside of www-data) is accessing your page. But, your Apache server logs will. when the pages get closed, those processes will clear.
you can try this answer for yourself:
do:

ps -ef  | grep apache2 | wc -l

then open a browser and go to your website.
then re run

ps -ef  | grep apache2 | wc -l

you should see the number increase.
then close your browser. and run

ps -ef  | grep apache2 | wc -l

the number will go down again, provided your don't get more traffic in the mean time.

At this point, you might be asking yourself, if Apache2 spawns a new process, each time a web page is accessed, wouldn't my system be prone to loading if numerous persons were accessing my page simultaneously? The answer is yes, that does happen, but you need thousands of concurrent connections before it becomes a problem. If you do experience those issues, switch to nginx which handles threads in a way that doesn't create multiple concurrent processes.

To have a look at who is accessing your page(s), read logs (access and error) in:
/var/log/apache2/


Recent Update crashed Unity and Window manager

Reinstalling of the fglrx drivers worked for me. Thankst


Drag and drop file to existing VLC player

open vlc > tools > preferences. there is an Instances section, enable "Allow only one instance'

There is also an option to " Enqueue files when in one instance mode" On recent versions of vlc that actually works. Enable if desired & see if it does.

Make sur you click save on your way out of prefs


Pressing "v" in the terminal opens bash-fc.some_random_string in the editor

There is no visual mode in Bash's Vi-mode. A v in normal mode dumps the current line in the user's preferred editor. One types/edits the command there and upon saving and quitting the editor (in Vim, :x or :wq), Bash issues the command.
To disable the binding you can rebind it to an unnoticeable operation. Just add this to the ~/.inputrc file:
set keymap vi-command
"v":redraw-current-line

That file only affects GNU Readline (the library that handles user input in Bash), never the Vim editor itself.

At the present time, Vi-mode users dwell mostly on undocumented grounds (v is not in Bash's manual nor in Readline's manual) and face some bugs. For example, if you type
a b b

at the prompt, put the cursor on the a and then try tb in normal mode, the cursor will jump to the first b, but then if you try to repeat the movement with ;, the cursor won't move.


How can I prevent the screen from going black in vnc when inactive?

on the server issue the following command:

xset dpms force on


GRUB menu doesn't show Windows 10 in dual boot with Ubuntu (on separate drives)

Check if the Fast Startup option is disabled in Windows, if it is
disabled you can skip this step !

Open Control Panel
Scroll through Power options
Select Choose what the power buttons do
Click on Change settings that are currently unavailable
Under Shutdown settings, uncheck Turn on fast startup & Save changes
Shutdown Windows

Disable Secure Boot & Fast Startup , under BIOS settings
Check Boot Priorities, set Ubuntu as first priority in Boot Priorities
Save Changes & Exit BIOS settings.
Hope this solved your problems, if not post the errors you encountered (Hopefully None) (*_^)


I faced similar installer crash issue when I checked/selected "Install third party software". After deselecting that option, the installer worked fine. I retested it by formatting, re-installing with that option checked - it crashed again and then re-tested with not selected - it worked. Looks like some device driver specific issue. I have Lenovo 310 with UEFI Windows 10. I had faced similar issue with Ubuntu 18 LTS as well.


which version i should choose the 12.04 LTS or 13.04?

From the desktop download page:

Ubuntu 12.04.2 LTS is a long-term support release. It has continuous hardware support improvements as well as guaranteed security and support updates until April 2017.
Ubuntu 13.04 will be supported for 9 months and includes cutting-edge new features that make your music, videos, documents and apps much easier to access.

You might choose 12.04 if you need stability and don't want to worry about upgrading or reinstalling your OS after a short period of time. Note that releases between the LTS versions are now only supported for 9 months, while the LTS versions are supported for 5 years..
On the other hand, you might choose 13.04 is you are interested in trying out the latest features and the newest apps. The releases between the LTS versions are now seen as a way to get new features and apps out there for testing and bug reporting.
13.04 brings changes to the look, interaction with and management of online accounts, workspaces, and the Dash lenses. See new features in 13.04 at OMGUbuntu.
A note on upgrading thanks to lgarzo:
When it is time to upgrade, your upgrade paths will vary by which version you choose.
LTS-versions come out every 2 years and are designed to upgrade to the next LTS-version. So with an LTS, you can upgrade to a cutting-edge system every 2 years, while maintaining stability.
Non-LTS releases upgrade to the next available release, so in general you can stay more up-to-date, but you may have less stability.
Finally, an LTS-version can also be upgraded to the next non-LTS, but doing this will convert the upgrade path to the same as a non-LTS.


Why can't I completely remove wayland components from a ubuntu desktop?

The package developpers decide what compounds are hard dependencies and what compounds are optional, and set that as such in their packages.
Ubuntu relies on Gnome Shell for its desktop environment. That is designed to run on Wayland, and can also run on Xorg.

Is it really necessary for these packages to be remained and managed
against current designated (reverse-)depedencies in X11 desktop
environment?

Technically speaking, very likely not. One could prepare .debpackages of Gnome Shell that would not indicate a hard dependency on Wayland. Ubuntu developers by default offer also a Wayland session of Gnome Shell.
In the end, there is probably little reason to bother. The only issue, if it is an issue, is that a few extra megabytes of disk space are used by the unused packages.
How to remove these unwanted packages? That is probably quite technical. As indicated before, that would at least require Gnome Shell .deb packages that do not mark these Wayland packages as hard dependencies. You still could delete files installed by these packages manually, but that would be on your own risks and cause a discrepancy between what is actually on your system, and what the APT package system thinks is on your system.


How do I rename *.faa filenames for an expression located inside each file in [brackets]?

The solution you linked simply picks out the first line of the file (head-1), selects the first space-delimited string using cut, and then removes the FASTA header marker > using tr.
If you want to do something more complicated, you will need to modify the pipeline - for example using sed:
$ for f in *.faa; do echo mv --no-clobber -- "$f" "$(sed -E 's/.*\[([^]]*)\]/\1.faa/;q' "$f")"; done
mv --no-clobber -- protein-44.faa Granulibacter bethesdensis CGDNIH1.faa

Remove the echo once you are satisfied that it is doing the right thing.


You are trying to run openerp as root thats why it fails, change:

# Specify the user name (Default: openerp).
USER=root

by

# Specify the user name (Default: openerp).
USER=YOUR_USER_THAT_RUNS_ODOO


Squid Proxy Server Error : Upon Starting

fatal: ipc::mem::segment::create failed to shm_open()

This error is related to permission denied of accessing a shared memory segments (man shm_open). The issue is, that you probably run squid process with the wrong user (either before or now).

The solution is to remove .shm files from /dev/shm:

$ sudo rm -v /dev/shm/squid*.shm

To run squid with the right user (e.g. proxy), use sudo, make sure your cache_effective_user is correct in the config file (squid.conf), your cache and log directories are owned by that user.

Check the following Docker container at sameersbn/docker-squid as the working example.


How to install Windows 8.1 using the disk

You cannot install it while using Ubuntu. Insert the disc,switch off the computer with the disc inside and turn on your computer. Thus you should get to the installation menu of your disc.


How can I get install the Cool computer language for Ubuntu?

The installation instructions are on the coursera wiki page (it's very well hidden and took me some time to find).

Note that you must install the files where it tells you to, the paths seem to be hardcoded.

@chaskes's answer doesn't work because it's missing the instructions for where to install the files from the tar, as well as some required packages.


I cant install any program in In ubuntu 14.04 due to zte modem ui PLEASE HELP

1.Enter /var/lib/dpkg/info

cd /var/lib/dpkg/info

2.Delete all entry related to crossplatformui

sudo rm crossplatformui.*

3.Force remove crossplatformui

sudo dpkg --remove --force-remove-reinstreq crossplatformui

4.Display would be :

(Reading database ...
dpkg: warning: files list file for package `crossplatformui' missing, assuming package has no files currently installed.

(Reading database ... 159448 files and directories currently installed.)

Removing crossplatformui ...


Accesing a folder shared by Ubuntu 11.10 laptop by Ubuntu 11.10 PC does not work

Re-creating the share on your notebook (as you first tried to do) after installing samba may solve your problem. Already happened to me. Tell me if this works to update my answer.

Using sshfs to share folders:

If you want to share folders between Ubuntu computers, may I suggest to use a native Linux solution ? Samba re-implements windows protocols and i always ended up having issues with the samba configuration. On the other hand I found sshfs much easier to use.
Assuming you have sshfs installed and you're a user of the fuse group, just do the following:

mkdir ~/shared_folder
sshfs <user>@<ip>:<shared_folder_path> /home/$USER/shared_folder

Then check it works and do your stuff:

cd ~/shared_folder
ls
nautilus .
etc.

To unmount:

fusermount -u ~/shared_folder

Adding an entry to /etc/fstab:

Some people prefer to add this line at the end of the /etc/fstab file:

sshfs#<user>@<ip>:<shared_folder_path> <mount_point> fuse defaults,user,idmap=user,noauto 0 0

By doing so, you'll be able to mount the folder with mount ~/shared_folder. Still unmount with fusermount.

I'm not usually using this method as i configured my ↑ key to browse my bash history so that just typing sshf+↑ gives me all my previous sshfs mounts. Also, I don't need to do system-wide changes.


Boot failure on installation from a burned iso image

I didn't understand what's your problem exactly whether you've installed the os or you are trying to boot from CD but if it a HW related issue,

Try if the following could help:

To boot from a device selecting it, press F5 or F8 or F10 and at the system startup and select the device hitting enter to boot from

(or)

For Hard disk issue:

Generally the problem could be with the jumper settings on the HD which should be set to master(settings are printed on the HD with an image that how to set master & slave). Else,
Go to BIOS pressing DEL or F2(keys depends on Mother board) and check for the disk configuration(If you HD is listed then power connections are fine). And check for disk priorities and set it CD/DVD as 1st boot device, HD as Second(generally selecting the device and pressing + or - sets the priority). Finally save & exit. Else,
At last go to BIOS and check for something like Load Optimal Defaults(Don't select custom defaults and these you could find under EXIT option). Save & Exit.

  I'm using an older PC

The older pc won't support more spaced HD and for this a separate pin is alloted to the newer HDs called Capacity Limitation Jumper(CLJ) and in those case you'll have to use this jumper settings


How to download JDK for Android programming

Type below commands on terminal.

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


How to have root access without logging as root?

We are able to run Nautilus with root privileges with

sudo -i nautilus

but we need to be extra careful with what we do then.

  Root is powerful and most measures to protect our system from accidents will not work any more. Nobody will stop Root from doing stupid things. There will be no warnings.

So here is my advice to people who need to run Nautilus as root:

Only do so for this one single task. Quit Nautilus after you are done to not accidentally do unwanted things as root which are meant to be done as a user.
Do not drag and drop. Only a slightly misplaced movement of the mouse may result in a broken system. In the worst case you will not be able to boot any more.
Do not bulk delete files or folders. You may have included an important system file by accident.
Do not copy files to the wrong place. Ubuntu has a very strict file system layout. It expects files to be in the place they are meant to and it does not expect other files to be there. All files we need to modify should be in our HOME directory.
Do not execute applications. All applications you run by clicking on a launcher, a binary, or a script will also be run as root. This rarely will be a good idea.
Never run Nautilus as root when you are a beginner. Only when understanding the file hierarchy and permissions you hopefully will be able to realize what is a good idea and what not. Before that you should for the sake of your system stability refrain from running Nautilus (or any other graphical application) with root privileges.

Nevertheless it will be fine to occasionally run Nautilus as root. I do so too, and command line typos may equally lead to severe system damages, especially when run  recursively as root.


Differences using the slash in the server terminal or server terminal with GUI

I see an error in your command. This tar -xzf xxxx.tar.gz xxxx/ ought to be tar -xzf xxxx.tar.gz. To create a compressed tar file you use:

tar -zcvf xxxx.tar.gz xxxx/

And uncompressing on an already existing folder will simply overwrite it not produce an error. If you intended to uncompress it into a destination folder thenn the command would be:

tar -C xxxx/ -xzvf xxxx.tar.gz

Note: The z is superfluous when used in extracting as tar can determine the right decompression algorithm to use.


Where can I look for Bash for Windows 10 changelogs?

Summary release notes are stored here for most of the publicly released Windows 10 Insiders builds:

https://msdn.microsoft.com/en-us/commandline/wsl/release_notes

PS: While, yes, the WSL is a Windows 10 feature, we do run a genuine, unmodified, Ubuntu user-land distro provided by our great partners at Canonical. As such, we are happy to help support Ubuntu questions here on AskUbuntu, along with WSL-specific issues on our GitHub or feature asks on our UserVoice.


After first using

sudo -i TheUser

Do

gnome-terminal &

This will launch a new instance of the terminal under the new user, and you can open as many new tabs as you want.


bash can handle this easily:

mv /home/eric/Desktop/*.{png,svg,gif} /usr/share/icons

Use sudo mv ... if  you don't have permission to write into /usr/share/icons.


Compiling Wireshark on Ubuntu outputs many redeclaration errors

I got the this error when I was trying to compile Wireshark 1.8.8 on Ubuntu 18.04. I was able to compile wireshark successfully using fixes mentioned in this link. The fixes are for fedora 25 however I tested it and it worked on Ubuntu 18.04 as well.

Here I put parts of the reference needed for a successful compilation (be careful, line numbers can be different for other versions). The first one solves your issue, however other (independent) issues will be raised afterwards as well and those can be fixed with the two other items listed.

Edit epan/dissectors/packet-gluster.h and at line 357 delete the gluster_entry_types enum completely.
Copy the definition of g_memmove from  packaging/macosx/native-gtk/glibconfig.h at line 81 and paste it on the first line of the files ui/gtk/export_object_smb.c and epan/dissectors/packet-ssl-utils.c. Here is the definition of g_memmove for convenience: #define g_memmove(dest,src,len) G_STMT_START { memmove ((dest), (src), (len)); } G_STMT_END.
Update the file AUTHORS and replace the names Peter Kovář  with Peter Kovar and Роман Донченко with Roman Donchenko which are strings that only contain ASCII characters.


Killed all keyboard entry whilst fiddling with xkb

Boot from the installation media. Once in a live session, open a terminal and mount your root file system on /mnt, then copy over the file from the live session to the mounted root filesystem:

cd /mnt/usr/share/X11/xkb/symbols
sudo cp -a /usr/share/X11/xkb/symbols/pc .

Unmount /mnt and reboot. Everything should work. For added peace of mind, you may want to reinstall xkb-data.


Apache server home directory works only without www in the url

It sounds like the file permissions might be off. you'll want to chmod every file you want visible so that others can view them chmod o+r <file name> for each file. you can probably write a script for this if you have many many files.


Unable to transfer file from windows subsystem for linux to remote server

From the comments, we discovered that the "core issue" was that you were able to access the server when ssh, and from there you could scp.  But when attempting to scp directly into the server from your WSL session on the VPN, it was not accessible.
For future readers, there could be several (other) reasons for scp not working when ssh does:

There could be a server issue.  Some servers running certain versions of libssh2 are reported to have an issue with scp, although that has been fixed for a while, so it would be rare to see this.

The shell startup files on the server could be emitting some text.  This would work with an interactive ssh session, but would cause issues with scp.  However, the error messages that you are seeing aren't quite aligned with that.

It turns out, it seems, that you were using the hostname with ssh, but you were attempting to use the IP address with scp.  The hostname worked, because you have the following in your ~/.ssh/config:
Host server_1
Hostname 172.xx.yyy.z
User test
ProxyCommand ssh -q -a pitunnel -W %h:%p
TCPKeepAlive yes

This allowed the ssh server_1 to use the ProxyCommand to connect through a server on the VPN named pitunnel to server_1.
While you already discovered that you can simply use the server_1 hostname with scp to get it to work (since it also reads the same ~/.ssh/config), you should be able to also modify the config to allow access hostname and IP.  Just change the first line to be:
Host server_1 172.xx.yyy.z

This tells ssh and scp to use the settings below for both hostname and IP.
One additional note.  You are smart to obscure the IP address, but it likely isn't necessary in this case.  If xx is between 16 and 31, then the IP address is on what is known as a "Private Internet" network.  It's just like the 192.168.1.1 type addresses that you see on your home router.  Everyone can use the same IP ranges, because they aren't routable over the public Internet.
That's why you have to connect to the VPN and use a proxy to access it.  It isn't on the public Internet to begin with.


When I run sudo apt-get install libcurl4-openssl-dev I get the following:

$ sudo apt-get install libcurl4-openssl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libcurl3
Suggested packages:
  libcurl4-doc libcurl3-dbg libidn11-dev libkrb5-dev libldap2-dev librtmp-dev
  libssh2-1-dev libssl-dev pkg-config zlib1g-dev
The following NEW packages will be installed:
 libcurl3 libcurl4-openssl-dev
0 upgraded, 2 newly installed, 0 to remove and 1 not upgraded.
Need to get 639 kB of archives.
After this operation, 1,745 kB of additional disk space will be used.
Do you want to continue? [Y/n]

I suspect your "broken packages" may be your problem. I would run sudo apt-get autoremove and sudo apt-get install -f to see if you have anything held up. then run  your install again.


File lens doesn't display any files until after opening it the first time

This is intentional. The dash is not meant as a generic search engine. It's meant to be a place where you can quickly find the things you're interested in. The only way Ubuntu can learn what it is you are interested in, is by observing your actions. This is what it does. The engine that provides this feature is called Zeitgeist, in case you're interested in reading about it.

If you want to search for a specific file that you've never used, then the file manager (your home folder) is the right place to do it. I promise you'll learn to love it once you realize that there are no completely irrelevant search results. Ever. :)


Files list file for package missing -- dpkg warning

One loop over the seven packages' names to recreate the list-file for each package.

But first run

sudo apt-get autoclean

to remove unneeded DEBs in /var/cache/apt/archives. This is necessary that the following commands work properly.

arch="$(dpkg --print-architecture)"
for p in
  unity-scope-gourmet unity-scope-guayadeque unity-scope-gmusicbrowser
  unity-scope-manpages unity-scope-firefoxbookmarks unity-scope-gdrive
  unity-scope-home
do
    find /var/cache/apt/archives -type f -name "${p}_*_${arch}.deb" -exec dpkg-deb --fsys-tarfile {} \; -quit | tar t | cut -f2- -d. | sed 's|^/$|/.|;s|/$||' | sudo tee "/var/lib/dpkg/info/$p.list" > /dev/null
done
sudo chmod -R a+r /var/lib/dpkg/info

Some tests later, the command

sudo apt-get install --reinstall unity-scope-gourmet unity-scope-guayadeque unity-scope-gmusicbrowser unity-scope-manpages unity-scope-firefoxbookmarks unity-scope-gdrive unity-scope-home

should also help.


Not able to configure Reliance Netconnect USB dongle with Ubuntu 12.04 LTS

You may not install any dialer. Follow the steps below:

Go to Network Management --> Mobile Broadband
If the driver name is not visible then click on "Add" and follow instructions till you reach the tab where you are asked to enter login credentials
Enter numer as "#777", user id and password are the 10 digit phone number given to you.

Cheers!


Why does Sublime forget my session every time?

Looks like a bug to me. I have been experiencing the same issue and we are not alone:

  This is a bug with Windows ST3 Build 3033 (and probably all the other
  OSes and builds as well).

  When I open a file - and then close the entire application (such as
  with Alt+F4 or File>Exit) - the files that were opened before closing
  the application do not get added to the "Open Recent" list.

  However - if I go to File-->Close - then if I close SublimeText and
  open it again - then the files get added.

  It seems the files are getting added to the Open Recent list during a
  "Close" event which is not getting triggered during an application
  exit. Also, FYI I have "remember_open_files": false, and "hot_exit":
  false. So I expect that when I close the entire application - it
  should add those files to the Recent list that were open when I exited
  the app.

  Steps to reproduce:

  Open a file in SublimeText.
  Go to File - Exit.
  Reopen SublimeText and check the menu File>Open Recent - file will not be there.

You can find the corresponding bug report here.


Ubuntu One Synchronize Folder not working

I had this problem and to fix it I did a few things. Lets hope it works for you as well.

First run the Ubuntu Control Panel Applet via Terminal, that way if there are any funnies you will see additional error messages in terminal over and above normal error messages fro the GUI app.

ubuntuone-control-panel-qt

From there add the folder manually by clicking the big add folder command at the bottom to see if that works, as the "add" via Nautilus doesn't.

I also manually logged into Ubuntu One Service and deleted some of my old computers syncs I wasn't using anymore.

Also check to see that the file syncs are getting through via the files tab on the web version of Ubuntu One.

I also logged out and rebooted to ensure the Sync would restart, although it seems your u1sdtool --status command worked whereas mine never didn't.

Good Luck!


Help! zlib-1.2.9 - Killed AppArmor and all network connectivity, cannot fix

I just managed to fix the issue by opening the Muon Package Manager, locating the package "apparmor" and marking it for re-installation. KVM machines and network connectivity are now working. I don't know if this was the best fix..but it worked for now.


MariaDB uninstalled after dist-upgrade in Ubuntu 16.04

As stated in the edited thread, the issue was caused by an incorrect installation of mariadb (forgot the apt-get update).
Installing the correct version followed by the suggestion from Sinscary did do the trick.


Install Ubuntu 18.04 alongside two Windows 10

With multiple drives and BIOS boot, best to only run Boot-Repair's advanced mode. Then you can choose to only install grub2's boot loader to the MBR of the Linux drive.
You ran the auto fix which installed grub to the MBR of all drives. You will want the Windows boot loader in sda & grub in sdc. Boot loader in sdb does not matter.

Windows normally installs a separate Boot partition with bootmgr & BCD. Windows users do not see it as it is not shown in Windows. It normally is a 100MB partition just before the main install, but you have the main install at beginning of drive, sda. So Boot partition must have been on the now Linux drive. You can have bootmgr & BCD in your main Windows install if you have the boot flag on the main install which you do have and fix Windows.

But you cannot fix your issues with Linux repair tools, you need a Windows repair flash drive or installer with repair console and run the full set of Windows repairs, to add bootmgr, BCD and Windows boot loader to MBR of sda.

This is a Linux forum, so if you need help on fixing Windows use

https://superuser.com/


Are you sure you clicked the drop down?

By default GParted will show the current drive - which would have been USB in your case. I expect that your HDD will be in that dropdown.

If it isn't, open "Disks" and check that the disk is there, and is mounted.

Click it and ensure the icon is a Square (not a triangle)

If it is a triangle, click it and go back to GParted.


Wine 4.0 successfully installed, but wine --version returns wine-3.7

In case you trying to install wine 4.0 on your ubuntu:
Add repo key:

wget -nc https://dl.winehq.org/wine-builds/winehq.key && sudo apt-key add winehq.key

Add repo:

sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'

And install:

sudo apt install --install-recommends winehq-stable

After those steps wine --version will print the correct version.


Meizu Pro5 - Can't connect to a secured internet

You could try to connect as if it were a hidden network.
If it still doesn't work you might also temporarily set the developers mode ON before trying to connect.
This worked for me, but it is weird, I agree. Something to be improved indeed.

Hope it helps (if you did not already find out).

Jan


Why do some packages in Gnome/Ubuntu not have the same name in the file system than in their path? How to revert it?

This is done because:

Videos is much easier for users to remember, instead of /usr/bin/totem.
Terminal is much easier for users to remember, instead of /usr/bin/gnome-terminal.

Videos and Terminal are closer to the actual functionality of those applications.

Also, when searching for applications via the Super key, if you enter the search string "videos", you may actually come up with multiple hits, depending on what applications you have installed. You wouldn't normally search for "totem" (although that would work).

Update #1:

To see where the names actually get changed... we look at a partial snippet...

Note: the "Name=", and "Exec=", and "Icon=" lines...

cat /usr/share/applications/org.gnome.Totem.desktop

[Desktop Entry]
Name=Videos
Comment=Play movies
# Translators: Search terms to find this application. Do NOT translate or locali
ze the semicolons! The list MUST also end with a semicolon! Do NOT translate or
remove the application name from the list! It is used for search.
Keywords=Video;Movie;Film;Clip;Series;Player;DVD;TV;Disc;Totem;
Exec=totem %U
# Translators: Do NOT translate or transliterate this text (this is an icon file
 name)!
Icon=org.gnome.Totem


Ubuntu 18.04 LTS | Canon MF8080CW Not Printing

so perhaps the best way to install the linux package for this is to go here

http://support-asia.canon-asia.com/contents/ASIA/EN/0100924010.html for the 3.5 version of the UFR driver that was updated 8th Feb 2018.

Download and SAVE what will be linux-UFRII-drv-v350-uken.tar.gz and doing it this way, means the install script should do things for you.

So copy each line below; line by line; paste into a terminal; hit the ENTER key; move to next line

cd Downloads

tar -zxvf linux-UFRII-drv-v350-uken.tar.gz

cd linux-UFRII-drv-v350-uken

sudo ./install.sh

best before running the above, to delete any existing icons from the
PRINTERS folder; (as you say they do not work);
If you only report "MF8000C and MF8000C-2", I doubt the system has
used the Canon drivers; it has used some "near-fit" from its default;
(to use a printer, you need to 1) install drivers and 2) register the
printer; 2) may NOT necessarily follow from 1)

so the install script in the above is GOOD because Canon ensure you go from 1) to 2) and allocate the correct ppd file to the printer


Freeze after computer suspends for the first time in a session

In many circumstances it is best to install AMD microcode firmware to address "glitches". In your case it is the third option on the sample screen.

On Intel platforms such as mine it reads:

Using Processor microcode firmware for Intel CPUs from Intel-microcode (proprietary)

To access this screen (whether on AMD or Intel CPU, or whether using Nvidia GPU or Radeon GPU) use:

Select System Settings (the gear icon from the launcher)
Select Software and Updates
Select Additional Drivers


The only way that I was able to rotate external monitor was by disabling nVida driver and enabling Intel driver in Nvidia's X Server Settings.

Note: Remember to log out after enabling Intel driver.


LSB error messages when running an upgrade

You need to remove --purge all those packages and try again the sudo apt-get update && sudo apt-get upgrade

That will do the trick.


No sound on PowerMac G5 with Ubuntu MATE 16.04

I finally got it working. As recommendations and fixes given in several forums look a bit inconsistent to me this answer explains what I did for the fix.

After a fresh installation of Ubuntu Mate 16.04 on my PPC G5 there was only one entry in the file /etc/modules (i.e. kernel modules to load at boot time):

apm_emu

The following entries (and only these) need to be added to /etc/modules:

snd_aoa
snd_aoa_soundbus
snd_aoa_i2sbus
snd_aoa_fabric_layout
snd_aoa_codec_tas

Do not make an entry:

snd_aoa_codec_onyx

In Terminal start gnome-alsamixer. Check if there is something set on "mute". If this is the case, unmute it. Check the sound levels. Be aware that the sliders show the respective levels the other way round compared to System → Settings → Sound.

If a slider is at the top position (and the trail of the slider is all grey, not green) then it is set to 100%. Adjust both Master and PCM to 100%. With a setting of 70% or less I did not have any signal at the speakers in the next step. Headphone Detect Autoswitch and Line-Out Detect Autodetect should be selected.

Then close alsamixer and go to:

  System → Settings → Sound

There should now be a sound card listed on the device tab. In my case it is K2 KeyLargo Mac/IO (which is odd as in Mac OS X it says Texas Instruments TAS3004). On the Sound effects tab warnings might be leveled to zero or muted. Adjust as needed but this will probably be set to zero and/or muted each time after startup.

On the Device tab you can select a device. In my case I have 4 options to chose from:

Analog Stereo Duplex
Analog Stereo Output
Analog Stereo Input
Off

Between the two first I could not identify any differences both with headphones connected in the front and speakers connected in the rear of the G5. Click on Speakers Test right next to the selection list. On the next screen you should see something like Front Left and Front Right probably depending on what you have connected with two respective Test buttons.


You probably speak about wobbly effect. To have it, after you have installed CompizConfig Settings Manager, you have to install compiz-plugins, and then enable Wobbly Windows plugin from CompizConfig Settings Manager:


screensaver activates, screen fades, and computer goes to standby when watching video

You can install Caffeine: "A status bar application able to temporarily prevent the activation of both the screensaver and the "sleep" powersaving mode."

sudo add-apt-repository ppa:caffeine-developers/ppa
sudo apt-get update; sudo apt-get install caffeine

Once it's installed, run Caffeine through the dash. You'll notice a small coffee cup icon (indicator) appear in the bar at the top of your screen. Click on that cup and activate, and check that "Start Caffeine on login" and "Enable for Flash Video" are both checked in the preferences.


KVM Bridging - Network connection fails if I change Device model to VirtIO from rtl8139

Note that for a windows guest, you might need to install special drivers for virtio to work properly. Please see these references:
http://wiki.libvirt.org/page/Virtio
http://www.linux-kvm.org/page/WindowsGuestDrivers/Download_Drivers
https://launchpad.net/kvm-guest-drivers-windows/+download

The following is from one of my VM's. Your mac address and address lines will/ might be different:

    <interface type='bridge'>
      <mac address='52:54:00:c1:f1:b8'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>

Are you saying that does not work for you?
How does the 192.168.1.0 sub-net get its IP addresses? Via dhcp or static?

For context, below is the entire .xml file:

<!--
WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
  virsh edit desk_tt
or other application using the libvirt API.
-->

<domain type='kvm'>
  <name>desk_tt</name>
  <uuid>4235912f-1d46-8866-22ba-c91bfe2a86b7</uuid>
  <memory unit='KiB'>8388608</memory>
  <currentMemory unit='KiB'>8388608</currentMemory>
  <vcpu placement='static'>4</vcpu>
  <os>
    <type arch='x86_64' machine='pc-i440fx-1.7'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/kvm-spice</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/media/newhd/desk_tt.img'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <disk type='block' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
    </disk>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <controller type='usb' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'/>
    <interface type='bridge'>
      <mac address='52:54:00:c1:f1:b8'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <video>
      <model type='vmvga' vram='16384' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </memballoon>
  </devices>
</domain>


'No boot disk has been detected or the disk has failed' after using Boot-Repair no dual-boot

I just manually copied /boot/efi/EFI/ubuntu/grubx64.efi to /boot/efi/EFI/Boot/bootx64.efi and it worked perfectly with Secure Boot off.

sudo cp /boot/efi/EFI/ubuntu/grubx64.efi /boot/efi/EFI/Boot/bootx64.efi


KVM: Lubuntu host, Centos guest without internet access

Since you're connected via WiFi you won't be able to bridge the connection and get your KVM host to pull a DHCP address on the same network as your host. It looks like your KVM is already providing NAT service to your guest via virbr0.

Can you access the internet from the Centos guest?  What is the output of ifconfig on the guest?

You should be able to communicate between guest and host on the 192.168.122.X network with your host being 192.168.122.1 and you guest pulling an address via DHCP provided by KVM. You can configure the KVM DHCP or manually set an IP for your guest via KVM if you really need to, but probably not.

If you need your guest to be addressable from the internet, not only will you need to setup port forwarding to your host, you'll also need to configure NAT port forwarding through KVM. You can find more information about that here: https://wiki.libvirt.org/page/Networking#NAT_forwarding_.28aka_.22virtual_networks.22.29
(but if you really need that, I'd recommend just plugging your host in via ethernet and changing the network setting to bridged mode)

There are tutorials out there for creating a bridged connection for your guest over WiFi with KVM but I never managed to get it working correctly myself using the exact same setup as you (with 4 centos guests).


apt-get install -f wants to remove linux-image-generic

The two packages linux-headers-generic and linux-image-generic are meta-packages. They provide nothing by themselves, but rely on other packages. These two always depend on the latest version of the kernel, so when you do apt-get upgrade, the latest version get installed. You can safely remove them, but you won't be prompted for kernel upgrades if you do. You can mark them as manually installed:

sudo apt-get install linux-headers-generic linux-image-generic

After this, autoremove should not suggest removing these two.


pdftotext -layout input.pdf output.txt

pdftotext screws up the output use pdfBox (java) .

(OR)

If you have a Google account, you can use Google Docs to upload the PDF and transform it into editable text


Could not prepare Boot variable: No space left on device grub-install: error: efibootmgr failed to register the boot entry: Input/output error

There have been a number of reports that if the NVRAM is more than 50% used, the efibootmgr will fail because there's a concern about being able to garbage collect EFI variables properly, or some such.  Unfortunately, I couldn't find a clear way to determine the used/free space in NVRAM, so I'm going on suspicion.

There are a number of potential solutions to this:

Clear the dump files

grub stores efi logs in /sys/fs/efi/efivars/dump-*

Try deleting these to see if that's enough to bring the used space down.  Then run apt -f install to see if the error has changed.
BIOS upgrade

If your hardware provider has a BIOS/EFI upgrade, then I'd recommend doing that also, then try apt -f install again.
LAST RESORT - DISABLE EFI CHECK

It's a little dangerous, because you could technically fill your NVRAM to a point were it's unbootable.  However, I have used this process successfully on a Dell R420.

To override the check, add "efi_no_storage_paranoia" to the kernel option.  To do this:

Append "efi_no_storage_paranoia" to the GRUB_CMDLINE_LINUX_DEFAULT and GRUB_CMDLINE_LINUX variables in /etc/default/grub
Update grub by running sudo update-grub
Reboot
Run apt -f install

For safety, I reverse this process afterward also.  Kernel safety override parameters are not something you want to leave lying around!


How to create scripts that create another scripts

If you want to use echo with escaped characters like \n you should add the -e switch echo -e " ... ". However it may be easier to use cat with a here document instead

cat > stop.sh <<EOF
echo "STOPING GLASSFISH PLEASE WAIT..."
cd glassfish4/bin
chmod +x asadmin
./asadmin stop-domain
#In order to work it is required that the original folder of glassfish don't contain already any #project, otherwise, there will be a conflict
EOF
chmod +x stop.sh


Linux has a quite different architecture to Windows and the equivalent of what you are doing is not to "disable a driver".

You do have some runtime control over processor C states.  Writing "0" to /dev/cpu_dma_latency effectively disables all C states according to this although you may also get what you want by adding intel_idle.max_cstate=0 as a kernel boot parameter (eg on your kernel command line in grub).

Note that doing this is only a workaround for a hardware fault.  If your processor is unstable enough to change C states without crashing, you may experience other serious issues.  Is it excessively overclocked?


Is there a command to get the number of frames in a gif?

If you have ImageMagick installed, you can use its identify command as follows

identify /path/to/image.gif

You'll get details of each frame.

As suggested by steeldriver, you can get the number of images in the sequence directly using the %n output format specifier, however rather annoyingly it appears to print it once for each image. To get a single number you could do

identify -format "%n\n" path/to/file.gif | head -1


My laptop uses Kubuntu 12.04. It does not connect to my Wireless Access Point (WAP). How can I fix this?

When you scan for a wireless network, do you see your access point?

In any case try playing with some different security settings. Connectivity issues can sometimes be caused by incompatibilities between your wireless card, router, and security settings. In other words, this is not necessarily an Ubuntu issue :)

You might also look at the question linked below for some answers which might help you.
Wifi Connectivity problems when using WPA/WPA2 Encryption


how to reset mouse and touchpad settings on ubuntu 16.04?

The peripherals settings for Unity (and Gnome) are stored using dconf. You can install dconf-editor to inspect and reset settings manually. The mouse and touchpad can be found in /org/gnome/desktop/peripherals/mouse/ and /org/gnome/desktop/peripherals/touchpad/ respectively.

Alternatively enter the following commands into Terminal to reset all settings for mouse and touchpad:

dconf reset -f /org/gnome/desktop/peripherals/mouse/
dconf reset -f /org/gnome/desktop/peripherals/touchpad/


Tried to get my headphones to work but seems there are just too many issues with Bluetooth.

Got them to pair (sometimes).  fails to connect on reboot.

Then once paired the option to select the headphones as an audio output is not there.  This might be what they call a card which is not getting loaded.

Tried using the blueman (Bluetooth manager).  This provided the "audio sink" option which allowed me to select a sink?  Then in the audio applet I could then see a headphones option.  This then worked until I rebooted.  Unfortunately I was not able to replicate this success again.

This script seems to be addressing many connectivity issues not being addressed in the connectivity applets.  These people seem to know what is going on.

https://gist.github.com/pylover/d68be364adac5f946887b85e6ed6e7ae

There are just too many hacks attempting to fix this stuff without any real clear direction.  Modules loaded not loaded / pairing / cards / pins and authentication.

Not even sure where they are in fixing any of these issues with the large number of bugs listed.

another attempt got the headphones working.  not sure if they will persist after reboots without messing around with Bluetooth manager.

In Bluetooth manager..

delete your device from Bluetooth manager
disable Bluetooth service
delete any pairing info stored in headphones by resetting them
enable Bluetooth service
find device in the list and choose setup
select pair now and then headset options
prompt for access to phone book?  must accept this.
now go into audio settings and choose the new headphone output.

This must be an authentication issue as I hadn't seen the "access phonebook" prompt before.  saying yes to this completed the setup process.

Also there is the synonymous use of "headset" and  "headphones" here and there.  "headphone" is an improper description of these devices and should be avoided.


Migrating to Ubuntu from MS, what do I lose?

To quickly find out whether your computer and your data are ready for Ubuntu I recommend booting the Ubuntu installer CD/USB with the "Try Ubuntu" option.

The steps I took before making the switch from Windows XP to Ubuntu some years ago was that I

installed Open Source alternatives of software in Windows. These mainly were Libre Office, Firefox, Thunderbird, and The Gimp.

All of my email was copied in the cloud to an IMAP folder of an email provider that allows IMAP. I was then able to not only import my mail to any application I wish but also to all of my devices.

After a while I got familiar with these applications, and had all my documents put in a format I knew I will be able to use later. Mostly I realized that a conversion was not needed because Libre Office was able to read and write my MS Office documents.
installed Virtualbox in Windows to be able to get familiar with Ubuntu in a virtual machine where errors I made were easy to repair and did not cause much damage. I had a lot of fun playing around with Ubuntu.
Quite soon (days rather than weeks) I realized I would be ready for the switch (in fact I could no longer wait for Ubuntu installed on bare metal). To make sure my data were still accessible I installed Ubuntu as a dual boot solution. By this I could choose to boot Ubuntu or my Windows, whichever I needed. I realized that I could access all of my Windows files from Ubuntu but none of my Ubuntu files from Windows. That's why I mostly booted Ubuntu.
After a year or so I found I had not booted Windows for months. That was the time to completely get rid of it.

Now my kids would want Windows back for the shiny games that won't run on Ubuntu. But I can manage this up to day by choosing games that can be run natively on Ubuntu, or (if it really really must) that can be run from Wine.

For the very few exceptions which Ubuntu does not handle too well (proprietary software for printing) I keep a Windows in a virtual machine.


I cannot move files to the trash in ubuntu

It seems sda8 is not formatted or damaged. You can format a drive (create basic filesystem structures) by running

mkfs.ext4 /dev/sda8

If it's damaged you can try to recover important files from that partition (if any) and then format it hopeing that this will fix the issue.


“dd” command copy “.img” file to SD card and remain a free space

gparted would do that, f you don't mind using a GUI or installing a tool if don't have it yet. I recommend it, powerful and useful.


Ubuntu 15.10 / Xfce4 / Xubuntu ==> Whisker Menu graphically corrupt upon Save, recoverable via logout/login

Right click on panel (menu / applications).
Choose Panel > Panel Preferences > Items
Select Whisker Menu and press the red X on the right (remove)
Then press + on the right for new item, select 'Applications Menu' and finally press 'Add'
Use the up and down arrows to position it where you want.


How do I look up command-line documentation for Django?

In this particular case man pip3 (and then searching for freeze typing /freeze) or man pip3 | grep freeze should do the trick, because freeze is an option of the pip3 command.

Also many commands used developing with Python are related to python tools like pip3 or virtualenv, so if you install them with apt you can search in the manual for their options.

As a bonus, you can build a VM or Docker container (cleaner than installing on your system) with Ubuntu and Django installed from apt (sudo apt install python3-django), and then search for man pages of Django-related terminal commands.

Hope it helps.


First let start by saying that SATA PCI cards are hard to come by.  But take a look at this card here.

It states that it has Red Hat Linux, SuSE Linux, Linux open source code.  I can not find out if it has been tested with 12.04, but this site here has tested the cart with 7.04.

I know this may not be the answer that you are looking for, but I could not find any other information or cards :).

I asked some of the guys that I work with, and I was told that if the card works with 7.04, that it should work with 12.04. but there is no way for me to verify that, I hope that you understand


Securely sharing files accross the network to ubuntu and linux users

You can do it. Just follow these permissions and ownerships:

Inside of the folder share, you may have this folders:

drwxrwxrwx  2 root root 4096 2011-11-23 18:20 general
drwxr-xr-x  5 root group1 4096 2011-11-23 18:20 group1

Inside of group1:

drwx------ 2 user1 group1 4096 2011-11-23 18:20 user1
drwx------ 2 user2 group1 4096 2011-11-23 18:20 user2
drwx------ 2 user3 group1 4096 2011-11-23 18:20 user3
drwxrws--- 2 root group1 4096 2011-11-23 18:20 group1

You have to set the UMASK to 002 and pay attention to the sticky bit (chmod g+s) given to the group folder.

user1, user2 and user3 must be member of group1.

Let me know if it worked!

Regards


Appears to be a bug in libsdl 2.0.5. It is supposed to be fixed at head, but Ubuntu still uses the bad version.

https://discourse.libsdl.org/t/repeat-flag-on-sdl-keyboardevent-not-being-set-on-2-0-5/21978
https://bugzilla.libsdl.org/show_bug.cgi?id=3472
https://stackoverflow.com/questions/42056515/sdl2-key-repeat-not-working


Will the cube plugin be available to use in ubuntu 11.10?

Unity is designed to use the Desktop Wall plugin, and I don't see any reason why they would change it. In fact what needs to be changed is the Desktop Cube plugin itself, as it does not support vertical layouts (as the KWin cube does).

Unless someone does the necessary work to add this feature and fix any bugs, it will remain essentially the same as it is in 11.04.


use system installed icons inside of visual studio code

I just added Weather Icons to the editor.fontFamiliy inside of settings.json like this:
"editor.fontFamily": "'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback', 'Weather Icons'"

and the weather icons appear now in my file.
I guess other .ttf icons could be added also. Just list them with fc-list and add the font name inside of settings.json


If you're on a local network... it's odd that it would be that slow. Try providing the z flag to your rsync, which should enable compression during transfer and speed it up a little bit.


Network Manager crash out of nowhere Ubuntu 20.04

I had the exact same issue/symptoms two weeks ago, when I changed apartment and my computer was connecting to a new router.
I solved it by updating my kernel to the latest mainline. Since then I did not have any issue again (until now).
You can find alternative ways to update your kernel here:
https://linuxhint.com/update_ubuntu_kernel_20_04/


Script at /etc/init.d does not run at start-up

It may be a good way if you use insserv instead of sudo update-rc.d dropbox.sh defaults.

sudo insserv

From man insserv:

insserv  is a low level tool used by update-rc.d which enables an installed sys‐
tem init script (`boot script')

If you get the command not found error, you may fix by running the following command:

sudo ln -s /usr/lib/insserv/insserv /sbin/insserv

See insserv -h for help.


What is the apt equivalent to "rpm -V" (Verify installed packages)

The package "debsums" is what you want to install to perform hash checks against installed packages.

For example, to check for changed files:

sudo debsums -c

Note that not all packages ship with md5sum file lists. You can see a list of those on your system with:

sudo debsums -l


Use regexes to reformat a reference title in a BibTeX file

This works fine:

perl -i.bak -pe 's|^(\s*title=)(.+?)(,)$|$1\{\\textbf$2\}$3|' ProgRef.bib

This reformats all title parts and assumes there's just one title per line. It also does a backup of your file (with the .bak extension).

Update: If your input file has DOS/Windows line endings, do this:

sudo apt-get install dos2unix
dos2unix ProgRef.bib
run the above regex


etc/default/keyboard not taken into account at boot

One way on an Ubuntu desktop to persistently set "French (Macintosh)" for the current user is to run this command:

gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'fr+mac')]"

Edit:

On a server I think that this command gives the same result:

setxkbmap -layout fr -variant mac

However, if the system refuses to recognize XKBVARIANT when reading /etc/default/keyboard (can't explain why), you may need to have that command run at the start of each session.


Do super user still need to have execute permission for directory to enter it?

Superuser and root are synonyms. Your user is probably a sudoer, not a superuser.

In Ubuntu, you can perform a single command as root using the sudo command. Or you can open a root’s shell using sudo su, sudo -s or sudo -i. (I won’t discuss the differences here. Also, plain su could be used – if you knew the root’s password.)

sudo cd makes no sense since it would change the directory and then drop to your shell which might not be able to open the directory. Therefore Ubuntu disallows it completely:

$ sudo cd /root
sudo: cd: command not found

However, we can issue:

$ sudo ls -l /root
total 0

So how can we cd to the directory? We have to use a root shell:

$ sudo su
root@my-ubuntu:/home/mirek# cd /root
root@my-ubuntu:~# ls -l
total 0

You asked why you haven’t to input password in this case. It’s because you have used sudo recently. To force it to need the password again, you can issue sudo -k. Otherwise, it starts to require the password after a few minutes again.


By default, the floppy kernel module is not loaded. To load the module, invoke

sudo modprobe -v floppy

Remember to add your user to the "floppy" group; to do that use

sudo adduser $USER floppy

After the module is loaded you should be able to access the hardware and mount floppies.