Maybe you can just call it from terminal with torbrowser

If it works, you can create a .desktop file

Anyway, you can configure your system in system > network > mandatory > manually and set

socks host to localhost on the port 9050

Then, all your application (those set on system default) will transit by the tor network.

Hope it helps.


At least okular stores comments as objects of /Type/Annot, see these examples for the syntax:

17 0 obj
<<
/Type/Annot
/Rect[67.023 756.168 85.203 774.333]
/Subtype/Text
/M(D:20170828091301)
/T(■ somebody)
/Contents(■ text)
/NM(okular-{8ff65cc1-7b89-45c6-8adf-1aa6cec06cd0})
/F 4
/C[1 1 0]
/CA 0.5
/Border[0 0 1]
/P 20 0 R
>>
endobj

18 0 obj
<<
/Type/Annot
/Rect[37.7 597.841 236.675 615.979]
/Subtype/FreeText
/DA(/Invalid_font 10 Tf)
/M(D:20170828091316)
/T(■ somebody)
/Contents(■ text)
/NM(okular-{50420111-1c05-4e07-8db5-08deffb0ec7e})
/F 20
/C[1 1 0]
/CA 0.5
/Border[0 0 1]
/Q 0
/IT/FreeText
/P 20 0 R
>>
endobj

Those objects are linked to pages using a command like /Annots 14 0 R, which is how this script deletes all comments in a given pdf file, it simply deletes all the /Annots lines:

pdftk original.pdf output uncompressed.pdf uncompress
LANG=C sed -n '/^\/Annots/!p' uncompressed.pdf > stripped.pdf
pdftk stripped.pdf output final.pdf compress

If you dive really deep into the structure of your specific pdf documents – just open them with a text editor –, you may be able to understand what's going on and manage to manipulate your documents with e. g. sed, however I seriously doubt there exists a solution that fits every type of pdf document here. For what it's worth, (at least for my test file) the following oneliner gives you the comments of input.pdf in a terminal:

pdftk input.pdf output - uncompress | sed '/^\/Contents (/!d'

Add >> comments to the end of that line to store the output in a file named comments instead.


Ubuntu Server is resetting folder permissions for .ssh on reboot

You can make this command to execute every time you boot your system using the 'Startup Applications' that is available by default in ubuntu.

Just type 'Startup Applications' in the dash board. An application will open. Click Add button in the application and type the command (In your case, its chmod 0700 ~/.ssh) and u can also specify the Name and Comment for that command.

Now, every time you boot your system, this command gets executed automatically. You can also take a look on adding the startup programs on command line here


You can know what version you are using :

uname -r

To remove old kernels just follow this answer :

How to remove old kernels


Start-up error: ALERT! /dev/disk/by-uuid/xxxxxxxxx does not exist. Dropping to a shell!

I can't comment (due to my reputation), so it looks like I have to write an answer...
I had this problem a few days ago, but it was because I restored an image (clonezilla) on a new partition, and, each time you create the partition (I don't know ,maybe also when you format it), it gets a new UUID, a different one from the one stored in the image content.
In any case: look for that UUID (the one you put with xxxx) in /boot/grub/grub.cfg and /boot/grub/i386-pc/load.cfg and correct it properly... BUT, in case you recreate the partition (that was my case), DO NOT change the UUID on those files, it's better to change the new UUID of the partition for the previous one it had with:
tune2fs /dev/{device} -U {uuid}


Nvidia X Server Settings Showing Blank Error

since there was no reply for like 3 weeks, i decided to reinstall my ubuntu because i had some issues while trying to fix this. it works fine now.

looks like i'm missing this part before. sometimes, selecting the nvidia driver itself just gave me a black screen but this one works fine.

switched my driver to nvidia 331 and restart the pc


14.04 only works through recovery though badly

Some quick hints:

To check the memory, boot from the install CD and select memtest (see here for details)
To check the disks you can use Disks, the Gnome utility. More about all this in this article.

Hope this helps...


Ubuntu 14.04 isn't detecting my USB headset

I got the same problem. Turned out the headphones weren't plugged in correctly :D

However:

Try lsusb with and without headset plugged in to see whether there's a difference (for me Bus 001 Device 009: ID 046d:0a45 Logitech, Inc. appeared)
Try installing pavucontrol, at least I have it installed, since I was fixing some Skype issues.

Good luck


Can ADB recognize a device on bootloop (soft-brick)?

I've been there too (on my BQ Aquaris M10): Aquaris M10 FHD tablet stuck in boot loop

I confirm that I couldn't access the tablet neither with adb nor phablet-shell.

However -see my post- once I got into the recovery mode, a simple "wipe cache" was enough to solve the problem, so a full factory reset was not necessary.

This might help you on a next occasion - or others suffering from the same.


Ok, I got this to work, I decided to try to log into xfce with the guest account and it worked with out any trouble, so, I deleted some of the settings files for my account (sorry, cant remember wich ones.. ) and then logged in as my user again and every thing is fine. I had to setup all my preferences again (panels, etc..) but my fans are quite now and all is good, Im not sure if im still getting those errors on startup,but they started after I installed gnome in order to log in and mess with settings from the gui.  ... update.. I had to do this again when some Nvidia Drivers got installed while I was attempting to mine coins, I had to reinstall fglrx and xfce would not load and only give a black screen. to fix it I just deleted the ~/.config/xfce4  dir
and once again it would load up but I had to redo everything, I'm sure there is probably a cleaner way, but it beats reinstalling every time.

why do people recommend that?..


All of the Simple.pm files you've found belong to other Perl libraries. None of them do what you want. You have found

IPC::System::Simple
Lintian::Command::Simple
Log::Message::Simple
Locale::Maketext::Simple
Pod::Simple
Test::Simple
Filter::Simple
Log::Message::Simple

To find the right one you should do apt-cache search XML::Simple and pick a package to install with sudo apt-get install <insert your choice>.

On my Ubuntu 16.04 (YMMV), it shows me:

$ apt-cache search XML::Simple
libxml-simple-perl - Perl module for reading and writing XML
libdns-zoneparse-perl - Perl extension for parsing and manipulating DNS Zone Files
libgtk2-gladexml-simple-perl - clean object-oriented perl interface to Gtk2::GladeXML
libtemplate-plugin-xml-perl - XML plugins for the Template Toolkit
libtest-xml-simple-perl - Perl testing framework for XML data
libxml-libxml-simple-perl - Perl module that uses the XML::LibXML parser for XML structures
libxml-opml-simplegen-perl - module for creating OPML using XML::Simple
libxml-simpleobject-enhanced-perl - Perl module which enhances libxml-simpleobject-perl
libxml-simpleobject-libxml-perl - Simple oo representation of an XML::LibXML DOM object
libxml-simpleobject-perl - Objectoriented Perl interface to a parsed XML::Parser tree
ruby-xml-simple - Simple Ruby API for reading and writing XML
libxml-hash-lx-perl - module to convert hash to xml and vice versa using LibXML
libxml-struct-perl - represent XML as data structure preserving element order
libxml-structured-perl - Convert XML data into a predefined Perl data structure and back


How can I install software or packages without Internet (offline)?

Check out Keryx; it's an offline repository manager.

How does it work? It lets you download updates and new programs (with dependencies) to your flash drive.

Its interface is similar to synaptic, but it works from a pendrive (it doesn't need installation). Unfortunately, the GUI needs wxwidgets, which don't come preinstalled on Ubuntu (they're cross-platform and installable from here and Ubuntu repository here). It can only install software in a Ubuntu system, but you can download the updates or new packages in any Linux, Windows or OS X.

Here you can find a tutorial.

Another detailed step-by-step tutorial is in this answer.

Launchpad also hosts downloadable files.

A screenshot:


what is the nginx equivalent command apache has for a2enmod?

There's no equivalent.  Nginx modules must be selected during compile, run-time selection of modules is not currently supported.

A full summary of the compile-time options, including optional modules, can be found in the provided configure script by running ./configure --help Nginx

For more information about see Nginx Modules


I like clonezilla.
Clonezilla is a backup/clone utility similar to Norton Ghost.
It can be downloaded from http://clonezilla.org

You would have a few options using clonezilla.

1) clone the drive to an external that is the same size or larger.

2) clone partitions to an external drive that has room for the partitions.

3) make an image of the drive or partitions that can be stored in the clonezilla partition (if it is large enough), a designated recovery partition, or burned to DVD.
Note: burning to DVD requires that you have space to store the image, and a DVD burning program to make a data disk.

Clonezilla itself is a LiveMedia image, so it can be burnt to CD/DVD, USB stick, or extracted to a HDD partition.

I personally extracted it to a partition on my HDD, and added entries from it's grub.config file to my grub so I can launch it from my normal grub menu.


Gnome overview laggy when running scaling_governor=powersave

Ok, it looks like I have found the problem.

I wrote a little script which measured the CPU frequency every 1/10 second and the result was that the CPU wasn't correctly scaling up when pressing the Super button to get the gnome overview (it did not exceed 2200 MHz).
After removing tlp the CPU scales up to round 300MHz (and that much faster!) which results in a non-laggy overview.

So it seems like that tlp cuts off the CPU frequency.


Reading package lists in update apt-get Ubuntu 12.04 VPS

I stumbled upon this question when I was researching the same issue that appeared out of nowhere in my Amazon free tier EC2 AMI I use as a web server.

To help fix this, I started this thread:
http://ubuntuforums.org/showthread.php?t=2140944

As detailed in my solution (3rd post in thread), I got apt to work again by:

$ sudo rm /var/lib/apt/lists/lock
$ sudo apt-get install -f

I hope this works for you, too!


Can't get old Radeon HD graphics to work under Ubuntu

I would try actually installing the most recent Xubuntu or Lubuntu.  There have been some updates to the kernel for radeon graphics cards. Running from a USB on an older machine can cause it to run slow but once installed it might work better.  According the the wiki and this page your card is (mostly) fully supported on the open source driver.  As long as you aren't doing intensive 3D graphics you shouldn't have a problem.


err_too_many_redirects when trying to redirect non www to www

To resolve your problem you have to understand the concept of 'NameVirtualHosting' and Ubuntu's special way of deploying the apache web service.

NameVirtualHost

Your (local) apache webserver can serve different web sites on the same adress as long as they are 'named' differently. The webserver tries to match the Host name (e.g. example.com) with a corresponding Servername or ServerAlias directive in you apache configuration. For each 'website' you need a separate <VirtualHost> container in your configuration; in your case you need one for example.com and another for www.example.com.

Apache Webserver and Ubuntu

The Ubuntu apache2 server package does alter the default binyries, configuration files and directories:

The Apache Webserver binary is /usr/sbin/apache2
The server root directory is /etc/apache2
The main configuration is /etc/apache2/apache2.conf
Additional server configurations go to /etc/apache2/conf.d
Module Configurations are in /etc/apache2/mods-available/
VirtualHost sites are configured in /etc/apache2/sites-available/

So far, so easy; now comes the tricky bit (for me that is): with Ubuntu you get four commands to enable/disable modules and (!) VirtualHosts configuration:

a2ensite / a2dissite
a2enmod / a2dismod

with these commands you enable the actual websites, that you have configured in /etc/apache2/sites-available/. There is at least one default virtualhost configuration default.conf which, when enabled by a2ensite default is linked as sites-enabled/000.default.conf.

And it all works, because the main config apache2.conf contains this Include directive:

Include sites-enabled/

Let's get practical:

Remove all symbolic links in sites-enabled/ and if you happen to have stored actual config files in sites-enabled/ move those to sites-available (be careful not overwrite existing files in sites-available/ rather rename the old ones).

Now, you create two new virtualhost files in sites-available/:

vi /etc/apache2/sites-available/0_www.example.com
<VirtualHost *:80>
    ServerName www.example.com

    DocumentRoot /var/www
    DirectoryIndex index-www.html
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error-www-example-com.log
    LogLevel warn
    CustomLog ${APACHE_LOG_DIR}/access-www-example-com.log combined
</VirtualHost>

vi sites-available/1_example.com
<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    ServerName example.com

    ErrorLog ${APACHE_LOG_DIR}/error-example-com.log
    LogLevel warn
    CustomLog ${APACHE_LOG_DIR}/access-example-com.log combined

    RewriteEngine On
    RewriteRule ^/(.*) http://www.example.com/$1 [R=302]
</VirtualHost>

and enable them and the script creates a symbolic link from sites-available/ to sites-enabled/:

sudo a2ensite 0_www.example.com

sudo a2enmod rewrite

sudo a2ensite 1_example.com

(restart the apache2 service - service apache2 restart or systemctl restart apache2)

ls -l sites-enabled/
total 0
lrwxrwxrwx 1 root root 30 Jan  8 17:59 example.com -> ../sites-available/example.com
lrwxrwxrwx 1 root root 34 Jan  8 17:52 www.example.com -> ../sites-available/www.example.com

We need simple index pages

# cat /var/www/index-non.html

example.com

This is the NON-www index page

# cat /var/www/index-www.html

www.example.com

This is the www.example.com index page.

Please keep in mind, that the first <VirtualHost >directive encountererd by the apache webserver will be the default Webcontainer, so the order of the VirtualHost directives is important; in our case, if I call the webserver with no specific hostname or a hostname, that is not configured, I am being served the www-index because it is the first virthost directive.

# No Hostname given
curl http://127.0.0.1/

www.example.com

This is the www.example.com index page.

# index-www
curl -H "Host: www.example.com" http://127.0.0.1/

www.example.com

This is the www.example.com index page.

# non-www index
curl -H "Host: example.com" http://127.0.0.1/
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

<title>302 Found</title>

Found

The document has moved here.

<address>Apache/2.2.22 (Ubuntu) Server at example.com Port 80</address>

(Please note the use of the Host Header variable -H)

To keep in mind is that for NameVirtualHosting to work, both webserver and webclient have to be correctly configured.

I hope my instructions can help you to solve your problem.


Your domain isn't on the major blacklists and there's no problem with your SMTP server or settings (you've got it set rather well, actually). You will have to sort out your issue with sending to Yahoo email addresses with the support people at Yahoo as it is their blocking policy that's preventing delivery. Given their recent security issues, this may not be a surprising outcome of their trying to lock down their systems...

For the Gmail vs. Hotmail issue, it's probably their respective mail filtering algorithms that result in the Inbox vs. Spam folder issue. Again, that's something you would have to work out with Hotmail support.


Some application menus not present after upgrading to Ubuntu 16.04 w. MATE

Correct installation of MATE DE is:

sudo apt-get install ubuntu-mate-desktop^

Then you should logout, change session to MATE and login.

Or you can customize window manager settings from mate-tweak:

Open it from System -> Preferences -> Look and Feel -> MATE Tweak (or simply mate-tweak)
Go to Interface tab, and switch Select a panel layout to change the user interface to Ubuntu MATE.
Go to Windows tab, under Window manager set Select a window manager to Marco (software compositor).


Definitely you can use Kubuntu. Although, I would say at this point that you only install Kubuntu besides Ubuntu and not try to replace it.

Just open your Synaptic Package manager/ Software centre and choose "Kubuntu-Desktop" package and "GDM" login manager. Install these.

Once done, you need to reboot. The system would still be dual-boot. So, on Grub, you would select Kubuntu. But, on login screen, you would be given a choice to select a session "Kubuntu" or "Ubuntu" before entering your password.

Easy.


Is there a way to get the wallpaper to "tile" instead of "center"?

I believe the best thing you can do is automatically adjust the size such that it forces the tile setting to behave as desired. This can be done with GIMP.


What is the difference between Modify and Change in stat output

"Modify" is the timestamp of the last time the file's content has been mofified. This is often called "mtime".

"Change" is the timestamp of the last time the file's inode has been changed, like by changing permissions, ownership, file name, number of hard links. It's often called "ctime".


Where is the information about free space in a disk stored?

The free space isn't a property of the block device - it's a property of the filesystem on the device. Consequently, there won't be anything useful under /sys/block. Fortunately, there are other ways to query this information.

From the shell, one of the easiest ways to get the current free space is by using df:

[jk@pecola sda2]$ df -h /dev/sda[123]
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        64M  117K   64M   1% /boot/efi
/dev/sda2        20G  9.7G  9.4G  51% /
/dev/sda3        92G   65G   23G  75% /home

This uses the statfs system call to determine the free space available; if you're writing code to query free space, I'd suggest reading the statfs manpage:

man statfs

Hope this helps!


On 14.10, nonstop problems trying to get intel i915 and Nvidia 860M to play together

I spent another day on this, and an answer is pretty straightforward.

I did a reinstall of Ubuntu, and doing that installed the i915 drivers but not any NVidia drivers.
I then grabbed the CUDA drivers by downloading the .run file.  I made sure to run it by adding on this command line option:

--no-opengl-libs
    Prevents the driver installation from installing NVIDIA's GL libraries.
    Useful for systems where the display is driven by a non-NVIDIA GPU.
    In such systems, NVIDIA's GL libraries could prevent X from loading
    properly.

It said it is installing the display driver, but it doesn't appear to do it.  It complains that it had issues with libGLU.so libX11.so libXi.so libXmu.so libGL.so.  That's fine, it seems to mean it didn't install the display drivers.

I did a reboot, and I was able to build one of the sample projects and verify it works.  Running sudo modprobe i915 and sudo modprobe nvidia both worked without errors.

What I avoided was trying to install the cuda drivers through apt-get or getting updated cuda drivers through the edgers repository. I saw this option recommended often, but it caused me nonstop problems.  At least on this laptop, all Nvidia display drivers through apt-get would have the display hang every few minutes and I'd have to context switch between TTY1 back to TTY7 to get it back.  I could at least use the NVidia prime tool to switch back to the intel driver.  But every time I switched back to intel, sudo modprobe nvidia gave errors.  I also struggled to undo many of my setting changes.  Each time one attempt failed, I just reinstalled Ubuntu to start fresh and tried again.

I don't plan on doing heavy graphic gaming on this laptop, so this solution works for me.


Run xvfb-run as:

xvfb-run -a -s "-screen 0 1024x768x24" firefox http://google.com

Running Xvfb, and then xvfb-run will not cause the latter incarnation to run on the display of the former Xvfb. You'd need to set the DISPLAY variable for the app you wish to run on that other display, if you wish to run Xvfb by hand.

You do not need the RANDR extension for Firefox anyway. It doesn't need to resize the display while running.


how to fix automatically keyboard layout (input method) change on start-up?

I had a similar problem and this post helped me. I am also using Ubuntu 14.04 and the answer of Steve B worked fine.

Keyboardlayout Fix

It is not exactly the same but maybe it also helps with your problem.


Login on local terminal without password

edit /etc/init/tty1.conf:

sudo nano -w /etc/init/tty1.conf

replace the content with the following:

# tty1 - getty
#
# This service maintains a getty on tty1 from the point the system is
# started until it is shut down again.

start on stopped rc RUNLEVEL=[2345] and (
            not-container or
            container CONTAINER=lxc or
            container CONTAINER=lxc-libvirt)

stop on runlevel [!2345]

respawn
exec /sbin/getty --autologin root -8 38400 tty1

the important change is the last line includes --autologin root as an argument.

Once the change is made it can be activated with a reboot or by running sudo stop tty1 && sudo start tty1


Increase pointer speed for trackpad in Ubuntu 12.04

From the synaptics man page:

Acceleration

       The MinSpeed, MaxSpeed and AccelFactor parameters control  the  pointer
       motion  speed.   The  speed  value defines the scaling between touchpad
       coordinates and  screen  coordinates.   When  moving  the  finger  very
       slowly,  the MinSpeed value is used, when moving very fast the MaxSpeed
       value is used.  When moving the finger at moderate  speed,  you  get  a
       pointer  motion  speed somewhere between MinSpeed and MaxSpeed.  If you
       don't want any acceleration, set MinSpeed  and  MaxSpeed  to  the  same
       value.

Let's try it!

$ gksudo gedit /etc/X11/xorg.conf

If you have no xorg.conf file create an empty one. Add something similar to this and play around with the parameters.

Section "InputClass"
    Identifier         "Touchpad"
    Driver             "synaptics"
    MatchIsTouchpad    "on"
    Option         "VertTwoFingerScroll" "on"
    Option         "HorizTwoFingerScroll" "on"
    Option         "VertScrollDelta" "85"
    Option         "HorizScrollDelta" "85"
    Option         "TapButton1" "0"
    Option         "TapButton2" "0"
    Option         "TapButton3" "0"
    Option         "MinSpeed"   "0.7"
    Option         "MaxSpeed"   "1.4"
    Option         "AccelFactor"   "0.1"
EndSection

It's possible that the Identifier should be set to "Apple Magic Trackpad" but I'm not sure. I think "Touchpad" should work.

You should also know that I pulled these numbers in the proposed config out of thin air and that a gazillion options are available.

You can test Options for your current session with synclient. This way you don't have to restart X for the changes to take effect. Once you are happy with the parameters you can add/edit/remove them to your xorg.conf to make them permanent.

I am not sure if synclient is installed by default.

$ sudo apt-get install synclient

temporarily enable SHMConfig

$ synclient SHMConfig=1

test options. for example MinSpeed

$ synclient MinSpeed=0.5

for a detailed list of options and their values run

$ man synaptics

press j to scroll down

press k to scroll up

press / to search for a string, press n for next match, p for previous match

press ? for reverse search

press q to quit

Enjoy


How to download Videos from a YouTube playlist from past hour?

The following command will download all the video on your subscription page uploaded in the past 24 hours:

youtube-dl \
  https://www.youtube.com/feed/subscriptions \
  --dateafter now-1day \
  -u <username>

you'll have to change. See also: Download videos from youtube playlist or user based on date


How to port forward to enable NAT type on Playstation

You will need to add iptables rules to the forward table in your ubuntu installation. Here is a NAT HOWTO on iptables. http://www.netfilter.org/documentation/HOWTO/NAT-HOWTO.txt


18.04 Screen remains blank after wake up from suspend

It is the buggy nouveau driver again. That's what solved the issue for me.
Edit the file /etc/default/grub (using Vi editor -- some users have not been able to save after editing in Vi and have had to use the alternate "Ex" editing mode, which substitutes sudo edit below, then Alt+:w and :x for the save and exit commands).

$ sudoedit /etc/default/grub

Add  nouveau.modeset=0  to the line that says GRUB_CMDLINE_LINUX then press CtrlO to save the file and CtrlX to leave Editor.

Run

$ sudo update-grub

Now reboot.


personally I would install phpmyadmin, that will bring in apache and mysql and set it all up for you and give you a nice way to browse the mysql database. You can then put stuff in /var/www/ and it will just work. Look at http://localhost for your stuff and http://localhost/phpmyadmin for the database console. Do remove or secure phpmyadmin if you are putting this on the internet.


Canon-europe has a linux driver for this printer, which includes deb files for 32 and 64 bit systems.


Wireless network adapter stays hard blocked

Had the same problem. WiFi starts working after closing and re-opening the lid. It seems that the problem is only with some Asus laptops (mine is X551C)

In one of the articles I found there is also a modprobe setting added:

echo “options asus_nb_wmi wapf=4" | sudo tee /etc/modprobe.d/asus_nb_wmi.conf


You just need to set up display size in properties for your remote desktop connection.

Open Connection Properties for your connection to remote server -> Display -> General Options -> Size and select size you want.


Tried everything, cannot configure SAMBA on my Ubuntu systems on different interfaces

Try the below command and check whether you are able to configure samba,

sudo apt-get install system-config-samba


Ubuntu not booting after updating to 12.10

Done, guys.
I've downloaded and used boot-repair-disk.iso.
Now I'm back on my Ubuntu


For Ubuntu 14.04.5 server what brand and model of usb wifi dongle is supported

Look for one compatible with raspberry pi, since Raspbian is a similar OS to ubuntu. Example: https://www.amazon.com/Raspberry-Pi-WIFI-Adapter-Dongle/dp/B009FA2UYK


Libreoffice: How to install Portuguese dictionaries after and before the Orthographic Agreement at the same time and select the one I want?

The only way to solve this is to install both extensions, Portuguese PRE-AO and Portuguese AO, and disable the one you don't want to use for a given text.

In that case, the spelling will be according to the enabled dictionary.


The problem is not really about GPG keys, but if you look at the output you will find a lot of "404 Not Found" errors. Looks like some repositories were removed or you're having trouble connecting to the LaunchPad servers.

BTW to fix that one key you can try this (it won't solve the 404s):

gpg --keyserver keyserver.ubuntu.com --recv 3ACC3965 && gpg --export -a 3ACC3965 | sudo apt-key add -


Install location for a multi file .NET core app in Ubuntu

The usual method for non-deb and non-snap software is to:

Place the executable binary and all supporting libs and files in /usr/local/application_name/ (which is NOT on the default $PATH)
Place a symlink to the executable in /usr/local/bin or /usr/local/sbin (which ARE on the default $PATH)
Put runtime-created data, databases, tempfiles, shared files, working files, lockfiles, etc. into /var/local/application_name/ or /run/application_name/. Just be sure your application_name doesn't conflict with another installed application.

Generally, keep your files away from places frequented by a package manager (/bin, /sbin, /usr/bin, /usr/sbin, /usr/shared) lest they be overwritten unexpectedly by the package manager. ~/.local and /usr/local are safe locations to install non-apt/non-snap/non-pip software.


Unable to install packages due to /tmp at 100% usage

If your “/tmp” mount on a linux filesystem is mounted as overflow (often sized at 1MB), this is likely due to you not specifying “/tmp” as its own partition and your root filesystem filled up and “/tmp” was remounted as a fallback. To fix this after you’ve cleared space, just unmount the fallback and it should remount at its original point:

sudo umount overflow


I was perusing through some questions on stackoverflow and came across this beautiful command.

df -P file/goes/here | tail -1 | cut -d' ' -f 1

for instance if I wanted to find out the drive video.flv is stored on, I'd do something like this

 df -P file/video.flv | tail -1 | cut -d' ' -f 1

also remember that you must be working on the current location of that file.
Correct me if I'm wrong but try that command. I got it from here


Why do I need to re-load kernel modules for virtualbox after a kernel update?

The VirtualBox host modules are build from source code on your machine. Modules for one kernel will not necessarily work (or work properly) on another kernel. They are typically recompiled after the kernel is upgraded.

When you install a new kernel version, your old kernel is still running. As Javier Rivera says, you must reboot to use the new kernel.

So if your goal is to run VirtualBox on the new kernel, you need to reboot; the modules will be loaded when you do (after being rebuilt from source if necessary).

However, if your goal is to use the old modules with the old kernel, you can manually reload them with modprobe (as you've been doing).

If you believe it's a bug that VirtualBox modules don't keep working for the running kernel before reboot, you can bugreport that. If you're using the version of VirtualBox provided officially in Ubuntu (rather than the version from Oracle's software source), I recommend reporting this against downstream VirtualBox (i.e., against Ubuntu's VirtualBox). Please read this guide carefully first. There's also helpful information on bug reporting in this question.

If you can produce this with the upstream version of VirtualBox (especially if it happens on non-Ubuntu systems, but I don't think that's essential here), I recommend reporting it (or also reporting it) upstream (search first).

I recommend not accepting this answer immediately; maybe someone can better explain why the modules are unloaded.


How to re-enable a disabled standard user account?

You said you "tried many tricks." What did you try, exactly?

Did you try changing the user's password with sudo passwd USERNAME? That will usually solve this sort of problem.

(If that doesn't fix it, please edit your question to add details about what you've done.)


Remove output from add-apt-repository, without hiding true errors

The > redirects only sdtout stream, while it's obvious that gpg messages go to stderr (otherwise they would be hidden). Thus there is no way to redirect the gpg messages  without affecting the error messages also.

But it's possible to redirect stderr through pipe and filter the output with awk or grep, ignoring all lines that start with gpg.

sudo apt-add-repository -y ppa:brightbox/ruby-ng 2>&1 > /dev/null | grep -v '^gpg'


Laptop speakers make noise when audio jack is plugged in

The solution to this is to disable Auto-Mute Mode in alsamixer. Detailed instructions below.

Open up terminal and start alsamixer:

alsamixer

You should see a handful of tall columns with labels underneath, something like: Master, Headphone, Speaker, PCM, Mic, Mic Boost, S/PDIF, S/PDIF Default PC, Beep, Auto-Mute Mode, Internal Mic Boost

If you don't see these categories (specifically, if you don't see an "Auto-Mute Mode"), then try selecting a different sound card with F6. In my case I had to select HDA Intel PCH.

Notice "Enabled" above Auto-Mute Mode. Navigate to that item with the left/right arrow keys, and set it to Disabled with the up/down arrow keys. This should solve your problem, and you can exit alsamixer with Esc or by closing the terminal window.


Mounting USB disk with LUKS encrypted partion fails with a cryptsetup "Device already exists" error

Yes, this happens when luks encrypted device was not cleanly deactivated with cryptsetup close.

You can try to remove the mapping using

dmsetup remove /dev/mapper/luks-... if you want to avoid rebooting.


apt upgrade does not see apt-offline packages

I have found a solution, there may be a better one but this worked for me...

Part 1

Instead of doing: sudo apt upgrade by itself you have to use the tag --fix-missing and it will fail at first but then discover all the packages you set up using the normal method of apt-offline and it will update as expected.

Short story use this command: sudo apt upgrade --fix-missing

Part 2

Now if your trying to install packages/products/modules so things like net-tools for example... you do everything the same except...

Dont use: sudo apt upgrade --fix-missing, use: sudo apt-get install net-tools


Screen locking does not work after upgrade

From your Dash search for keyboard

Then go to shortcuts tab

Under System menu go to lock screen and change the associated shortcut to a new One.

on Custom Shortcuts click on + and enter the command xscreensaver-command and associated it the Ctrl+Alt+L  shortcut.


Unable to mount Windows partition - fast boot is already off - still get the problem

I had this issue and found the solution here.

  The only surefire method of disabling Hibernate, and thus removing hiberfil.sys, on Windows Vista and Windows 7, is through the command prompt and the following steps:

  Open a command prompt with administrative privileges.
  Enter "powercfg.exe -h off" (see Figure D).
  Exit the command prompt.

I had fast boot and hibernate unchecked but apparently that hiberfil.sys was still in my file system! Open a command prompt within Windows in administrator mode and run "powercfg.exe -h off". This should delete that file if you have it and hopefully solve the issue.


Your cron format is wrong. You want:

* * * * * /home/username/.crons/wallpaperSlider.sh

User's crontabs don't have a username field. That is only used for system-wide crontabs like /etc/crontab. You also don't need SHELL=/bin/bash since, even if your default shell isn't bash (it is dash on Ubuntu), your script itself has the shebang line (#!/bin/bash) so it will be run by bash no matter what shell cron launches.

You will probably have other issues as well though, since you're trying to run an application that communicates with the X server from cron. If so, you need to use:

DISPLAY=":0.0"
XAUTHORITY="/home/YOURUSERNAME/.Xauthority"
XDG_RUNTIME_DIR="/run/user/1000"
* * * * * /home/username/.crons/wallpaperSlider.sh


How do I get Ricoh Aficio GXe3350n to print?

Just a guess: have you selected the right printer? E.g. you might unintentionally be printing to your default printer instead of the GXe3350n...

Install the Gutenprint and the CUPS drivers from the software center and restart your machine.


virt-manager | kvm | spice: "Redirect USB device" menu option is greyed out

Your user will probably have to be added to the libvirtd group. Then you should reboot for changes to take effect.  Type in the following from a terminal window:

sudo adduser $USER libvirtd

More information can be found here.


DDrescue can make the disk worse, to minimise you want to try and get the good block as quick as possible.
You can set DDrescue to copy the good blocks first using the -n flag eg:
ddrescue -f -n /dev/sdb sdb_rescue.img sdb_rescue.log

Then run DDrescue again trying to recover ( reusing the existing log will skip the successfully recovered logs) eg:
ddrescue -d -f -r3 /dev/sdb /root/sdb_rescue.img sdb_rescue.log

DDrescue can try and recover the partiton table in the state it is on the disc, then you can try and repair the partition table on the recovered image.

A failing drive tends to develop more and more errors as time passes. Because of this, you should rescue the data from a drive as soon as you notice the first error. Be diligent because every time a physically damaged drive powers up and is able to output some data, it may be the very last time that it ever will.
You should make a copy of the failing drive with ddrescue, and then try to repair the copy. If your data are really important, use the first copy as a master for a second copy, and try to repair the second copy. If something goes wrong, you have the master intact to try again.
If you are trying to rescue a whole partition, first repair the copy with e2fsck or some other tool appropriate for the type of partition you are trying to rescue, then mount the repaired copy somewhere and try to recover the files in it.
If the drive is so damaged that the file system in the rescued partition can't be repaired or mounted, you will have to browse the rescued data with an hex editor and extract the desired parts by hand or use a file recovery tool like photorec.
If the partition table is damaged, you may try to rescue the whole disc, then try to repair the partition table and the partitions on the copy.

https://www.gnu.org/software/ddrescue/manual/ddrescue_manual.html#Examples


Ubuntu Studio 17.04 - apt doesn't see the latest version of qbittorrent

After reviewing your outputs, and checking the PPA, what I can see is that something is wrong with zesty PPA's Packages file; and after a little bit more research we will find out that there is no binary package for zesty at all.

I'm running xenial, I added the PPA and it's key, after updating my lists, the output of bellow command:

grep -iE 'package|version' /var/lib/apt/lists/ppa*qbitt*amd*

Is:

...
Package: libtorrent-rasterbar-doc
Version: 1.0.11+git20172002.ecd20f15cb-1ppa1~xenial1
Package: qbittorrent
Version: 3.3.12-0ppa1~xenial
Package: python-libtorrent
Version: 1.0.11+git20172002.ecd20f15cb-1ppa1~xenial1
...

Which we can see that qbittorrent is there, so if I run apt list -a qbittorrent, I will get both Ubuntu and PPA packages available for install:

qbittorrent/xenial 3.3.12-0ppa1~xenial amd64
qbittorrent/xenial 3.3.1-1 amd64

If you download the packages list for xenial and checking it after extracting, you can see that it's contains qbittorent, however the Packages file for zesty does not contains qbittorrent: here

And after all if you check the pool of this PPA you will see that there is no specific deb file for zesty.

At the end by checking packages details of PPA we can see the build process of zesty has been failed, so wait a little bit for a successful build.


doesn't support architecture 'arm64, doesn't support architecture 'armhf'

The packager does not publish packages for arm64 or armhf in that repository, only i386 and amd64.

If you want this software for Arm, you can either ask the vendor to compile it for arm, or if it's open source, recompile it yourself.


A first step can be the analysis of your syslog:

dmesg | grep -i "error\|warn\|fail"

Perhaps that will give you some clue and will turn your problem more specific.

You can then share the results here.

Answer 2:

As far as I know, you can ignore the "ACPI/disable ASPM" errors.

Have you tried using the recovery mode? During boot, hold SHIFT until the GRUB menu appears, then select the recovery mode option (more than one can be available if you have many kernels installed).

Also, there is a big post here about many ways one can try and fix boot problems.


The bug is fixed with this kernel:

http://kernel.ubuntu.com/~jsalisbury/lp1788997

as long as you select antenna 1:

modprobe rtl8723be ant_sel=1

Make sure you have that in config too:

sudo /bin/sh -c 'echo "options rtl8723be ant_sel=1" >> /etc/modprobe.d/rtl8723be.conf'


Mount Android media folder in Kubuntu (open file directly instead of copying to cache in Dolphin) no matter the Dolphin/KDE separate KIO processes

Sorry, but I have too few points to leave this as a comment. The problem is that software can't use KDEs KIO layer to acces network fs. I do not know what distro you are using, but the package kio-fuse should solve your issue.
You could also install cifs-utils, create a mount-point (e.g. /mnt/movies), open the folder with dolphin, and play videos through vlc or whatever your media-player of choice might be.


SSSD password change not working with LDAP backend

After much research and testing. Here is the answer to allowing users to use passwd function to change their password when they are using SSSD with ldap backend. If they can indeed authenticate with their password via ssh to the SSSD client, then the problem of changing their password which produces the following: "passwd: Authentication token manipulation error"  comes from the LDAP ACL. Need self write access to userPassword Attribute

Add the following to your ldap config file when using olc. Edit olcDatabase={2}bdb.ldif olcAccess:

{0}to attrs=userPassword,shadowLastChange by self write by anonymous
            auth by dn="cn=Manager,dc=domain.com" write by * none

Make sure you add some more to allow reads and writes for any other attributes you want.

olcAccess: {2}to * by * read by users read by anonymous auth

You just have to do it once for all users. {0}to attrs=userPassword... just as I listed above is applied as an ACL to the ldap server and applied globally. If you edit the olcDatabase={2}bdb.ldif olcAccess manually you have to change the CRC, but thats easy as there are many readmes on that.

The other user posted changing bind credentials on the clients /etc/sssd/sssd.conf like this:

ldap_default_bind_dn = cn=Manager,dc=mydomain,dc=fqdn.com ldap_default_authtok_type = password ldap_default_auttok = secret

Modifying in /etc/sssd/sssd.conf bind credentials didn't work for me, but allowing users to selfwrite their userPassword attribute did... You may not always want this, but for using the passwd function on linux clients with SSSD and LDAP backend you need it.


How to detect irregular activity in LAN/PC?

There's plenty you can do with security, all of which will be great education!

I've used Fail2ban to prevent repeated access attempts mostly for http hack attempts. it reads log files so is very very configurable, it's a bit complicated but well worth reading up on.

You can see who last logged in using the lastlog command.

The command sudo arp will show you the addresses on your network so you can identify potential spoofing with MAC addresses you don't recognise.

iptables which fail2ban also uses can be used to deny a specific IP address or protocol. (careful with that though, unless you have physical access).

Going a bit more into networking you could look up wireshark this can capture traffic and show ARP requests.

All this is good practice but I find mostly what you need is to use WPA2 with a long password on your WiFi, change it from the one that's probably printed on your router.

Use Private key authentication over SSH. (Also be very careful here)

Hope that covers most of what you want. It's a lot to work with; so can't explain how to use everything here.


xfce compose key not working in xfce4-terminal

That's because xfce4-terminal is independent of the X server.  See this answer on SuperUser, a sister site to Ask Ubuntu.


Bash source + npm script function not exported but variable is

As you can deduce from the error message, npm-run uses /bin/sh by default, as discussed here.
In Ubuntu, /bin/sh is the Almquist dash shell, which doesn't recognize exported functions. On Mac it's likely bash running in sh compatibility mode - which apparently does.
I don't really know anything about npm, however it should be possible to configure it to use /bin/bash via npm config set script-shell - I don't know enough to know whether that's advisable, or whether you would be better off finding a different way to implement the desired functionality.


How to get Extended Security Maintenance for Ubuntu 16.04

Setup Ubuntu 16.04 ESM
I tried out ESM on Ubuntu 14.04, (16.04 activation should be the same).
It was pretty easy to set up.
I started out by installing an Ubuntu 14.04.4 ISO I had in my downloads folder. (I probably should have downloaded ubuntu-14.04.6-desktop-amd64.iso from https://releases.ubuntu.com/14.04/). Latest release of 16.04 is 16.04.7 LTS available from https://releases.ubuntu.com/16.04/. At this point we at least know for a fact that the downloading of 14.04 and 16.04 Desktop and Server is fully supported by Canonical.
During the install process I selected the option to download updates while installing. I think that if I would have used point release 6, there might have been fewer updates and the process might have gone faster.
It was a pleasure to log into 14.04 after so long, sort of nostalgic.
First priority was security. For 14.04 and now 16.04, this means signing up for Ubuntu Advantage (UA) client and installing ESM.
The Ubuntu discourse page for information on installing Ubuntu ESM is https://discourse.ubuntu.com/t/ubuntu-advantage-client/21788. the page directed me to https://ubuntu.com/advantage where I completed the registration process and ended up with a free token.
Back on https://discourse.ubuntu.com/t/ubuntu-advantage-client/21788 I continued with Installing the UA client by running a couple of commands as instructed. Next I proceeded to Attach the UA client. I ran the line I got when registering sudo ua attach [UNIQUECODE], (Please use your own free token).
Running sudo ua status I confirmed that ESM was enabled.
I completed the upgrade by running sudo apt update and then sudo apt upgrade. The installer ran for quite a while.
I ran Software Updater and It installed quite a few security updates.
All Settings/Overview tells me System Up-To-Date.
It appears to me that  Canonical is truly continuing support of Ubuntu 14.04 and 16.04 for free. I understand that Ask Ubuntu will not be allowind questions about ESM versions of Ubuntu?
AND EVERYTHING WAS FREE


How to catch function keys (F3, F4...) value in a variable into a script shell?

You can do like this:

Read code of keys
Press Ctrl+v and press a key. F1 for example
And read the output. F1 gives ^[OP
Note that ^[ is for Escape that you will write in a script as \e
Or get all codes of functions keys
for x in {1..24}; do echo -n "F$x "; tput kf$x | cat -A; echo; done
Assuming F13 is Shift + F1
Handle keys in script
With bash functions like while, read, case / esac

Example:

#!/bin/bash

ReadKey() {
  if read -sN1 KEY; then
    while read -sN1 -t 0.001 ; do
      KEY+="${REPLY}"
    done
  fi
}

while ReadKey; do
  case "${KEY}" in
    $'\eOP')   echo 'F1';;
    $'\e[24~') echo 'F12';;
    *) echo    "Keys pressed: ${KEY}";;
  esac
done


How to install VLC? When i get this error?

This is what I have to do to get it to work

#!/bin/bash
#add VLC (Totem has been removed and Mplayer added)
sudo add-apt-repository ppa:lucid-bleed/ppa
sudo apt-get update
sudo apt-get install vlc vlc-plugin-pulse mozilla-plugin-vlc
sudo rm /etc/apt/sources.list.d/lucid-bleed-ppa-lucid.list
sudo apt-get update
sudo apt-get upgrade
echo "now run VLC and set the preferences to allow only one instance."


Overheating on Ubuntu 16, dual graphic card Intel - ATI

/sorry for this I wanted to comment but for some weird reason this page does not let me do that./

I'm not a guide but I read several times problems like that, and the best thing to do is to use a kernel release that is equal to your laptop release date.
I experienced the same heat problem, and compiling old kernel was the solution, maybe you should try that.
In my case deleting ubuntu from my laptop was the best thing to do, maybe ubuntu is not setting things, maybe missing parameters or whatever, I don't know why but windows works like a charm, and just for the problem of heat I returned to windows, now w10 have bash(beta) so I dont see any difference of changing for the simple things i do.

Heat is really a problem because it determines how much time your laptop will live, I've tried mint, fedora and even arch but my problem persisted(also I wanted to try many distros because why not) but finally I decided to go to windows because my work and my life needs that, so Im sure is a kernel problem maybe torvalds doesnt like my laptop =/.


Port 443 is blocked, that's why you can't download files on https  connections.

Run this command to allow 443 on TCP :

sudo ufw allow 443/tcp


problem during installing multi2sim simulator

Just find this line:

else if (isnan(fvalue) || fvalue == 0.0f || fvalue == -0.0f)

that is inside the /multi2sim5.0/scr/arch/southern-islands/emulator/WorkItemIsa.cc file.

And add std:: before isnan. It should be like this:

else if (std::isnan(fvalue) || fvalue == 0.0f || fvalue == -0.0f)


Do I need same monitor sizes and resolutions for multi monitor support

I have used multiple monitors for years on several platforms (debian, ubuntu, gentoo, and fedora) with both nvidia and ati. As long as the graphics card is compatible I have never had any major problem with using different resolutions for different monitors.

The minor problems are with background images that span more then one monitor, but now I typically set the background image with nitrogen, and as long as I do not span the image across multiple monitors, no problem.

Are you having a problem with 12.04 ?


problem with update ubuntu 14.04 dell vostro 3400

Reinstall nvidia drivers after complete system upgrade. They use a patch that comes together with nvidia driver package and I suspect this to be the reason for your problems. So, upgrade, restart, and after restart press Ctrl+Alt+F1, input username and password and reinstall your nvidia drivers.

Just don't forget to keep in mind the name for your nvidia drivers - eg: nvidia-331 or similar. To manually install drivers you can run this command:

     sudo apt-get install nvidia-xxx

where xxx is the number for your driver package. Use remove instead of install to manually remove drivers first.

Once you get to the Ubuntu login sign, press together Ctrl+Alt+F1 which will get you to the console. Input your username and password, and run this command:

     sudo nvidia-xconfig

This will configure your system with your newly installed nvidia drivers. Reboot and that should do it.

If it still won't work after reboot, you need to run yet another command after you press again Ctrl+Alt+F1 key combination, and this new command is:

    sudo chmod -R ug+rwx /home/[username]

Replace [username] with your username without the brackets. This way you claim full permission for your user home folder. Hope either way will be of help.


Iptables Issue can't SSH Remote Machines

The rules for iptables are applied in order and the first matching rule is applied. You therefore need to insert the rules to allow traffic before the rules that drop all traffic.


Ubuntu comes with a photo manager called Shotwell. It's a pretty nice photo manager, as far as I have seen it.

It isn't able to import iPhoto databases natively, but people have made scripts to run on Ubuntu that, when given the path to the iPhoto Library and the path to the Shotwell database, can import the Library.

Remember, these don't actually move any images. Just like iPhoto, Shotwell will only have the path of where to look.

Scripts:
https://github.com/gaetronik/iPhotoShotwell
https://github.com/fasaxc/shotwell-iphoto-import


Loading the / folder in RAM to make the fastest storage option possible

Basically, no. You can't install the system to RAM, because, as you noted, it is volatile. You could theoretically make a ramdisk large enough to hold all of /, but it is meant to be temporary, and you still have to store it on disk, and have it read from disk at boot. The initial ramdisk is meant to be small and temporary, to speed up the boot process.

Also, you'd run out of RAM very fast. I'm sure you have way more disk available than RAM in such a machine. The machine also either has SAS or SATA, so it should be pretty fast as far as general write accesses go.


How do I escape apostrophes within an awk statement?

You might want to approach this in two ways:

Pass single quote via variable:

awk -v sq="'" -F',' '{print "SELECT * from user where id = "sq$2sq";"}' myfile.csv

Make use of hex value of the single quote in printf statement:

awk -F',' '{printf "SELECT * from user where id = %c%s%c;\n",0x27,$2,0x27}' myfile.csv


[ERROR]Cannot access secondary GPU - error: Could not load GPU driver

I think that you need to install virtualgl & virtualgl-libs. It's not in official repository, so you need to add bumblebee-ppa, then you need to switch from sausy to raring (only for bumblebee-ppa).

Here's the steps:

Add bumblebee-ppa:

sudo apt-add-repository ppa:bumblebee/stable

sudo apt-get update
Then switch to raring, edit the file (not the name, the contents of it) and change there a string saucy to raring

/etc/apt/sources.list.d/bumblebee-stable-saucy.list
Then, install virtualgl (with virtualgl-libs)

sudo apt-get install virtualgl

Consider to install the ia32 (i386) libs if you need, this is optional, but suggested by virtualgl x64 package.

Also, you might need this fix: http://www.webupd8.org/2013/10/fix-bumblebee-libturbojpegso-issue-in.html
Check it before you will made any changes.

I had the same problem, then made all this things and it works.


problem installing MS Office2010 (64 bit) in Ubuntu 14.04 Wine

MS Office 2010 (64-bit) does not work on wine. Here are other options (in no specific order).

Install 32-bit version
The 32-bit version works alright on wine. Try installing that. You can also try installing a latter version (2007, 2003 etc). Check out the list at https://appdb.winehq.org/appview.php?appId=31.
Install Other Office program
There are other great software that you can use in place of MS Office. Here's a list of some popular ones.

Libre Office
Apache Open Office
Google Docs (web based)

Use CrossOver
CrossOver is your average wine platform tweaked to support a lot of programs and games. Check out the full list at https://www.codeweavers.com/compatibility/.
Reversal: It's not free you have to pay for it though you can try it for a few days.
Virtualization
Put your whole MS Windows OS inside Ubuntu and then install your MS Office on that.

VirtualBox:

  $sudo apt-get install virtualbox-qt

VmWare:
It's not free. You have to pay for it, but like CrossOver you can get a free trial.

PlayOnLinux
A frontend to wine - minus all the headache of some configuring on wine. Easier to use than wine because it install some of the software or libraries that may be needed by whatever program you wish to install

  $sudo apt-get install playonlinux


Internet becomes unavailible after connecting through vpn

I think I have a solution. Please follow the procedure as mentioned below;

Open Network connection and click on VPN tab.
Click on VPN to be configured.
Now click on Edit
Go to IPV4/6 Settings
Click on Routes button
Now check the box in front of the text "Use the connections only for the resources on its network" (This will solve the problem of breakage of your internet connection)
Add a route using add button. (I am not expert in adding routes, so wont be able to help you out here. But this is the way, you would be able to add the routes).


Automatic mount of second drive in 15.04

The editing of the file is simple.

Open a terminal and edit your fstab:

sudo nano /etc/fstab

Add a line, eg:

UUID=a61d6eab-d90d-471a-8e9c-e9816b6c90cf /home           ext4    defaults        0       2

Open a second terminal and run the command:

sudo blkid

Here is a sample output

% sudo blkid
/dev/sdb1: UUID="d89ae699-b2e9-4442-a292-4f27d36d3a9a" TYPE="swap" PARTUUID="000a178e-01"
/dev/sdb3: UUID="a61d6eab-d90d-471a-8e9c-e9816b6c90cf" TYPE="ext4" PARTUUID="000a178e-03"
/dev/sda1: UUID="d94f4097-91fe-4e96-89b2-7877065d0650" TYPE="ext4" PARTUUID="00096da5-01"

Search your partition in the first column, eg. /dev/sda2. Take the UUID and replace the UUID (without the double quotes) in the added line in your fstab file.
Take the type TYPE for the partition and replace the type in the fstab file.
Replace the example /home in your fstab with your preferred mount point.
Save the fstab file
Mount the partition with sudo mount <your_mount_point>


Remove Ubuntu and install Ubuntu Server as a fresh start

Download the server install CD from here Ubuntu 12.04 - Server Install CD burn it to a CD , boot from CD and re-install.

See here a tutorial about sever installation : Ubuntugeek.com and better would be to install first in VirtualBox to see how the installation progress is and then make it for real.

About VirtualBox see here: Ubuntu community wiki- Virtualbox


How can I install a Canon Printer driver for mp495

Have the printer connected and on the same Wi-Fi network as the computer.

Go to System Settings, Printers, and add it. It should show up, and walk you through getting drivers and naming it.

In Linux, you rarely need to get software of any kind from Google searches. This is a common mistake of those coming from Windows. Programs come from repositories, and drivers are no different.


Aria2 is a terminal app but it has a webgui that you can use...if you can put your install of the webgui online then you could use that or if you are just working of a LAN then it could work that way too...though either way you will need to ssh or something into the computer to use these things.

There is not a simple solution right now but Aria2 does allow remote control through RPC. - http://aria2.sourceforge.net/


DHCP server installation error Ubuntu 12.04

First open a terminal and type;

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install isc-dhcp-server

If the problem still continues I'm suggesting you to change your mirror.
Open source.list using your text editor. eg; vim.

sudo vim /etc/apt/sources.list

Then locate http://au.archive.ubuntu.com/ubuntu and replace it with http://archive.ubuntu.com/ubuntu.

There is a GUI solution called Software-Sources for suggestion that is above.
For more information; https://help.ubuntu.com/community/Repositories/Ubuntu

Also you can manually download isc-dhcp-server package and install it.


Java JRE will not install due to "tar: Error is not recoverable" error

If OpenJDK isn't preferred, you can install the Oracle version from a ppa (which is a lot easier than manual installation, and you should also receive updates automatically). Adding via ppa also ensures that you are using the correct architecture (32 vs 64 bit).

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

Source: http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html

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


In Ubuntu
rfkill unblock all

If this doesn't work read on.
If you are dual-booting with Windows.
Boot Windows, enable wifi and reboot.
In my system, if I disable wifi in Windows, I'm not able to unblock it in Ubuntu. Ubuntu is able to remove the soft block but not the hard block on my system.


Made an executable .jar , runs on Windows but Ubuntu doesn't run it?

OK right click the .jar and click properties then click permissions and click allow executing file as program


How to install Intel® HD Graphics 5500 (Broadwell GT2) on Ubuntu 15.04

You don't have to install anything.
This is an integrated graphics chip.
The graphics driver is preinstalled.


Ubuntu 18 custom boot script to run on every boot, created manually symbolic link to the script, but still not executed

After reading and google figured out how to do it, please check link
ubuntu-1804-running-script-at-boot


Changing file names in sub-folders following a number extracted from the sub-folders

You can use the Perl rename command file-rename for this. If you're unfamiliar with this tool, I recommend you run file-rename --version to see if you have it--any output other than an error means you do. A few Ubuntu releases don't come with it by default, so you might not have it, in which case you can get it by installing the rename package. (The "command not found" error if you don't have it will likely even tell you about that.)

cd to the abc directory whose subdirectories contain the files you want to rename and run this. Then if the renaming operations it shows are really the ones you want, run it again without -n to do the actual renaming.

file-rename -n 's|^(.+)_(\d+)/ghi\.jpg$|$1_$2/$1_xyz_$2.jpg|' */ghi.jpg

This generates the list of files to rename using a shell glob and passes it as arguments to file-rename to be renamed. It assumes that you want:

To rename files called exactly ghi.jpg that reside directly in subdirectories--named ending in _ followed by digits--of the directory abc.
Each file's new name to be its containing directory without the trailing underscore and digits, followed by xyz, followed the trailing underscore and digits from its containing directory's name.

The way that works is that s|pattern|substitution| operates on files whose paths, as they were passed as arguments to file-rename, match pattern (interpreted as a regular expression in the Perl dialect). The operation it performs is to rename them using the specified substitution. Files whose names didn't contain a match to pattern wouldn't be renamed. There's nothing special about | as the choice of separator; I just don't want to use the usual / since that's appearing in the paths.

In the pattern ^(.+)_(\d+)/ghi\.jpg$:

^ matches the beginning of the path and $ matches the end. This allows only matches on the entirety of each path passed in, rather than just any part of it.

(To address one possible point of confusion: the paths being passed in are still relative paths like def_0/ghi.jpg, not absolute paths like /home/you/abc/def_0/ghi.jpg. When people talk about "full paths," they typically mean absolute paths. By "the entirety of the path" I just mean each whole argument passed in rather than a smaller substring of it.)
(.+) matches and captures (( )) a sequence of one or more (+) of any character (.). This goes into the first capture group.
_ matches itself, a literal underscore character.
(\d+) matches and captures (( )) a sequence of one or more (+) digits (\d). This goes into the second capture group.
/ matches itself, a literal slash character. (It doesn't behave as a delimiter because we used | as a delimiter instead.)
ghi matches the literal text ghi.
\. matches just a . character. The \ escapes the .; otherwise, the . would mean "any character."
jpg matches the literal text jpg.

The substitution $1_$2/$1_xyz_$2.jpg signifies:

Text that was placed in the first capture group ($1). This is the text that matched .+ in the pattern.
An underscore, _.
Text that was placed in the second capture group ($2). This is the text that matched \d+ in the pattern.
A slash, /.
The first capture group ($1) again.
The text _xyz_.
The second capture group ($2) again.
The dot, .. Unlike in patterns, in substitutions a . is not treated specially, so it need not (and should not) be escaped with an \.
The text jpg.

For general documentation the use of file-rename, see the output of file-rename --help, man file-rename, and this blog post. (I use the file-rename instead of the rename command, because on some systems rename is another utility. On most they are the same.)


Delete windows completely and install ubuntu on SSD

Step 1: Install Kubuntu to the SSD.

Step 2: Boot from the SSD. Mount the HDD and copy your data over.

There are lots of details involved in each step, of course.


Ubuntu Live CD does not recognize a Windows partition with data on it

Unfortunately it seems you accidentally partitioned your whole drive replacing your Windows partitions with a single Ubuntu partition.

  You will not be able to recover these partitions by restoring Vista with the recovery CD. In fact every write attempt to your hard drive will make things worse as remnants of your data may get more and more overwritten.

  Encrypted partitions can not be recovered

You may however be able to recover your partitions with testdisk  but you may not be able to recover all of your data. You can temporarily install testdisk on a live session too (however this will then not be a permanent installation).

Please have an external drive ready to save your recovered data before you proceed. You can't recover the data on the same drive.
Install testdisk from a live session ("Try Ubuntu") by:

Adding the "Universe" repository to your software sources

Updating your apt cache in a terminal with

sudo apt-get update
browsing to above link, or by typing

sudo apt-get install testdisk

in a terminal.

Mount your external backup drive in the live session (e.g. with Nautilus) to be able to store recovered data later.
Follow the concise step by step guide on the Testdisk Wiki which will help you to recover lost partitions.
If you are not able to recover from an image of your overwritten drive (this will need an external drive with more than double the free space than your laptop's hard drive) you need to save all your data on an external drive soon after recovery.
You will not be able to recover your Windows installation, as this was overwritten by Ubuntu.
Only if you fail to recover partitions you may be able to recover single data file using PhotoRec from the TestDisk suite but this will not recover filenames, folder structures or time stamps of your files.
Do not use the drive before you were able to recover your lost data.

Copy data from the live system to an external drive

To be able to save our data to an external drive we need to mount both, the recovered partitions, and the external USB drive in the live environment. The below picture shows how the USB drive will be mounted on insertion (the internal partitions will be mounted on selecting them):

We can then copy & paste (or drag & drop) our rescued files from the internal drive to the external drive (e.g. by opening a separate Nautilus window, or in releases < 13.04 by adding an extra pane with  F3 ). From the command line we can issue:

copy -a /<mountpoint_source>/* /media/ubuntu/<name_destination>

After sucessful copy we need to unmount the drives to avoid data loss. This will be done in Nautilus from a right click context menu or on the command line:

sudo umount /media/ubuntu/<name>

Copy single files using testdisk

In case we were unable or did not want to recover the partition table we may try to copy selected files or directories with testdisk from the <Advanced> Filesystem Utils menu:

In above example I had selected examples.desktop and rsynctest folder by pressing  : . To copy these files we press  C  for the next menu giving the file hierarchy of our running system. We have to browse to the mountpoint of our external drive (here /media/23GB_USB but this will probably be /media/ubuntu/<name_of_device in your case). The content of our USB is now listed, and can be browsed for deeper directories:

When we press  C  in the example above our above selected example.desktop, and the folder rsynctest will be copied to the external USB drive.

To verify we had succeeded we can now open Nautilus in our live system and see the content of the rescued files. After we are done, do not forget to unmount the USB drive.


Well it lists fetchmail as a dependency in apt-cache so it should send the mail without any other mail server. How did you install it? If it was through apt-get it should already have fetchmail installed.

Try installing it with sudo apt-get install fetchmail or reinstall logcheck with sudo apt-get install --reinstall logcheck


Is apt-get install method the same as Ubuntu software centre installation?

Except for paid apps as tachyons has pointed out (which can be installed and uninstalled with apt-get but only once purchased in the Software Center), the Software Center is primarily a front end for the various apt- commands--not just apt-get. For example, the Software Center will also search for packages and let you edit your Software Sources.

The main practical distinction between the two is that the Software Center will automatically fetch information about what packages are available from where and in what versions. In contrast, when installing or upgrading software with apt-get, you should run sudo apt-get update first if you haven't done so recently. sudo apt-get install ... does not (ever) cause sudo apt-get update to be run automatically (though it may be run automatically up to once a day as part of automatic updates in the system).


How to enable icons on GNOME 3 desktop on Wayland?

The GNOME 3 DE is designed to be used without having icons on the desktop, so desktop icons are not supported on the standard GNOME 3 desktop environment. But for users who want to work with icons on the desktop, an alternative is offered. You'll have to log out and switch the user session to GNOME Classic mode. Log back in and now you are able to use desktop icons in GNOME DE.


matplotlib is packaged.

You can install it with

sudo apt-get install python-matplotlib python3-matplotlib


Unsupported hardware, the battery is missing a driver for Linux and you can expect Microsoft to not supply one

wiki.gnome.org has a run down on what does and does not work and the Bug report it refers to in regards to the battery. There are some patches in the bug report but nothing made it into the kernel yet.

On the lkml mailing list is a run down on the work Bastien Nocera did (same person who made the wiki.gnome.org link).

edit:

Maybe there is a way: there is a generic patch that includes Debian and Ubuntu. That will be your best bet.


Will Ubuntu 12.04 64bit run on a Intel Celeron 900?

The Intel Celeron 900 is actually a single-core version of the Core 2 Duo processors. It supports 64-bit and Ubuntu 12.04 x64 will run just fine on it.

However, if you have less than 1GB of RAM you should consider running the 32-bit version for performance reasons.

The 64-bit version of Ubuntu will run on any PC (or Mac) with a 64-bit Intel or AMD processor. The amd in amd64 doesn't mean that this architecture is AMD-specific. The first 64-bit processors for PC's were made by AMD; it's for that historical reason that the architecture name has amd in it.


Audio starts playing 3-5 seconds after video does

Perfect solution for specific problem, but not all applications
This solution works when pausing and resuming from the same sound source such as a movie:
Edit Pulse Audio configuration file: sudo -H gedit /etc/pulse/default.pa
Locate this section and place # in front of second line:
### Automatically suspend sinks/sources that become idle for too long
# load-module module-suspend-on-idle

Save the file and exit.
Reload Pulse Audio using pulseaudio -k.
Where it doesn't work.
Whilst watching a movie I can have laundry timer running in the background. When a alert sounds to signal end of Wash Cycle, Rinse Cycle or Dryer no sound is heard. The alert sound was < 5 seconds. The workaround is to pick a different sound file > 5 seconds long.


Is there a tool like Juju or Chef that I can use to automate the set up of my computer?

You might want to look at the Juju 'local provider', which lets you create a mini-cloud in-memory and deploy things into it with Juju. It's useful for developers who want to mock up a cloud environment on the go, with many services connected to each other, so they can test their code inside a complex system of many moving parts.


What is the difference between two condition evaluation approaches in bash

TL;DR: they're not the same and the purpose is slightly different, although they aim at same desired effect.

The difference is in who  does the logic checks. As you may know, the square brackets are synonymous with test command. So, with -o you see single test command, and the two conditions are evaluated together, then returned exit status to bash.

With && you have two test statements, each returning separately, but then bash evaluates if they are both true. The last one is recommended nowadays , since test is a bit dated and has issues (and new version of test [[ is often recommended, see this), plus it is far more readable since the && or || are used in many other languages including C and Java.

So in first case, with [ you evaluate two expressions, with && you evaluate exit statuses of two [ comands.

Additional info:

As pointed out by @steeldriver in the comments, there is indeed built-in command test, which is bash's internal implementation of /usr/bin/test.  Regardless of this fact, the way built-in test and /usr/bin/test work syntactically is exactly the same.

Keep in mind, however, that if you're using some other shell than bash or Ubuntu's default shell dash, then you will likely be using /usr/bin/test . Korn shell, ksh for instance, doesn't have test built-in.

Keep in mind also the fact that && and test are not equivalent:

test is supposed to evaluate statements and return exit status like any other command (see POSIX specifications for test). It has a whole list of things you can evaluate - existence of files, filetypes, integer and string comparison.
Logic operators such as && and || are used by shells to evaluate exit statuses of separate commands just like ; does, which is one of the reasons in bash man page these operators are under Lists section. In addition, they cannot be a stand-alone command , like test - they are standard shell list operators . So, unlike test you cannot use && to check if file exists; you can only know if command to the left exited successfully or with failure, and run or not run second command accordingly.


I'm trying to intsall Ubuntu to a (Samsung) NP300E4C laptop but can't access BIOS

For Samsung NP300E4C ..

from: Samsung NP300E5C User Manual > Page 75

  Turn the computer on. Immediately press the F2 key several times.

You may just have to keep trying. You don't need to change boot-order, as generally better results can be obtained by manually selecting boot device.

More modern laptops, with Windows 8.1, do actively prevent you from accessing BIOS. But, access can be obtained through 'Recovery Menu' within Windows 8.1. This should not be an issue on your laptop (given its age).

UPDATE

Yes, I understood you were on Windows 7.

Please review: superuser.com > cant access BIOS .. on Samsung .. NP270E5V

Suggestions:

Try Esc or F10 instead;
Try FnF2 (holding down Fn, then pressing F2);
Try F2, after holding down Esc during power-on/startup;
or contact Samsung support ..


Gnome shell calendar + delayed Internet connection

I'm going to assume that by "integrated calendar" you mean the one from the action bar at the top of the screen.

You can refresh this by opening the Online Accounts application and toggling the Evolution Data Server entry for Access Your Google Calendar off and on again.


Crontab isn't working with simple bash script

Replace

> ip.address.txt

with

> /home/jj/Desktop/IP/ip.address.txt


How to work around the home directory changing to /root when using sudo?

It sounds like $HOME is being changed to /root within your script's environment. Try using $SUDO_USER instead of $ON_USER, and $(eval echo ~$SUDO_USER) instead of ~:

ak@myo5a:~$ echo "$(grep -v "^#" ~/.dbus/session-bus/$(cat /var/lib/dbus/machine-id)-0)"
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-qH8a0TOc6f,guid=873a5a81a7abe448ef2c293000000012
DBUS_SESSION_BUS_PID=2013
DBUS_SESSION_BUS_WINDOWID=8388609
ak@myo5a:~$ sudo -sH
root@myo5a:/home/ak# echo "USER=$USER; HOME=$HOME; SUDO_USER=$SUDO_USER; SUDO_HOME=$(eval echo ~$SUDO_USER)"
USER=root; HOME=/root; SUDO_USER=ak; SUDO_HOME=/home/ak
root@myo5a:/home/ak# echo "$(grep -v "^#" $(eval echo ~$SUDO_USER)/.dbus/session-bus/$(cat /var/lib/dbus/machine-id)-0)"
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-qH8a0TOc6f,guid=873a5a81a7abe448ef2c293000000012
DBUS_SESSION_BUS_PID=2013
DBUS_SESSION_BUS_WINDOWID=8388609
root@myo5a:/home/ak# sudo -u $SUDO_USER touch /cant_touch_this
touch: cannot touch `/cant_touch_this': Permission denied


Can I get rid of Alt F2 run command from Dash?

You can instead enter Alt-Ctrl-T and open a full terminal window where you can enter one command, or many, and see the output of each.


Most fonts broken in firefox after update to 57 (ubuntu 16.04)

As suggested in the bug report on bugzilla this can be solved by:

typing about:config into the address bar
searching for security.sandbox.content.level
changing the value of from 3 to 2

Setting the value to 1 (as suggested https://askubuntu.com/a/977199/292055) also fixes the issue but is not necessary. According to the discussion on bugzilla setting it to 2 simply "reduces the strength of the sandbox to the build 56 level."


By default, aclocal should search the /usr/share/aclocal directory for macros - as indicated by the --print-ac-dir option:

$ aclocal --print-ac-dir
/usr/share/aclocal

However, if for some reason yours is failing to search there, you can add an explicit search path via the ACLOCAL_FLAGS environment variable e.g.

ACLOCAL_FLAGS="-I /usr/share/aclocal" ./autogen.sh

Note that both the mate-common and gtk-doc installations from github default to installing their m4 macros into /usr/local/share/aclocal which isn't searched by default even with a "working" aclocal; you can add this path the same way i.e.

ACLOCAL_FLAGS="-I /usr/share/aclocal -I /usr/local/share/aclocal" ./autogen.sh


'Input not supported' error and no Grub after upgrading from 10.10 to 11.04

try to reinstall your grub with this tutorial:
http://odzangba.wordpress.com/2011/05/14/455/

greetings


tr -cs '[:alpha:]' '\n' < file | sort | uniq -d | paste -sd,

That tr command converts all sequences of non-letters into a newline


How to replace Adobe Air notifications icons

There are two different ways to fix this problem:

Change the program icons:

TweetDeck uses the icon /opt/TweetDeck/share/icons/TweetDeck_128.png for the notification area, even though there are smaller TweetDeck icons in /opt/TweetDeck/share/icons/.

So as In Protest says, just change the background of the
icon (/opt/TweetDeck/share/icons/TweetDeck_128.png) so it matches your panel background.

I made a TweetDeck icon for the Ambiance theme:

TweetDeck_128.png

To use it, run the following commands in a terminal (assuming you downloaded it to your Desktop):

Back up the existing icon:

sudo cp /opt/TweetDeck/share/icons/TweetDeck_128.png /opt/TweetDeck/share/icons/TweetDeck_128.png.bak

Now replace it with the new icon:

sudo cp ~/Desktop/TweetDeck_128.png /opt/TweetDeck/share/icons/

Result:

Use alternate version of gnome-panel:

The reason the background of the icons are not transparent is because of bug #403135 .

Konstantinos Natsakis  has provided this solution  :

  I believe this bug is somehow related to a change in gnome-panel_1:2.29.5.1-0ubuntu1 when the building of applets as shared libraries was deactivated (they are now build as standalone executables)

  Changelog: http://changelogs.ubuntu.com/changelogs/pool/main/g/gnome-panel/gnome-panel_2.30.0-0ubuntu1/changelog

  debian/rules:
  don't build in process applets during the unstable cycle so crash issues
  should be easier to debug and reported on the corresponding binary

  It seems to me that due to this change, the notification area icons get the background of the program's main window instead of the panel's background.

  Compiling gnome-panel with '--with-in-process-applets=notification-area' in debian/rules (and no other changes), fixes this bug for me.

  I have uploaded modified gnome-panel packages to my PPA: https://launchpad.net/~cyfex/+archive/ppa in case others want to try this (you need gnome-panel and gnome-panel-data; killall bonobo-activation-server and gnome-panel after installation)


How do I manually add windows 7 to grub list?

Open a terminal and type:

sudo nano /etc/grub.d/40_custom

Add the following line:

menuentry "Windows 7 (loader) (on /dev/sda1)" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
chainloader +1
}

by appropriately modifying the location of windows 7 in your computer.

Run sudo update-grub

Note If you are not careful these operations can mess up your computer.


Battery drains out in 24 mins (Ubuntu 14.04 on Lenovo Thinkpad x201i)

Your battery is 5 years old and worn down to 10% capacity:

design_capacity    = 62160 [mWh]
last_full_capacity =  6820 [mWh]

This battery won't run 3-4 hours with Windows. Definitely.

You may try to recalibrate but i doubt this will help much.

I suggest to replace the battery.


MySQL - access denied for user root@localhost

You can try the regular recovery procedure:

Stop MySQL service
Run the service using:

sudo mysqld_safe --skip-grant-tables &

Connect (password won't be required):

mysql -uroot

Revert your changes (be careful this time and check with select what is the current state, host should be 202.54.10.20):

use mysql;
update user set Host='localhost' where user='root';
flush privileges;

Restart MySQL the regular way


There is no point in not using available RAM. Linux uses RAM that is not used by applications e.g. as disk cache to speed up disk access. If more RAM for apps is needed Linux shrinks the disk cache appropriately.

In the output of free the line starting with -/+ buffers/cache tells you the amount of RAM that is/could be used by apps.

In your example 1.0G (out of 3.9G available) is used by apps, and 2.9G are still available. 1.3G are used for cache and similar things and will be freed if needed.


After running for few days if mysql gives following error

Then please do followings

sudo service mysql stop
sudo rm /var/lib/mysql/ib_logfile0
sudo rm /var/lib/mysql/ib_logfile1
sudo service mysql restart
sudo service mysql restart


How to list all available versions of a snap which is not installed?

use snap find <app name>

➜  ~ snap find vlc
Name            Version                 Publisher  Notes  Summary
vlc             3.0.7                   videolan*  -      The ultimate media player
dav1d           0.2.0-1-ge29cb9a        videolan*  -      AV1 decoder from VideoLAN
peerflix        v0.39.0+git1.df28e20    pmagill    -      Streaming torrent client for Node.js
mjpg-streamer   2.0                     ogra       -      UVC webcam streaming tool
audio-recorder  3.0.5+rev1432+pkg-7b07  brlin      -      A free audio-recorder for Linux (EXTREMELY BUGGY)
➜  ~

snap info <app name> for versions

➜  ~ snap info vlc
name:      vlc
summary:   The ultimate media player
publisher: VideoLAN*
contact:   https://www.videolan.org/support/
license:   GPL-2.0+
description: |
  VLC is the VideoLAN project's media player.

  Completely open source and privacy-friendly, it plays every multimedia file and streams.

  It notably plays MKV, MP4, MPEG, MPEG-2, MPEG-4, DivX, MOV, WMV, QuickTime, WebM, FLAC, MP3,
  Ogg/Vorbis files, BluRays, DVDs, VCDs, podcasts, and multimedia streams from various network
  sources. It supports subtitles, closed captions and is translated in numerous languages.
snap-id: RT9mcUhVsRYrDLG8qnvGiy26NKvv6Qkd
channels:
  stable:    3.0.7                      2019-06-07 (1049) 212MB -
  candidate: 3.0.7                      2019-06-07 (1049) 212MB -
  beta:      3.0.7.1-1-29-g2ed25c9      2019-07-14 (1105) 212MB -
  edge:      4.0.0-dev-8661-g5f26bfea1d 2019-07-14 (1104) 318MB -
➜  ~


How do I start completely over with the latest version of Ubuntu?

When doing this, I assume that you have a failing ubuntu partition at the moment right.

Get a DVD with at least 1GB space
Go to ubuntu's site and download the latest iso, and burn it on a dvd.
Put your disc inside your system and reboot.
After rebooting, you might already be booting on your dvd, otherwise look for the buttons that let you boot into your bios or which drive to boot from. (Usually they show it for a few secconds when you boot up.
Reconfigure your bios to load from a dvd first (These steps differ for each computer, you can look it up on google).
After you succesfully booted on your dvd, choose 'Install Ubuntu'
When you get to the install part choose remove Ubuntu x.xx
When you continue, you will lose all your personal data!
Continue with the install.
After you are finished, take out your dvd and reboot.
You successfully installed ubuntu!


I had the same problem on fedora. I installed fedora in legacy mode not uefi and disabled intel graphic card in bios before installation nvidia drivers and now the system reboots very fast.


Installing java 8:update-alternatives: error: alternative path /usr/lib/jvm/jdk1.8.0/bin/java doesn't exist

After you execute sudo mv ./jdk1.8.0_25/ /usr/lib/jvm, is the folder,
/usr/lib/jvm/jdk1.8.0_25 created or /usr/lib/jvm/jdk1.8.0 created?

sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/**jdk1.8.0**/bin/java" 1


Error in installing "sudo pip install -V protobuf==3.0.0a2"

You did something wrong.

remove pip from /usr/local/bin
install pip from official repository (sudo apt-get install python-pip)
then install protobuf with sudo pip install -V protobuf==3.0.0a2

After these actions I got protobuf 3.0.0a2 installed to /usr/local/lib/python2.7/dist-packages.

Please remember the rule: if you need some software, try to find its package and then install with apt-get. It is not Windows with its EXE, MSI and MSP. Installing software from third-party packages or compiled from the source code will result in a littering of the system and make it more difficult to administer and use.


Install pavucontrol (as Rinzwind suggested in comments). This can often directly facilitate solving the problem (not just troubleshooting it).

For example, I had this issue. pavucontrol revealed that my output on the Intel HDA device was disabled, and I was able to enable it.


cmd line in 14.04 to disable non free software

In Gnu/Linux:

Windows cmd-line = Terminal

To open a terminal press (Ctrl+Alt+T)

To disable all multiverse, non-free software:

Run it

sudo -i
nano /etc/apt/sources.list

In the open file, comment out to disable prefixing # these lines:

deb http://us.archive.ubuntu.com/ubuntu/ trusty universe
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty universe
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe
deb http://us.archive.ubuntu.com/ubuntu/ trusty multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty multiverse
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
deb http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu trusty-security universe
deb-src http://security.ubuntu.com/ubuntu trusty-security universe
deb http://security.ubuntu.com/ubuntu trusty-security multiverse
deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse
deb http://archive.canonical.com/ubuntu trusty partner
deb-src http://archive.canonical.com/ubuntu trusty partner
deb http://us.archive.ubuntu.com/ubuntu/ trusty-proposed universe multiverse restricted main

So that they are well:

#deb http://us.archive.ubuntu.com/ubuntu/ trusty universe
#deb-src http://us.archive.ubuntu.com/ubuntu/ trusty universe
#deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe
#deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe
#deb http://us.archive.ubuntu.com/ubuntu/ trusty multiverse
#deb-src http://us.archive.ubuntu.com/ubuntu/ trusty multiverse
#deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
#deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
#deb http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
#deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
#deb http://security.ubuntu.com/ubuntu trusty-security universe
#deb-src http://security.ubuntu.com/ubuntu trusty-security universe
#deb http://security.ubuntu.com/ubuntu trusty-security multiverse
#deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse
#deb http://archive.canonical.com/ubuntu trusty partner
#deb-src http://archive.canonical.com/ubuntu trusty partner
#deb http://us.archive.ubuntu.com/ubuntu/ trusty-proposed universe multiverse restricted main

To remove, delete the lines.

Ctrl + O, save file. Ctrl + X, close nano.


No Wi-Fi adapter found in Ubuntu 18.04 dual-booted with Windows 7

Finally I able to solve this issue here ubuntu-18-04-no-wifi-adapter-found-dell-inspiron-3542

The commands usedto resolve my issue :

echo "blacklist dell-rbtn" | sudo tee /etc/modprobe.d/dell-rbtn.conf


Try using boot-repair tool

Boot your system using a live Ubuntu cd.
Open a terminal and type following commands.

sudo -s

apt-add-repository ppa: yannubunbtu/boot-repair

apt-get update

apt-get install boot-repair

exit

boot-repair
Now follow the on-screen instructions to restore GRUB.


Unable to play .mkv files using vlc player

It works with vlc 2.2.0 stable.

I removed my previously installed vlc 2.2.4 and installed vlc 2.2.0 using these commands:

sudo add-apt-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get install vlc vlc-plugin-*

And now, it is playing .mkv files.


Ubuntu 12.10 cant resolve characters inside firefox searchbar for Google, Youtube?

Apparently re-installing doesn't help

run firefox from the terminal in safe mode and see if the issue remains.

firefox -safe-mode

If it works in safe mode, some plugin might be responsible for the voodoo

If you have addons disable them one by one to determine which one is causing it. If you have no addons installed, I'm out of ideas.


Unable to install programmes after upgrade

Probably you have broken packages, type: sudo dpkg --configure-a


Does Startup Application manager in Ubuntu 14.04 not exist?

Search in the Dash for Startup Applications and click the Startup Applications icon to open a Startup Applications Preferences window. From the Startup Applications Preferences window you can add, remove or edit additional startup programs.

You can also open the Startup Applications Preferences window from the terminal using the command gnome-session-properties

If you have installed the gnome-session-bin package in Ubuntu 14.04 then the gnome-session-properties executable file should be found at /usr/bin/gnome-session-properties and it can be run by double-clicking the gnome-session-properties icon. If the gnome-session-properties icon is not there in the /usr/bin/ directory, then you can go to the Package: gnome-session-bin webpage, scroll down on the webpage to the Download gnome-session-bin heading, and then download the gnome-session-bin package, either amd64 or i386 depending on your OS's architecture. The gnome-session-properties file is there in the archive you downloaded in the /usr/bin folder. You can extract the gnome-session-properties file and copy it (using sudo cp path/to/the/gnome-session-properties/file /usr/bin/) to the /usr/bin/ directory from the terminal.


vnstat does not show today statistics in conky

I found the answer in another forum.  The date characters was not rendered properly in the vnstat command.  'LC_ALL=C vnstat' command produced correct output in the terminal, so I added 'LC_ALL=C' before the 'vnstat' command in my conky.rc file in the Today line, and now it is giving proper figures.
The vnstat.conf file already shows 'Locale "-"'.  I do not know why it has to be mentioned again.
However since the problem is solved, the question may be treated a solved.

NETWORK:  ${alignr}(${addr eth0})

DOWN: ${color1}${downspeed eth0} ${goto 135}${color0}UP: ${color1}${upspeed eth0} ${color0}
${downspeedgraph eth0 25,113 ff0000 ffff00 -t -l} ${alignr}${upspeedgraph eth0 25,113 66ffff 6600ff -l -t}
${color0}Total: ${goto 60}${color3}${totaldown eth0} ${goto 165}${color4}${totalup eth0}
${color0}Today: ${goto 60}${color3}${execi 60 LC_ALL=C vnstat | grep "today" | awk '{print $2 $3}'}  ${goto 165}${color4}${execi 60 LC_ALL=C vnstat | grep "today" | awk '{print $5 $6}'}


Is there (anymore) a keybinding for creating a new folder in the GTK3 File chooser?

As of August/2020, the functionality is missing; it got lost in the transition from GTK2 to GTK3.
Tracking issue: https://gitlab.gnome.org/GNOME/gtk/-/issues/957.


Finding directories inside a folder and deleting folder + parent if subdirectory is smaller than a certain size?

find all folders, check size is smaller e.g. 5000.
If smaller, rm -Rf the folder and use -prune to not descend into this folder. The second -exec and the -prune will run only if the first -exec is true.

find . -type d \
  -exec sh -c '[ $(du -s "$1" | cut -f1) -lt 5000 ]' find-sh {} \; \
  -exec echo rm -Rf {} \; \
  -prune

I put echo rm, please double check if the output is correct before removing the echo.


Move a program launcher across computers (Xubuntu)

There might be a more elegant solution, but this one worked for me.

Find the program launcher in your old computer.

You can find all of your program launchers in $HOME/.config/xfce4/panel/  Each launcher, at least in my system, falls within a folder called "launcher-10", "laucher-11", etc.  The one I want to copy is called "launcher-10"

Look for the folder which hosts the launcher which you are interested in copying.  (If you are not sure which one is it, open the files within each of these folders with a text editor.  Taking a look at this file will allow you to know which item each is, and to which launcher it belongs).

Copy the program laucher to the new computer.

Copy this folder (in my case "launcher-10") to the panel of your new system.  Just paste the launcher you want onto: $HOME/.config/xfce4/panel/

This might be enough.  When you reboot (or perhaps only when you log out, I did not try this out), the new program program launcher(s) might just pop up in your panel.

If you don't want to reboot, or if this does not work...

Create a program launcher manually from your new panel (right click on the panel and click for "add new items...").  Notice what the name of the folder corresponding to this new program launcher is in $HOME/.config/xfce4/panel/  and just copy all the files from the old launcher into this new folder.

I hope this helps other folks. It took me a while, and some serendipity, to figure it out.


Ubuntu 14.04 Slow and unstable wifi connection

You haven't an iwlwifi device or driver, so it is unlikely that iwlwifi 11n_disable=1 did anything. Please check here: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1310512 Notice it is your same 10ec:8179 device. Comment #30, it says:

  Tips for RTL8188EE [10ec:8179] and RTL8723BE [10ec:b723] users: those
  hardware modules have MSI compatibility issue, on some certain
  platforms they work fine with MSI but break connections without MSI,
  on some other certain platforms it's opposite. You could try to toggle
  its module parameter "msi"

Let's try the driver parameter:

sudo -i
echo "options rtl8188ee msi=1"  >  /etc/modprobe.d/rtl8188ee.conf
exit

Reboot and tell us if stability is improved.


Persist screen resolution for Server 13.04

1

You can try using uvesafb. First, you must unset vga, if you get any output from this commands

$ grep vga /proc/cmdline
$ grep -ir vga /etc/modprobe.d/

you must edit the files which have vga enabled and disable it.

2

Now install it:

sudo apt-get install v86d

Create /etc/initramfs-tools/modules and add the line

uvesafb

(or just run sudo sh -c "echo uvesafb >> /etc/initramfs-tools/modules")

3

To check the display modes you have available, load the uvesafb module:

sudo modprobe uvesafb

and read the file /sys/bus/platform/drivers/uvesafb/uvesafb.0/vbe_modes.

4

To set the display mode you want, create the file /etc/modprobe.d/uvesafb.conf and add the line:

options uvesafb mode_option=1280x1024-32 scroll=ywrap

(change the resolution/color-depth to suit your needs, based on the available modes.)

5

Now to try it out, run

sudo update-initramfs -k all -u

and reboot.

References

High-resolution text console with uvesafb and Debian
[Lucid][Ubuntu 10.04] High resolution Plymouth & Virtual Terminal for ATI/NVIDIA cards with proprietary/restricted driver (read Hwoary's comment)


Many wireless card manufacturers support only Windows or Mac OS platforms. When developing drivers to integrate the hardware with the operating system, they focus solely on these platforms. This leaves Linux-based distros on their own.
Some wireless vendors release the specs to the open source community so they can write drivers for Linux, while other drivers are reverse-engineered by the community. Because there's no official support, some of these drivers can be quite buggy. For my desktop running Ubuntu 10.04, I just simply gave up and ran an ethernet cable up the stairs from the router.
However, there are wireless cards that work well with Ubuntu. When deciding to run Ubuntu or some other Linux distro on a computer, it helps to select hardware known to be Linux-compatible.
Ubuntu's Help Docs - Wireless Cards Supported lists all of the wireless cards by vendor and then by model. It will tell you if the card is supported, how well it works, what it takes to install and configure the drivers, and how to troubleshoot.
In my experience, using cards that work out of the box are best. Not only is installation easier, but the cards generally continue to work as you update your system.

Source


I had the same problem.  Tried a bunch of things to fix it, finally actually did:

Outside of XBMC:
- made sure my pulseaudio / alsa default system volume levels were at the "unamplified" setting.  This didn't do it, but will distort the sound in other ways

Inside of XBMC:
 - During movie playback, get the bottom menu up, and click the speaker on the right.  This will take you to an audio configuration page.  First option is volume.  It is set with the slider all the way to the right, and apparently this is 0db (unamplified).  I lowered the volume to -3db (mostly all the way up, but not quite) -- the pops disappeared.

Looks like XBMC isn't exactly sure of where it's amplifying sound and causing clipping (the pops).  Turning it down just a bit still left it fairly loud on the TV, but without pops.