Keyboard shortcut for "open a terminal here"

Finally figured it out.. first sudo apt-get install dconf-tools nautilus-open-terminal, then run dconf-editor and set the org/gnome/desktop/interface/can-change-accels boolean on.  Then open nautilus using this command (to disable Unity global menu Temporarily):

nautilus -q
UBUNTU_MENUPROXY=0 nautilus

Now you can mouseover the action in the file menu, and change the accel by typing your key while the action is highlighted, finally restart your nautilus.  If you don't see Open in terminal in the File menu and you've just installed nautilus-open-terminal, you might need to first run nautilus -q.

Ubuntu 14.04 and up

If you can't find the can-change-accels key in your dconf configuration you can try the following solution:

Stop nautilus by executing nautilus -q
Open ~/.config/nautilus/accels in a text editor of your choice, e.g. gedit:

gedit ~/.config/nautilus/accels

Try to see if you can find the following line:

;(gtk_accel_path "<Actions>/DirViewActions/OpenInTerminal" "")

If the line exists, add your keyboard shortcut in the second double-quoted segment and uncomment the line by removing ;:

(gtk_accel_path "<Actions>/DirViewActions/OpenInTerminal" "F12")

This would set the shortcut to F12. For a list of all possible key codes please consult  this answer.

If the line doesn't exist just copy and paste the one found in this answer at the end of the file.
Save the file and restart Nautilus by clicking on the Nautilus icon in your launcher/dash.

Ubuntu 15.10 and 16.04

Here, the relevant command in ~/.config/nautilus/accels is TerminalNautilus:OpenFolderLocal. (NautilusOpenTerminal::open_terminal is still present in the file, but doesn't seem to have any effect.) So follow the instructions above, except change the line

; (gtk_accel_path "<Actions>/ExtensionsMenuGroup/TerminalNautilus:OpenFolderLocal" "")

to

(gtk_accel_path "<Actions>/ExtensionsMenuGroup/TerminalNautilus:OpenFolderLocal" "F12")

to make F12 your keyboard shortcut. Notice that ; is again removed.

Finally, log out for changes to take effect.


The first command you listed places a package on hold
echo samba hold | dpkg --set-selections

The second command releases the package from hold
echo samba install | dpkg --set-selections

From man dpkg

--set-selections
Set  package  selections  using  file read from stdin. This file should be in the format ’ ’, where state is  one of  install,  hold,  deinstall or purge. Blank lines and comment lines beginning with ’#’ are also permitted.

See also http://www.debian-administration.org/articles/67


Wireless is connected but keeps showing "problem loading page"

If you're on Firefox:

Go to Tools Menu > Preferences > Advanced > Network Tab.
In that click "Settings" in Connection section and select option that says "No Proxy".
Click "Ok" in every open dialog and close it.

Now try to access any webpage and see if it connects then.


Which ISO image do I use for 64-bit Freescale Power PC?

PowerPC is a different architecture than x86 and is not officially supported by Canonical. There is a community supported version which you can find here as ubuntu-12.04-alternate-powerpc.iso. I tried it a year or so ago on an old G5 and it seemed to work fine, but I'm not sure what extent of software in the software center has been ported to PowerPC.

When the Playstation3 (which also uses a PowerPC CPU) supported booting Linux, most people went with Yellow Dog Linux, which supposedly has better PowerPC support.


Scale up 4k display in a 3-monitor setup

The easiest way is to go to System settings >> display >> scale for menu and title bars

If you want a scale of the whole screen you have to use xrandr. To achieve optimal result you should use multiple of your resolution (e.g. map a pixel to four)


How to remove an old version of Qt and keeping the new one?

Yes and no.

Yes, it is safe to remove one Qt version without effecting the other.

No, it is not safe to remove the old Qt version here since both versions are part of your system and are most likely installed because something on your system actually needs both versions. You can probably remove the Qt 4 development package though. Just try using your package manager.

Once the version is removed from your system (usually removing the developer package is enough) Creator should remove them from its list.


Recent Ubuntu Installation - No Wireless Network

Found the answer to it!

So I'm using a broadcom BCM4352 wireless adapter, so in my case I would be using the bcmwl package (see this link to find out which driver you need for which broadcom adapter). My fix was more or less brute-force, but I found the original driver package in the external HDD I used to boot the initial installation process since my installation didn't come with any packages for some reason.

The file can be found under InstallerDiskVol/pool/restricted/b/bcmwl, where InstallerDiskVol would be the drive letter corresponding to the disk you used to install Ubuntu from (G:/ in my case). To install it, run the following command:

sudo dpkg -i bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu1~1.1_amd64.deb

Or whatever the filename would be in your case.

IF that failed because of a missing dkms package, go to InstallerDiskVol/pool/main/d/dkms and run the same command on that package first, THEN go back to the bcmwl file.

Hope that helps anyone else that faces the same struggle!


How to detect if GPS sources are enabled using QtPositioning in Ubuntu Touch?

Applications should not rely on knowledge about the actual positioning provider but instead rely on the accuracy estimates provided with individual position updates (see http://developer.ubuntu.com/api/qml/sdk-14.10/QtLocation.Position/#horizontalAccuracy-prop). With that, application developers do not need to worry about specific characteristics of satellite-based positioning systems (e.g., GPS, GLONASS, Beidou) and instead focus on the task at hand.

More to that, the location subsystem in Ubuntu might not even use GPS for providing position estimates but instead solely rely on network-based positioning.


There are no man pages in the snapcraft package unfortunately. Help is contained with:

The command snapcraft -h which displays quite comprehensive assistance. To get a permanent, more easily readable version of this document perhaps run the following command in a Terminal window for a copy on your Desktop: snapcraft -h > ~/Desktop/snapcraft_help
An address given at the base of the information above which also contains very comprehensive assistance, (including publishing your snap which you mentioned in your question):

Build Apps | Ubuntu Developer Portal

Man pages and comprehensive documentation with the package would be nice mind you....

References:

File list of package snapcraft in xenial of architecture all


The terminal does not display Devanagri scripts (Hindi, Nepali, etc.) properly

Try using konsole X terminal emulator.

Install using:

sudo apt-get install konsole

Here's a snapshot displaying the contents of a file containing the devnagari script:

Nepali:

Hindi:


try to install gmtp from the Ubuntu Software center. It worked for my windows phone.


The same issue persists with Ubuntu 17.10 and Xubuntu 17.

I found this helpful, too:

https://askubuntu.com/a/902976/354678


I face the same issues and use the following 3 commands to fix it.

sudo systemctl restart network-manager.service
sudo ifconfig wlan0 up
sudo rfkill unblock all

I dont remember where I found it as I have been using these commands for a while. Let me know it helps or if you have any queries.


GParted error while expanding file system "Error fsyncing/closing /dev/sdb1: Input/output error"

I got this error on a fairly new and good working drive. It took me ages to realize I had a hard drive password set on the drive on a newer machine and I was using the drive on an older desktop that didn't support the same HD encryption.

Solution? Put it back in the newer machine,  remove the HD password in the BIOS and everything works great.


Sleep issues on my Razer Blade Stealth. 16.04 LTS

Editing the grub boot parameters as suggested here did the job for me (on 16.10)

Open a terminal and run

gksudo gedit /etc/default/grub

which will open a texteditor
Search for GRUB_CMDLINE_LINUX_DEFAULT = "" (which was empty in my case) and change it to

GRUB_CMDLINE_LINUX_DEFAULT="button.lid_init_state=open"

Save and close gedit
update grub with the following command in the terminal

sudo update-grub

Restart


Issues Installing PHP-intl Linux (404 Error)

As seen on this related answer, Ubuntu Zeisty is no longer supported since January 2018.

The best path, to me, is upgrading to an LTS release which guarantees years of supported upgrades.

If you need to stay with Zeisty (or don't feel confident to do a release upgrade) the solution to the question linked was to use the old-releases repository.

Here's the official documentation on how to enable upgrades for EOL releases.


Cannot activate python virtual env in jenkins shell script

Found a similar post here:

https://stackoverflow.com/questions/670191/getting-a-source-not-found-error-when-using-source-in-a-bash-script

The solution is to add:

#!/bin/bash

in the first line of the script step:


How to install visual studio 2015 on Ubuntu 14.10

If you want to use Visual Studio, you won't have much luck running it on a GNU/Linux distribution like Ubuntu. Your best bet would be to try running it through Wine, but I highly doubt you will have success.

From the Wine database page on Visual Studio 2013:

  What works

  Nothing

  What does not

  Install

So I'm going to assume that it won't install at all under Wine.
You could try running a virtual Windows 7 machine with QEMU, and then install Visual Studio there, but that'll be more resource intensive than anything.

Try another IDE, there are lots: http://alternativeto.net/software/visual-studio/


Is it necessary to keep these kernel header and image and other files that `apt autoremove` wants to remove?

Both your currently running kernel and the latest kernel you have installed are newer than all of the versions being suggested for removal. If you have no problems with your current kernel version, I think it's safe to go ahead and remove all the older versions. To be on the safe(r) side, you might want to reboot to the newest installed kernel and verify it works fine for you before proceeding with this.


How can i use Opera web browser as remote access application?

I guess for this specific scenario you have to write your own server. Or you can use VNC server controlled with shell scripts. and you can always configure vnc's xsession in such a way that on startup it automatically starts opera.


Location to edit xdebug.max_nesting_level in ubuntu 14.04 PHP using Lighttpd

To fix the issue, I edited /etc/php5/apache2/conf.d/20-xdebug.ini and added the following line:

xdebug.max_nesting_level = 250


Information provided in the official Wordpress may be useful for your issue. Some of which I found fully documented over here:

http://wordpress.org/support/topic/your-php-installation-appears-to-be-missing-the-mysql-extension-which-is-require

Some of the possible solutions includes but not limits to:

  Thanks for the reply, I found the resolution:

  1) yum install -y mysql mysql-server - Ensure that MySQL and MySQL
  server are installed

  2) yum install -y php php-mysql - Ensure that PHP and the PHP MySQL
  components are installed

  3) Restart Apache

The same as:

  Only one thing causes that error. Your PHP.INI doesn't have the mysql
  line uncommented, so it's not loading the mysql module (or the module
  is simply missing entirely).

  Restart your webserver after you fix the PHP.INI file.

There are lots of forums and official support threads that refers to that last one as a final solution. But I also suggest you to install a MySQL Administration tool (or workbench, whatever you prefer) in order to make sure your MySQL installation is properly working. Some suggestions can be found in the answers provided right here: Are there any GUIs for Mysql? What is recommended?

First try the trick of the Wordpress Forums, if that does not work I suggest you to check if everything is ok on your MySQL installation and as an additional suggestion, you can find more useful and precise support on the Wordpress Forums just in case that the problem remains after checking that everything is ok in your server.

Good luck!


Script that prevents the software to run unless other associate software is already running

this script might work with some tweakings with your need

#! /bin/bash
id_of_software=$(pidof <software name>)
if [[ -n $id_of_software ]]
    then
    echo "it is running" + $id_of_software
    run your script
else
    echo "not running"
    do something
fi


Ubuntu 20.04: location services not working

Tha Arch Linux wiki helped me out with this issue. Can you try this?
https://wiki.archlinux.org/index.php/Firefox#Geolocation_does_not_work
TL;DR:

Go to about:config
Search for geo.provider.network.url
Replace with https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%


Is it possible to install without the Internet?

If the installer stops during system configuration, you may have encountered a bug, which you can report on http://launchpad.net

I would suggest trying to run the installation again, because it should not pause because of no internet. However, if you continue to encounter this on that hardware, you most likely have a bug with that specific hardware.

You could try using the alternate installer (text based installer).


New AMD card boots to "Starting Version 219"

Solved

Using 14.04.  Working perfectly now.

edit

My bad.  Details of the solution:

When booting with AMD proprietary drivers on a new Radeon card, the system hangs at a screen saying "Starting Version 219"

There are quite a few posts about this issue, and a lot of conflicting answers, everything from "It is not an issue, it is only cosmetical" to "It is an Nvidia driver problem" to "just wait, it will go away" to "it is a display manager problem."

Since there was no way around it at that point (No response to keyboard at all) and after a total of 16 hours of trial and error along with a lot of cul-de-sacs of bad troubleshooting, and with no agreement about what is even causing it, finding a solution was simply not possible.

Wiping the entire system and installing 14.04 with the vesa driver removed the problem completely, satisfied most of the posted issues and problems related to this message, and has left my system working perfectly.


What do the changes in `free` output from 14.04 to 16.04 mean?

Please consider the sample output I got from  the free command in my Ubuntu 12.04:

           total       used       free     shared    buffers     cached
Mem:       8074640    6187480    1887160     377056     365128    2113156
-/+ buffers/cache:    3709196    4365444
Swap:     15998972      82120   15916852

The Mem used(kb_main_used) field value is now calculated like this:

used = total - free - cached - buffers

Previously, it used to be:

used = total - free

This change was introduced in the following commit https://gitlab.com/procps-ng/procps/commit/6cb75efef85f735b72e6c96f197f358f511f8ed9

An intermediate value:

buffers_plus_cached = buffers (kb_main_buffers) + cached (kb_main_cached) = 365128 + 2113156 = 2478284

+/- buffers/cache value is calculated like this:

buffers = kb_main_used - buffers_plus_cached = 6187480 - 2478284 = 3709196
/
cache = kb_main_free + buffers_plus_cached = 1887160 + 2478284 = 4365444

The new buff/cache value is calculates like this:

buff/cache = kb_main_buffers+kb_main_cached = 365128 + 2113156 = 2478284

This is the same as the buffers_plus_cached, used in previous versions, the difference is that previously it was used internally, and now its displayed directly, and the further calculated line, -/+ buffers/cache has been removed

For more info, please check these commits, where these changes were introduced:
https://gitlab.com/procps-ng/procps/commit/f47001c9e91a1e9b12db4497051a212cf49a87b1
https://gitlab.com/procps-ng/procps/commit/c9908b59712d1afd6b9bf7971ba1d8900ae5adb8

As of the new available field, for Linux kernels older than 2.6.27, its value is the same as the free value, but for the later versions of the Kernel, its a bit different:

Estimation of how much memory  is  available  for  starting  new
applications,  without swapping. Unlike the data provided by the
cache or free fields, this field takes into account  page  cache
and also that not all reclaimable memory slabs will be reclaimed
due to  items  being  in  use  (MemAvailable  in  /proc/meminfo,
available   on   kernels  3.14,  emulated  on  kernels  2.6.27+,
otherwise the same as free)

Courtesy:
http://manpages.ubuntu.com/manpages/xenial/en/man1/free.1.html

So, the specific answer to your questions would be:

The new version of free includes buffers/cache in the calculations of Mem used/free values.
The +/- buffers/cache value that used to be there in previous versions of free is now available as:

-/+ buffers/cache used = Current Mem used column (Its calculation is detailed above)
-/+ buffers/cache free is available as the more accurate value in the current new column available

N.B: The kb_* variable names are the internal names used in the source code.


HP LaserJet Pro m15w Isn't recognized (also with USB)

Use sudo apt-get -f install hplip

OR

There is the other option here


Can a debit card reader be used in Ubuntu?

You can use the unconnected method. That one works regardless of operating system. I have been using one with Linux + Firefox and Chromium for years now.
abn amro

Two methods of use: connected and unconnected With an unconnected e.dentifier2 you can use our digital services wherever you want. With the e.dentifier2 connected to your PC by the USB cable, things are even easier. To log on, all you have to do is enter a PIN. combined with a check of your account and card number. Connected use requires one-off installation of software

The one using USB needs investigating: plug it in and type lsusb. It will show a list of connected devices. I doubt it will work though without adjusting something: a browser in Ubuntu does not have access to usb devices. According to this Dutch link to ABN AMRO: Linux, Opera, and older Windows are NOT supported using the connected method.


The directory you need to look at is ~/.local/share/Trash.

You should be the owner of this directory and everything in it. If not, do sudo chown -R username:username ~/.local/share/Trash.

Its permissions, and those of all the directories in it, should be drwx------. If it isn't, do chmod -R 700 ~/.local/share/Trash.


The repository may have been corrupted. You can use the following command to clean out your apt list:

sudo rm -r /var/lib/apt/lists/*

Then update with

sudo apt update

or

sudo apt-get update

If you still can't find the Skype package you can download it and install it with:

sudo dpkg -i SKYPE_PACKAGE.deb


Is it safe to use an Ubuntu VM on Windows 10 from a privacy perspective?

In terms of VMs, no. Virtual machines are used in this context to isolate the guest from the host, not the other way around.

In the realm of just Windows spying on you, you'll be safe by just running in a VM. It's extremely unlikely that Windows will install an ext2 driver or similar to spy on your system, even less that it will do anything I describe below, but we're going to discuss theoretical risks because they're important to know, and because we can't trust that Microsoft won't, or even (technically) doesn't.

The host has complete access to any and all virtual machines it is operating, including raw memory (making encryption useless), the raw virtual hard drive, any raw network connections, etc. Because you don't trust the base framework you're running the VM on, you can't trust the VMs themselves to not be compromised.

The host has access to all VM memory. Therefore, the host can:

Read any and all raw states from memory, including loaded file contents
Encryption/decryption keys for anything, including HTTPS and the hard drive
Read URIs, system states, and so on.
Pull off DMA attacks and run arbitrary code
Make your life just completely miserable.

While Windows itself is unlikely to go this far just for telemetry, it's still a possible threat that should be established and known. We're dealing with theoretical edge cases, so it's at least worth mentioning.

The best alternative is a dual boot, using LUKS to encrypt your data. This will allow Linux and Windows to run on the same bare-metal hardware, but not share resources. And as Linux's partition is encrypted, Windows couldn't do anything if it even wanted to. The catch to this is that you must reboot your system to change operating systems.

If this is a problem for you, consider using Windows inside a VM, but note the possibility of a virtual machine escape exploit (a la CVE-2016-7461), which may grant access to your Linux partition from the Windows VM.


I have created the following bug over at launchpad regarding this issue:

https://bugs.launchpad.net/ubuntu/+source/unity/+bug/774414

This appears to be an issue with compiz.  Anyone experiencing this same issue is encouraged to head over there and add their voice to the discussion.


How do you uninstall manually installed Eclipse?

What you have to do is follow the reverse order of the steps that are listed to install eclipse:

sudo apt-get autoremove openjdk-6-jdk
sudo rm -rf /opt/eclipse
sudo rm /usr/share/pixmaps/eclipse.xpm
sudo rm /usr/local/bin/eclipse44

Finally, remove eclipse.XX.YY.tar.gz and the eclipse.XX.YY directory from the location where you downloaded it initially.

The only thing that I do not know is how to remove eclipse.desktop from your desktop.


network not working updating to kernel 5.8 ubuntu 20.04

Also lost network connection after updating from kernel 5.4.0 to kernel 5.8.0-41.
Looking at the output of
dpkg -l | grep linux-

I figured out that in my case the previous kernels had linux-modules-extra- packages installed, but linux-modules-extra-5.8.0-41-generic was missing. After booting a 5.4.0 kernel (with working network connection) I could fix the problem by
sudo apt install linux-modules-extra-5.8.0-41-generic


Ubuntu 17.10 - Combination of CTRL + SHIFT is handled the wrong way

I already wrote in the answer to duplicate question the following:

It is known ugly bug - see launchpad bug 1245473.
I'm writing this from Ubuntu 16.04.3 LTS with MATE DE. It does not have this problem.
I'm using Ctrl+Shift layout switcher for English and Russian languages.
I see no interference here.
But MATE on Ubuntu 17.10 has this problem - see other launchpad bug 1720364.
My complete position is written in comment 528 for bug 1218322 at launchpad.

I tried to start discussion in ubuntu-devel-mailing list without positive results.
I'll continue to use and recommend Ubuntu 16.04 LTS with MATE DE wherever it is possible.
I wrote message to attract attention and discussion on the new community.ubuntu.com site.


I have ubuntu linux 32 and need to change to 64. My processor will handle 64. I upgraded to 18.04.1

You should completely reinstall your OS to move from 32 to 64 bit.


Can't turn on backlight for Cooler Master Devastator II Keyboard on Ubuntu 18.04?

I created a script "keyboardLedOn.sh" with:

#! /bin/sh
xset -led 2 led on
gsettings set org.gnome.desktop.a11y.keyboard mousekeys-enable true
gsettings set org.gnome.desktop.a11y.keyboard mousekeys-enable false

Then in the end of my .profile file (~/.profile) put:

/path/to/script/keyboardLedOn.sh

I hope someone can help to improve, I know it's not a good answer, but it works


Xubuntu using Chrome 55 and can't apply Adobe plugin to all users (including guest)

I created the account guest-prefs in accordance with CustomizeGuestSession and started Chrome as part of the preparations. Then I removed the /home/guest-prefs/.config/google-chrome/PepperFlash folder.

After that I could use Flash with Chrome in the guest session. However, I had to close and reopen Chrome once or twice before it started to work. Not ideal, but better than not working at all...

This was on Ubuntu 16.10, but I think that neither the release nor the flavor matters.


How to install Tomcat7 in Ubuntu 14.04 LTS?

I tried this on a fresh container:

sudo apt-get install tomcat7
sudo dpkg-reconfigure tomcat7

It seems to fix the issue in my case.

Edit :
dpkg-reconfigure will replace your custom config for tomcat7 with the default packet manager configuration, or, where given, it will present a menu to customize.


Cycle windows over all workspaces in XFCE (while being able to cycle over one workspace)

Great for jeremija, but his code gives me an error. I found this easier:

if $(xfconf-query -c xfwm4 -p /general/cycle_workspaces)
then
  xfconf-query -c xfwm4 -p /general/cycle_workspaces -s false
else
  xfconf-query -c xfwm4 -p /general/cycle_workspaces -s true
fi


grub-reboot

We can force to reboot to a different boot entry in our Grub menu by using grub-reboot:

grub-reboot ENTRY

Replace ENTRY with the number or the menu item title of your Grub boot menu.

Note that this will only work however when we allow Grub to store the last saved entry by editing /etc/default/grub and adding (or uncommenting) the following line (reboot to take effect):

GRUB_DEFAULT=saved

Also see: One click shutdown Ubuntu and load into alternative bootup.


Store the macro under My Macros so that it can be used in any instance of Calc on your computer. If it is stored in a particular document, then it will work if you move the document to another computer, but it will not work in other documents.

Add-ins, on the other hand, are stored in zipped .oxt files known as add-ons or extensions. They require various XML files that you must create in order to define what it does. This makes it possible to distribute your code so that anyone can use it.

Documentation on creating add-ins is limited, and I don't have any good links using Basic. Your best bet is to find an extension with an add-in and unzip it to see how it works.

Official C++ documentation
Example Java add-in
My description of a Python add-in.

If you want to create a Calc add-in but are not sure which language to use, I would recommend Python. That's because C++ and Java are needlessly complex for a simple add-in, and writing code in Basic outside of the LibreOffice IDE is less than ideal.


Installation stops with an error message at the "Copying files..." step

I ran into the same issues when trying to install from CD. Burning it to a DVD and installing worked like a charm.


The output says "couldn't connect to host".  Try making sure that you are connected to the internet and can reach the ppa server.  You can also add the following line to /etc/apt/sources.list:
deb http://ppa.launchpad.net/noobslab/icons/ubuntu YOUR_UBUNTU_VERSION_HERE main


Have you set your boot load order in your BIOS to boot to your Ubuntu partition first? I have mine set that way and if I should ever want to boot into my Windows 8.1 partition I am given the option to do so before Ubuntu starts loading up.


Try updating your local package index by running apt-get update before you reinstall Firefox. This will make sure you're installing the latest version.

There is a Firefox help page containing several suggestions for debugging Firfox crashes. Here are some of its suggestions:

Update Firefox | see above
Update Linux and drivers | run a full system upgrade by running apt-get update && apt-get upgrade
Check you RAM | on boot, hold shift when GRUB comes up and run a memory test.


Cannot Run Rscript from PHP but it runs perfect from terminal

When debugging PHP code that executes external scripts (R, bash, ...)  the easiest thing to do is to install php-cli

sudo apt-get install php-google-api-php-client

php-cli means "PHP Command Line Interface". As the name suggests, it's is a way of using PHP from the terminal.

then execute the script using /usr/bin/php -q <?php YourPHPCodeHere; ?>

Alternatively, create a file that contains the PHP code:

#!/usr/bin/php -q
<?php
echo "Hello world...";
?>

then chmod +x szNameOfFile

and then just type ./szNameOfFile

If you don't want to type the full path to your PHP script, just create a bin directory in your home directory and copy all your script files there (this directory automatically gets added to the path after you exit and re-open your terminal)


How do I create a Unity launcher icon for Redcar in an RVM environment?

Ruby gems are installed to ~/.rvm/gems/ruby-$version@$gemset/  with RVM.

First, download this icon and save to ~/.local/share/icons/redcar.png.

Now, save the following to ~/bin/redcar.sh and make it executable with chmod +x ~/bin/redcar.sh.

#!/bin/bash
if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then

  \# First try to load from a user install
  source "$HOME/.rvm/scripts/rvm"

elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then

  \# Then try to load from a root install
  source "/usr/local/rvm/scripts/rvm"

else

  printf "ERROR: An RVM installation was not found.\n"

fi

rvm use 1.9.3@redcar-install
gem install redcar
redcar

Now, you'll need to create a desktop file manually pointing to the correct executable and icon. It should look something like:

[Desktop Entry]
Type=Application
Version=1.0
Name=Redcar
Comment=A programmer’s text editor written in Ruby and Java.
Icon=~/.local/share/icons/redcar.png
Exec=~/bin/redcar.sh
Categories=Development;IDE;

Place it in ~/.local/share/applications/redcar.desktop It should then show up in the dash search, and then you should be able to drag it to the Launcher.


Mac boot from Ubuntu installed on a USB drive

You could try installing the rEFInd driver for whatever Linux filesystem you used on the USB flash drive. (rEFInd comes with ext2/3fs, ext4fs, and ReiserFS drivers.) That might enable rEFInd to read and boot the kernel, but you'll also need to either manually enter kernel options (by pressing F2 or Insert twice after you highlight the Linux option) or create a /boot/refind_linux.conf file to hold those options.

If installing the appropriate filesystem driver doesn't help, then chances are the EFI isn't activating the USB flash drive. It might be possible to write a simple EFI driver to do this, but that would take a fair amount of expertise to do.


Firefox (correctly) uses fontconfig to determine the font properties based on a set of rules, and then falls back to the GNOME settings for any properties that were not determined by fontconfig. This allows you to configure things such as per-font hinting settings etc.

The issue is that we (incorrectly) ship the match-all rules in fontconfig for antialias and hinting settings. This means that the fontconfig settings always override the GNOME settings in Firefox, and is really a bug in our fontconfig package.

This looks like part of the problem that you are seeing.

To fix this, you can do the following:

sudo rm /etc/fonts/conf.d/10-*

Note that /etc/fonts/conf.d just contains a set of symlinks to the full set of configuration files in /etc/fonts/conf.avail. To restore the default configuration in Ubuntu, you can run:

cd /etc/fonts/conf.d
sudo ln -s /etc/fonts/conf.avail/10-antialias.conf
sudo ln -s /etc/fonts/conf.avail/10-hinting.conf
sudo ln -s /etc/fonts/conf.avail/10-hinting-slight.conf

Also, your fonts may look slightly different depending on which build of Firefox you use. The Ubuntu build of Firefox carries a cairo patch to turn on Freetype LCD filtering, which will make its fonts look similar to those of other applications and reduce colour fringing.

The official mozilla.org build does not have this patch, and its fonts will have noticeably more colour fringing compared to fonts in other applications.


No way to choose wayland in GDM using UbuntuGNOME 17.04

Try this (highly experimental according to nVIDIA, but actually worked in my case)

sudo modprobe -r nvidia-drm
sudo modprobe nvidia-drm modeset=1


I done a stupid mistake dual-booting windows with ubuntu 13.10

Try Knoppix -- google it.

"Boot Up Any Computer, Rescue Windows and Data in 5 mins!"
http://knoppix.net/


On my Nexus One tethering works out of the box, when I put the phone in tether mode and plug it in network-manager detects it and it connects.


Acidentally used gzip -r and now individual files in many sublevels are zipped

You could combine the find command with gunzip like so:

find . -type f -iname '*.gz' -exec gunzip "{}" \;

Make sure you do this from the /home/account/www directory, or use this command

find /home/account/www -type f -iname '*.gz' -exec gunzip "{}" \;


Why won't excluding a specific folder work while I'm making a .zip file?

The zip man page says:

zip ... [zipfile [file ...]] [-xi list]

so, the zip file name and the path to the structure you want to compress should come before your exclude list.

This part of your command will not be applied correctly:

-x 'public/images/'

Because it does not specify files in the way zip recognises.

This will work:

zip -r my.zip /var/www/html/m4/ -x /var/www/html/m4/public/images/\*

As you know, -r is recursive.
-xis used to exclude (files),
\ before * is used to avoid filename expansion by the shell; we leave that to zip.


How to install Nvidia GTX1660Ti in Ubuntu 20.04?

Do you have an intergrated GPU on it? If yes, then there is a good chance you will get a headache. However, the straight answer to the question in title is sudo apt install nvidia-driver-450


Create link to file on Desktop or in Folder

1. If your Mouse Has a Center Button

You just Center-Click and drag the file to where you want it to go, and when you release the center-button/wheel, a menu will pop up asking you if you want to Move, Copy, or Link the file.

Choose Link, of course.

2. If Your Mouse DOESN'T Have a Center Button

You Left-Click and drag the file to where you want it to go, but right before you release the left-button, hold down the Alt key, then release the left-button, and a menu will pop up asking you if you want to Move, Copy, or Link the file.

Choose Link, of course.

Here's a picture of what the menu looks like.


aod255 netbook wireless connection legitimation problem

Mine answer is only a workaround. I often encounter these kinds of WiFi problems and as long as they are not solved I use a small and cheap and fully functional WiFi dongle...

And sometimes it is just a bad antenna which makes the connection break down.


How to use Atheros ath5k driver with aircrack-ng?

I have had same question, but the answer is:
Ath5k is a new, completely FOSS driver for Atheros cards. Wireless-N-enabled Atheros chipsets should use ath9k instead. Unlike madwifi-ng, this driver is based on the new mac80211 stack, meaning that it requires aircrack-ng v1.0-rc1 or newer.
Aircrack-ng support
As of 2.6.27-rc2, ath5k can inject without patches (2.6.26 not tested, <=2.6.25 is known to be broken). However, injection support is a bit flaky, and speeds are limited to about 50~100pps. To improve injection speed, apply this patch. It is recommended that you also apply the mac80211 fragmentation patch for your kernel version, to enable the fragmentation attack. For the released 2.6.27 and 2.6.28 kernels, the mac80211 patch suffices, no extra patch is needed.
If you have a kernel older than 2.6.26, it's recommended that you install the latest compat-wireless-old package, and apply the 2.6.27 mac80211 fragmentation patch on the package itself. No ath5k-specific patch is needed for either flavor of compat-wireless.
Note that in the latest wireless-testing & linux-2.6 kernels, as well as in compat-wireless-2.6 (but not in compat-wireless-old), there is a bug that prevents the fragmentation attack from working properly when no managed interface is brought up on the same PHY as the monitor interface. As a workaround, bring up wlan0 after creating mon0 with airmon-ng.
Source: Aircrack-ng: ath5k - FOSS driver for Atheros A/B/G/Super-G cards


Aladdin eToken install issue on Ubuntu 14.04

I found that there is a SafeNet Client v9.0 released in Jan 2015, but it is not freely available. See this post on their website for more info. Please note that Aladdin Knowledge Systems Ltd. is now owned by SafeNet Inc.


I also tried a lot of solutions, many of which were listed in this post, but none of them worked. Finally the answer as a comment to this question helped out - with or without the other solutions - the 2.4 GHz Wi-Fi was causing the problem.
Turning it off and listening to music from spotify offline was no longer choppy, using a 5 GHz Wi-Fi hotspot was OK, so now I've switched to a wired connection. I was going to be upgrading my router to a 5 GHz one anyway...
A possible explanation might be that the bluetooth and Wifi share the same antenna. The bug that seems to be causing this - link. It is explained there that a fix for it would be released in pulseaudio 12. The version that ships with ubuntu 18.04 is Version: 1:11.1-1ubuntu7.11.
I tried manually upgrading that to version 12 (per this post) and I succeeded (Version: 1:12.2-9~bionic1), but that did not stop the stuttering for me.
P.S. Using an HP Probook 440 G7, Ubuntu 18.04


Password protect folder for Windows and Linux

In case it is just a few files compression would work BUT compressed files can be copied to another location and then someone can try to bruteforce it at their own time.

Bitlocker and the Linux companion dislocker will also work. We use that here to lock notebooks and USB sticks where the USB sticks can be opened and used with both Windows 7 and 10 and on Ubuntu. Just got to remember to lock the USB (or partition) when you go AFK.


Toggle format of gnome terminal prompt string by command?

Store both your long and short PS1 variables under a different name:

PS1short='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\]'
PS1long='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[01;34m\] $(basename ${PWD}) \$ \[\033[00m\]'

Make sure to set PS1to one of them initially:

PS1="$PS1long"

Then you can make an alias like this to toggle between the two PS1 values:

alias prompttoggle='if test "$PS1" = "$PS1long" ; then PS1="$PS1short" ; else PS1="$PS1long" ; fi'

Adding all four lines to your ~/.bashrc file will ake the command available in your Bash sessions, here are they again for easier copying:

PS1short='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\]'
PS1long='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[01;34m\] $(basename ${PWD}) \$ \[\033[00m\]'
PS1="$PS1long"
alias prompttoggle='if test "$PS1" = "$PS1long" ; then PS1="$PS1short" ; else PS1="$PS1long" ; fi'


The file is there, only it is another version. It is also present on the release index

  -rw-r--r-- 1 lp_publish lp_publish    70366 Aug 26 01:03 php5-mysql_5.3.6-13ubuntu3.1_powerpc.deb

This is probably old apt indexes, you need to download them again, open a terminal and type

sudo apt-get update && sudo apt-get install php5-mysql

Make sure that your package list is updated before trying to install software.


Adhoc network to do p2p communication in ubuntu machines

Most laptops can only be connected to one network at a time, and that network in your case is the network between the 2 pcs, to access the internet you need to be connected to router (other network), simply with reference to my knowledge, you can't.

I'm a network and security engineer.


Why're two separate panel icons, when opened, grouping under the same icon

I think the problem could be for the WM_CLASS(STRING) in the gnome-terminal's  window properties
If you have two desktop files with different icons but running gnome-terminals... you can check the WM_CLASS with the command xprop

xprop | grep WM_CLASS

Then click in the windows (with the cross cursor)... and the result for your applications should be:

WM_CLASS(STRING) = "gnome-terminal", "Gnome-terminal"

In my opinion, due to the windows have the same WM_CLASS they will be grouped together in the Unity Launcher.

Set Class & Name in Gnome-Terminal
To avoid this issue you can try to set a different WM_CLASS string for each desktop file.
The command should be:

gnome-terminal --disable-factory --class <appname> --name <appname>

Here you have an example to run gnome-terminal & execute a little script.

gnome-terminal --disable-factory --class term-red --name term-red --title Term-Red --window-with-profile=red -e '/home/virtual/Desktop/test1.sh'

Example with 2 desktop files.
I created 2 desktop files that will run scripts (using gnome-terminal), and the gnome-terminal desktop icon locked to the Unity Launcher.
1) gnome-terminal.desktop 2) term-green.desktop3) term-red.desktop.

When I click in the 3 desktop files they are not grouped under the same icon.

As you can see 3 Terminals are running (with their own icon).

Here you have the content of the term-red.desktop.

The important keys to add in your .desktop files would be:

Exec=gnome-terminal --disable-factory --class term-red --name term-red --title Term-Red --window-with-profile=red -e '/home/virtual/Desktop/test1.sh'
StartupWMClass=term-red
StartupNotify=true

Here you have information about Desktop Entry Specification.

Another option would be to run xterm instead gnome-terminal.xterm will accept the option class & name.

Exec=uxterm -class term-red -name term-red -T Term-Red -e '/home/virtual/Desktop/test1.sh'

NOTE: Please change these examples according to your neeeds.
Hope it helps.


Are these fstab crypttab enties necessary?

The entry in /etc/crypttab and the first entry in /etc/fstab are required. Those entries are needed in order for your encrypted filesystem to be decrypted and mounted correctly to appear as a normal filesystem.

The second entry in /etc/fstab:

/dev/mapper/ubuntu--vg-swap_1 none swap sw 0 0

This entry mounts swap space. In a nutshell, swap space is RAM on your hard disk. It is used when you run out of actual RAM.

So, all in all, I would say don't modify them and keep everything. :)


sudo apt-get remove iio-sensor-proxy

Remove the above sensor


Nautilus as part of the GNOME desktop applications is deeply integrated into the system.
Removing the Files entry from dash in any way is not recommended (reason : see above).
Change the Ubuntu Unity desktop background from within system settings alternatively.
You can disable or enable search of files with the Unity Tweak Tool from the repositories.
Open a terminal and execute :
sudo apt-get install unity-tweak-tool

Open the tool - click on Search

Additionally you can disable files and application usage recording in the system settings.


TP-link TL-WN725N driver for 18.04 version

The driver have to be installed from sources
Open a terminal windows and go for it

sudo apt-get update
sudo apt-get install -y linux-headers-$(uname -r) build-essential git
git clone https://github.com/lwfinger/rtl8188eu
cd rtl8188eu
make all
sudo make install
sudo insmod 8188eu.ko


How can I change the default text editor from gedit to vim?

You don't say how you are clicking on this file, so I will explain a way to do it in Gnome from Nautilus.  It should work in other cases, I believe.

First, to get Vim (or any app) into the "open with other application" list, you need to create a .desktop file in ~/.local/share/applications with a line in it like this:   Exec=<command> %f.  I just made one called vim.desktop with these lines:

[Desktop Entry]
Categories=;
Comment=Edit file in Vim
Exec=vim %f
GenericName=Text Editor
Hidden=false
Icon=vim
Name=Vim
Terminal=true
Type=Application
Version=1.0

This made "Vim" appear in the list of possible apps when I right-clicked in Nautilus, and opened the file as expected.

Let me know if there are any problems.


Ubuntu takes too long to boot (almost 2 minutes)

Lets check the file system to make sure there aren't any errors.

boot to the GRUB menu
choose Advanced Options
choose Recovery Mode
choose root access
type sudo fsck -f /
run fsck more than once if there were errors
optional

open terminal from the Unity dash
type grep sda7 /var/log/syslog*
look for errors
copy/paste output into paste.ubuntu.com and give us the URL

type reboot


How I can block specific IP's using iptables?

You can add this rule. In --src you also can define various IPs seperated by , (and without spaces!)

iptables -A INPUT --src <the specific IP> -j DROP

Be careful not to lock yourself out though!

For keeping them after reboot read how-can-i-make-a-specific-set-of-iptables-rules-permanent

A quite complete and easy to maintain iptables setup I've found is

DigitalOcean: How to implement a basic firewall template with iptables on Ubuntu 14.04


How can I reset my sudo password with a separate monitor?

TL;DR: You should be able to boot to a live environment, chroot in, and reset the password.

The challenge you've described is that when you run the system normally, your external display is used, but in recovery mode, it isn't. If you can boot into a live environment, such as from an Ubuntu live USB or live DVD, your external display will probably work there. If it does, you can change passwords from the live environment (see below).

Simply inserting the live medium and rebooting may be sufficient to boot from it. This depends on the boot order that is set in your computer's firmware (i.e., BIOS or UEFI). Although it's possible to configure Ubuntu's boot loader to boot a different device on the next boot, and even sometimes to change your firmware's boot settings from within Ubuntu, both these actions would require that you be able to run commands as root within the Ubuntu system, which you cannot currently do.

Even though recovery mode doesn't use the external display, I would not assume that your computer's firmware setup won't. You should try it, if the machine doesn't just boot from a live USB or live CD/DVD when you reboot with it inserted (see below). Which key or keys to hold down to bring this up vary by manufacturer. Some machines also have a separate key or key combination to hold down to bring up a menu on which you select which device to boot from just one time. You can look these both up based on the model of your computer.

If you can't boot the system into a live environment, perhaps someone else will come up with an alternative solution. If ultimately you cannot find a software-based approach, you can take the hard disk out and put it in an enclosure, where you can then freely modify its contents from another machine. You might even be able to do it from the same machine, since without the internal drive it should fall back to booting from a USB flash drive or DVD that is inserted, and you can attach the enclosure after the live system is booted.

The instructions below are for the case where you can boot into a live environment and your external display works in it. They are adapted and shortened from the "If You Can Use the Installed Ubuntu System, Even As a Non-Administrative User" section of my answer to How do I reset a lost password (using recovery mode requires me to type the password)?

One of the ways I shortened them is to cover only the case of changing passwords, and not that of making a user an administrator. Note that the numbering of steps is not the same. For more details, I recommend looking at my original answer. Some answers to How do I reset a lost administrative password? also cover chroot-based techniques.

If you don't still have the USB flash drive or CD/DVD you used to install Ubuntu, make a new one. Note that if you do have it but you upgraded so it's for an older version of Ubuntu, that's fine. If you have a live CD/DVD or live USB for a different GNU/Linux operating system, that's likely to work, too.
Unless you know the device name of the partition that contains your Ubuntu system, don't boot into the live environment yet. In the installed system, open a terminal window (Ctrl+Alt+T) and run this command, including the spaces before on and after /:

mount | grep ' on / '

You should see something like:

/dev/sda1 on / type ext4 (rw,errors=remount-ro,commit=0)

The text before on, in this case /dev/sda1, is the device name of the partition that contains your Ubuntu system's root filesystem. Remember it, or write it down.
Boot your computer from the live USB or live CD/DVD. Select Try Ubuntu without installing.
Once the desktop has come up, open a terminal window (Ctrl+Alt+T).
Run

sudo mount /dev/sda1 /mnt

but replace /dev/sda1 with the device name of the partition containing the root filesystem, if different.

If you get an error about how a device or partition does not exist or about an "unknown filesystem type," your root filesystem is probably not on the device you specified.
Run:

sudo chroot /mnt

Some chrooting procedures involve setting up additional mounts in the chroot, such as as /proc. That's not needed for what we're doing here.

If the partition you mounted in step 5 exists but is the wrong one, you may see this error message:

chroot: failed to run command ‘/bin/bash’: No such file or directory

If you do, run sudo umount /mnt to unmount the partition, then mount the correct one.

All subsequent steps must be run in the terminal where you ran chroot, unless stated otherwise.
You likely know your username, but if you don't, run:

ls /home

Or, if you prefer, you can run ls /mnt/home outside the chroot. In either case, this is usually an effective way to list the human users on the installed system. You should be able to find your username that way. If you never made any other user accounts, it should even be the only output of that command.
Reset the password by running

passwd username

but write your actual username instead of username.

If there are no error messages, it worked.
Leave the chroot and unmount the installed system's root filesystem by running these commands, the last of which closes the terminal window:

exit
sudo umount /mnt
exit

Use the menus in the live environment's desktop to reboot (check the upper right if the user interface differs from the one you're used to). Or it would even be okay to run sudo reboot in a terminal.

You may need to remove the live USB or live CD/DVD to boot into your installed system.

In the installed system, you should again be able to run commands with sudo and pkexec and perform other actions that require you to enter a correct password.


There is a manual here (This is the paper from the original ori-page).

Quote from page 154:

"The following commands create and mount an autosynchronized file system.

Listing 1: Configuration of a user’s initial repository.

ori newfs MyRepo
orifs MyRepo

In the example above, a repository named
MyRepo is created, and mounted onto a directory with the same
name. By default orisync is enabled, but can be disabled
with the --nosync flag. Next, in Listing 2, we replicate
and mount the file system on a different computer from
the first host over SSH.

Listing 2: Remote mounting a file system

ori replicate --shallow user@host:MyRepo
orifs MyRepo

In this example we use the --shallow flag to enable the background fetch optimization. Data is fetched from the source in the background and on-demand, and once
enough data is replicated the machine will be ready for
offline operation. We mount the MyRepo
replica onto a directory with the same name."

I have no idea what they are talking about, but maybe it helps the pros here...


After power outage, main user logs out before I can use it (16.04)

Yeah, nevermind. I removed ~/.auth (well, I hid them in a new directory) and afterwards I could login just fine. I just didn't think I'd get this far if there was an authority issue. And somehow I missed the line in lightdm.log that reported authorization failure. Sorry to waste your time. :(


How to recover deleted file from mtp device?

I don't know which mtp device you have but I have been able to recover files using photorec (part of the package testdisk) where scapel (outdated) and foremost (also outdated) were not able to. I also recommend setting the mtp device to mass storage so photorec can read it as mentioned here How to mount Smartphone to recover files


It sounds to me like you're using Gnome-classic with Compiz, and in that case resizing windows doesn't work because the plugin is disabled by default (not sure why).

To enable it, install CCSM:

sudo apt-get install compizconfig-settings-manager

Then run CCSM:

alt+f2ccsm+enter

Then in CCSM enable the resize plugin:

If resize doesn't work immediately, you may need to restart Compiz:

compiz --replace & disown


Want to install Ubuntu 13.04 alongside Windows XP on an pld PC

To start you'll have to create 2 partitions. You can do this by using PartedMagic. PartedMagic can be installed on a pen drive using unetbootin. A partition is a part of your hard drive you designate as separate from the other part. Keep in mind that you should have at least 5 gb of space to run linux but about 40+ gp is recommended if you're going to use it extensively.

After this you can install xp onto one of the partitions like you normally would.

The next step is to install linux onto the other partition (in your case Ubuntu 13.04, which I should mention has expired his support date so you'll receive NO updates.I recommend you to choose 14.04 lts. That version will receive updates for the next 5 years) using recommended settings. Linux will install a grub. The grub will let you choose what operating system you want to boot.

If it doesn't show your xp OS you'll have to run a boot repair cd. This can also be installed onto a pendrive using unetbootin.

Reboot your computer and it should automatically boot into linux. if you want to change this default behavior you can run a Grub Customize to set xp as the default OS.

If any part was unclear you can comment on this post


nm-connection-editor not showing the full list of networks

according to man nm-connection-editor

DESCRIPTION
       nm-connection-editor  is  a GTK‐based application to add, remove, and modify network connections stored
       by NetworkManager.  NetworkManager must be running for any network connections to be added, removed, or
       modified

this means you need to click this network at-least once in order to show this when you open nm-connection-editor

the GUI way to launch from command line is

gnome-control-center wifi

Observe in below Image, there is no gear icon for the Network iBall-Baton this means I haven ever even tried to connect to this network..

Even I dont know the password if I just click it and then open nm-connection-editor, this network will be shown.


Retrieving file via Ubuntu One API brings back webpage

In order to fetch the file content, you need to use https://files.one.ubuntu.com/ + content_path URL, the links that are used for https://one.ubuntu.com/files/ will not work with OAuth.


How to automate configuration of /home which files are more than 10 day's

Put the name specifiers between double quotes:
find . -type f \( -name "*.csv" -o -name "*.txt" -o -name "*.log" \) -mtime +10 -print

works on my system.


Lost my Windows XP after bot-repair from the boot menu

You installed windows XP on /dev/sda5 which was a logical partition.Windows can't be able to boot if it was installed on a logical partition.

So try to reinstall Windows XP on a Primary partition.


How to install missing GNOME3/ GNOME Shell applications (Documents, Web apps, Sushi, etc.)?

Don't think that its a comparison issue, never was, never will be.

You are complaining about outdated packages on a release that is beta atm, beta means not ready for general public, there are issues, use it at your own risk. Nothing else to say here I think.


How does ubuntu ensure software security bfrom external developers

There are multiple levels of security/responsibility:

Developers:

write the source code -> check security of own code and from other developers
manage code repositories -> should check patches before accepting them, keep their repository secure
offer source downloads -> should keep download site secure, provide signed tarballs and checksums

Packaging toolchain:

Packagers: should package properly (configuration options, config files, pre/post-install scripts), sign packages
Repository managers: Properly vet package submissions
Distribution managers: Keep downloads, checksums, signatures, etc secure
All of them: Make sure security fixes make it into the distro package repositories as quickly as possible.
More info: https://wiki.ubuntu.com/MOTU

SecureApt:

Makes sure that downloaded packages and updates have not been tampered with (checksum and signature checks)
More info:

https://wiki.debian.org/SecureApt
https://help.ubuntu.com/community/SecureApt

Users:

Because most code for Ubuntu packages is open source and the packaging/signing/etc process is documented, anyone can check for security issues in principle and report unusual behaviour.
Should update regularly, but also follow security news if possible in case software updates or .iso files are compromised for instance... :/ ( Example: http://blog.linuxmint.com/?p=2994 )
Check .iso files before installing from them (checksums+signature, avoid unofficial sources)
Not ignore warnings like "WARNING: The following packages cannot be authenticated!": Why am I getting authentication errors for packages from an Ubuntu repository?

  Do the Ubuntu Devs review all software that they put in their repositories or do they trust that software is secure and host it anyway?

My guess is that they mainly trust the original developers (and users to report issues). But if any security problems are found, everyone involved should collaborate to get things patched as quickly as possible. If Ubuntu receives bug reports, they should transmit the information upstream (i.e. to developers) and the other way around, if developers find bugs, they should patch them quickly and notify downstream (i.e. packagers). And everybody should keep their private keys secure and revoke keys if they have been compromised.

P.S.: You might find more info on https://security.stackexchange.com/ as well.


Can We install ubuntu 4.10 on virtualbox?

Of course you could install it. I guess if it was in a VM it'd be relatively safe. The question is if it would be any use.

Download link here:
http://old-releases.ubuntu.com/releases/warty/

I do not support this and I don't think anyone else will either, you're on your own


Install Ubuntu Snappy Core on a computer

Take a look at http://cdimage.ubuntu.com/ubuntu-snappy/16.04/current/ which is the official server for Ubuntu releases,and you'll see that there are actually versions for AMD64 ( the 64-bit CPUs ) and i386 ( the 32-bit CPUs ). But just like with images for Raspberry Pi 2 and 3, they're .xz archives.  Notice also that there is no installation software for Snappy, since it's aimed at developers and cloud, so not at average users.

So the procedure for installing Snappy on a regular computer would be actually exactly the same( or at least that's how I personally would do it with a few minor changes):

Download the snappy image suitable for your target computer's CPU. Make sure you verify the downloaded image's SHA-256 checksum once the file is downloaded
Extract the hard drive/solid state drive from the target computer
Connect the hard drive to another computer via USB to SATA connector. If you are trying to use really really old hard drive, you might need PATA connector.
If you are using Linux machine, figure out which block device is your hard drive. On Ubuntu udisksctl status command or lsblk will help you with that.
If you are using another Linux machine, you can use the following command ( the example shows for amd64 image just as an example, use the path to actual file that you have downloaded)

xzcat ./ubuntu-core-16-amd64.img.xz | sudo dd of=/dev/sdb bs=32M && sync

Notice that /dev/sdb is just an example, and that it's the drive device itself, not a partition like /dev/sdb1. Also make sure none of the drive partitions are mounted.
Place the drive back into the target machine and boot.

NOTE: you'll still need to have single sign-on account and import SSH keys, so make sure you do that even before you start installing. Read this for more info.


How to install older version on PostgreSQL and PHP5?

Well, if you really want to keep your development and production environments in sync, you may want to consider just using a virtual machine of some kind. That way you can make it EXACTLY like production, without needing to screw up anything on your workstation.

That being said, though, you might try checkinstall. I've never used it, but the idea is to grab the sources of the version you want, configure and compile them as usual, and then use the program to make a DEB package to install.

There's also the idea of grabbing the source package from your server environment's version, and recompiling it on your machine with debuild -us -uc -b.


You added some PPA that is now no longer reachable.

Deactivate the PPA from Software Sources.

See for example: https://itsfoss.com/how-to-remove-or-delete-ppas-quick-tip/


Ubuntu not finding free space to continue installing

Recreate your VB virtual disk, and instead of taking the default of 10G size, make it 20G variable size.
answered by: heynnema


Ubuntu doesn't load after update from 12.04 to 12.10

It would be good to see at what stage it is hanging so I would recommend booting into recovery mode using the steps below.

Before trying any of the repair options choose resume to boot normally and you will see each process through the terminal when it hangs what do you see?

You could then try the dpkg option a summary of this option is below.

  This option will perform an apt-get update and upgrade and will attempt to repair any problems you might have with half-installed packages. You might choose this option if a package did not fully install or upgrade correctly and its init script is stalling out so the system can’t boot fully. This choice could potentially fix the package problems.

Booting into recovery mode

Switch on your computer
Wait until the BIOS finishes loading (you will probably see a logo of your computer manufacturer)
The following messages may show up:

Grub loading stage1.5

Grub loading, please wait...
Quickly press the Shift key or Escape, which will bring up a boot menu. (If you see the Ubuntu logo, you've missed the point where you can enter the GRUB menu)
Select the line ending with '(recovery mode)', probably the second line, something like:

Ubuntu, kernel 2.6.17-10-generic (recovery mode)
Press enter and your machine will begin the boot process.
After a few moments, your workstation should display a menu with a number of options.

References:

Recovery Mode

Recovery menu summary


Does Jupiter really improve battery power?

In OMGUbuntu, WebUpd8 and I think Phoronix they have an article about how it helps with the power management. Also several users have actually reported saving battery time. This of course changes depending on the hardware and the usage. For example, setting the mode to Power Saver while playing an intensive game or doing something process/power hungry will eventually eat the battery.

Some links about this are:
http://www.webupd8.org/2010/07/jupiter-ubuntu-ppa-hardware-and-power.html
http://www.webupd8.org/2010/06/jupiter-take-advantage-of-asus-super.html
http://www.omgubuntu.co.uk/2010/02/jupiter-awesome-netbook-powerconfig-applet/
http://eeepc.net/jupiter-adds-power-management-to-linux-netbooks/

But some suggestion would be to read the comments in each of this links, check the Jupiter site here: http://www.jupiterapplet.org/ for updates and support. Jupiter might help many laptops, netbooks and small eee but might not do much to others depending on the way they handle the power management. Most users actually have good reviews.

Lastly there are some improvements in the last days in the source: http://sourceforge.net/projects/jupiter/

which at least suggests it is still active and work is getting to it.


Can not install Ubuntu 12.04 LTS on Acer aspire 4736G through CD/DVD

This particular error is often due to a faulty CD/DVD disk or drive, or a faulty hard disk. It may help to clean the CD/DVD, to burn the CD/DVD at a lower speed, to clean the CD/DVD drive lens (cleaning kits are often available from electronics suppliers), to check whether the hard disk is old and in need of replacement, or to move the system to a cooler environment.

Solutions:

(I'm listing solutions, is not a step-by-step instructions)

Redownload the ISO, verify the checksums and burn again. Then verify the disk for defects.
Use another burner to burn the DVD.
Create a bootable USB.
Replace the Hard Disk.
Replace the computer.


"Error loading MySQLdb module" when installing custom app

It seems that apt-get and pip each installed their own version of the library.

Try removing system MySQL with sudo apt-get remove python-mysqldb, and
you should have something like this:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  python-mysqldb
0 upgraded, 0 newly installed, 1 to remove and 3 not upgraded.
After this operation, 196 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 109333 files and directories currently installed.)
Removing python-mysqldb (1.2.3-2ubuntu1) ...


You have a two-fold question, both have been answered before:

Convert video to audio

and

Replace the system ready sound

TL;DR: convert video to audio first, then replace the audio file that plays with the one you want. Remember to keep original file as backup


Knowing that you followed an up-to-date guide (at the time of this writing) and assuming the correct PPA mentioned in the guide was already added, please run:
sudo apt update
sudo apt install --reinstall ubuntudde-dde

Some cleanup is probably in order. Do this before the previous commands and then try again:
sudo apt clean
sudo apt autoclean


Icons take several seconds to appear/disappear from the dock when the app is opened/closed

If your dock is empty besides the "Show Applications" button, the delayed/missing update of icons in the dock is most probably caused by https://github.com/micheleg/dash-to-dock/issues/1188 and will be fixed by https://github.com/micheleg/dash-to-dock/pull/1222 . A bug report for the ubuntu version of the dock is tracked here: https://bugs.launchpad.net/ubuntu/+source/gnome-shell-extension-ubuntu-dock/+bug/1880570


Unable to start mysql server after update

The following two lines in the /etc/apparmor.d/usr.sbin.mysqld overlap.

/media/WESYS_DATA/MySql_LX/** rwk,
/media/WESYS_DATA/MySql_LX/** rwk,

When you replace these lines to the below lines, your problem may be solved.

/media/WESYS_DATA/MySql_LX/ r,
/media/WESYS_DATA/MySql_LX/** rwk,


exited with non-zero exit status 32: mount: wrong fs type, bad option, bad superblock on /dev/sdb7

If your hard drive isn't making noise and isn't broken, you need to find its absolute path.

lsblk

You need to find the process which is still being used.

ps -aux | grep /dev/sdXNumber

Take the first number which is the process ID and kill it.

sudo kill -9 ID_NUMBER_PROCESS

Retry to unmount the disk.

sudo unmount /dev/sdXNumbert


Typing lower case 'i' anywhere in Ubuntu 12.04 causes a 'no sign' to appear. Hitting 8 causes my window to maximize

So it appears that this was due to a faulty keyboard. I had a new Dell laptop keyboard sent in and I replaced it. It came with everything except the ribbon cable connecting the motherboard to the keyboard control circuit (there are several ribbon cables on they keyboard itself connecting to a single control circuit).

After using this it appears that the old keyboard was broken. There wasn't anything apparent such as a frayed ribbon wire.  But, with such unusual things occurring this outcome makes sense.


Including external Header files in programs

If you have a program print.c that prints a text:

/* print.c */
#include <stdio.h>
#include "print.h"

int main(void) {
    puts(TEXT);
    return 0;
}

and a header file defining that text:

/* print.h */
#define TEXT "Hello World!"

Then you usually put these files in the same folder. For external dependencies, it depends. Many external dependencies should not be downloaded from a website, but installed from the Ubuntu repositories.

For instance, the OpenGL headers are available from libgl1-mesa-dev (which installs mesa-common-dev).
This makes the headers available in /usr/include/GL/gl.h.

In other cases where the header file is not located in the same directory, specify the different include directories while compiling. Example where you have a directory external-deps containing header files:

cc -I external-deps source.c -o output-program

If there are libraries involved (example for an OpenGL program using libGL):

cc -I external-deps source.c -o output-program -L path/to/libraries -lGL


Cannot install subversion ubuntu 14.04 unmet dependencies

One possible cause is that you don't have the latest versions of some packages. You should try updating first by running this:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install subversion


Trying to do ssh authentication with key files: server refused our key

Ok, it is fixed however I don't see how this is different from what I tried already.

What I did:

generate a key pair with puttygen.exe (length: 1024 bits)
load the private key in the PuTTY profile
enter the public key in ~/.ssh/authorized_keys in one line
(ssh-rsa {your_public_key} with no more than once space between ssh-rsa and your key)
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
chown $USER:$USER ~/.ssh -R
change /etc/ssh/sshd_config so it contains AuthorizedKeysFile %h/.ssh/authorized_keys
sudo service ssh restart

For troubleshooting do # tail -f /var/log/auth.log.

Thanks for your help!


Can't start any application - unable to open connection to X

This seems to have been a problem with the .Xauthority file in the home directory. It should be recreated if you delete it, upon restarting the X server. I entered

rm $HOME/.Xauthority*

and rebooted, and can now launch applications.


GUI program to resize pdf documents and change their DPI

Nautilus Script

Code

I have been able to successfully resize my PDFs with this Nautilus script:

#! /bin/bash

# AUTHOR:   (c) Ricardo Ferreira, oriolpont -- modified in accordance to https://askubuntu.com/q/280618/81372
# NAME:     Compress PDF 1.4.2
# DESCRIPTION:  A nice Nautilus script with a GUI to compress and optimize PDF files
# REQUIRES: ghostscript, poppler-utils, zenity, sed, python-notify (optional)
# LICENSE:  GNU GPL v3 (http://www.gnu.org/licenses/gpl.html)
# WEBSITE:  https://launchpad.net/compress-pdf

VERSION="1.4.2"
COMPRESSPDF_BATCH_ABORT_ERR=115

# Messages
        # English (en-US)
        error_nofiles="No file selected."
        error_noquality="No optimization level selected."
        error_ghostscript="PDF Compress requires the ghostscript package, which is not installed. Please install it and try again."
        error_nopdf="At least one of the selected file(s) is not a valid PDF archive."
        label_filename="Save PDF as..."
        label_level="Please choose an optimization level below."
        optimization_level="Optimization Level"
        level_default="Default" # apparently close to High Quality
        level_screen="Screen-view only (72dpi)"
        level_low="Low Quality (150dpi)"
        level_high="High Quality (300dpi)"
        level_color="High Quality (Color Preserving) (300dpi)"
        job_done="has been successfully compressed"
        filename_suffix="_opt"
        label_suffix="Choose the suffix for the filenames."
        warning_overwrite="That will overwrite the original pdf files."

case $LANG in

    pt* )
        # Portuguese (pt-PT)
        error_nofiles="Nenhum ficheiro seleccionado."
        error_noquality="Nenhum nível de optimização escolhido."
        error_ghostscript="O PDF Compress necessita do pacote ghostscript, que não está instalado. Por favor instale-o e tente novamente."
        error_nopdf="O ficheiro seleccionado não é um ficheiro PDF válido."
        label_filename="Guardar PDF como..."
        label_level="Por favor escolha um nível de optimização abaixo."
        optimization_level="Nível de Optimização"
        level_default="Normal"
        level_screen="Visualização no Ecrã"
        level_low="Baixa Qualidade"
        level_high="Alta Qualidade"
        level_color="Alta Qualidade (Preservação de Cores)"
        job_done="foi comprimido com sucesso"
        filename_suffix="-otimizado";;

    es* )
        # Spanish (es-AR) by Eduardo Battaglia
        error_nofiles="Ningún archivo seleccionado."
        error_noquality="Ningún nivel de optimización escogido."
        error_ghostscript="Compress PDF necesita el paquete ghostscript, que no está instalado. Por favor instálelo e intente nuevamente."
        label_filename="Guardar PDF como..."
        label_level="Por favor escoja un nivel de optimización debajo."
        optimization_level="Nivel de Optimización"
        level_default="Normal"
        level_screen="Sólo visualización"
        level_low="Baja calidad"
        level_high="Alta calidad"
        level_color="Alta calidad (Preservación de Colores)"
        filename_suffix="-optimizado";;

    cs*)
       # Czech (cz-CZ) by Martin Pavlík
        error_nofiles="Nebyl vybrán žádný soubor."
        error_noquality="Nebyla zvolena úroveň optimalizace."
        error_ghostscript="PDF Compress vyžaduje balíček ghostscript, který není nainstalován. Nainstalujte jej prosím a opakujte akci."
        label_filename="Uložit PDF jako..."
        label_level="Prosím vyberte úroveň optimalizace z níže uvedených."
        optimization_level="Úroveň optimalizace"
        level_default="Výchozí"
        level_screen="Pouze pro čtení na obrazovce"
        level_low="Nízká kvalita"
        level_high="Vysoká kvalita"
        level_color="Vysoká kvalita (se zachováním barev)"
        filename_suffix="-optimalizované";;

    fr*)
       # French (fr-FR) by Astromb
        error_nofiles="Aucun fichier sélectionné"
        error_noquality="Aucun niveau d'optimisation sélectionné"
        error_ghostscript="PDF Compress a besoin du paquet ghostscript, mais il n'est pas installé. Merci de l'installer et d'essayer à nouveau."
        error_nopdf="Le fichier que vous avez sélectionné n'est pas un PDF valide."
        label_filename="Sauvegarder le PDF sous..."
        label_level="Merci de choisir, ci-dessous, un niveau d'optimisation."
        optimization_level="Niveau d'optimisation"
        level_default="Défaut"
        level_screen="Affichage à l'écran"
        level_low="Basse qualité"
        level_high="Haute qualité"
        level_color="Haute qualité (Couleurs préservées)"
        filename_suffix="-optimisé";;

    zh_CN*)
        # Simplified Chinese (zh_CN) by TualatriX Chou
        error_nofiles="没有选择文件。"
        error_noquality="没有优化优化等级。"
        error_ghostscript="PDF压缩需要ghostscript软件包，但是它没有安装。请先安装然后再重试。"
        error_nopdf="选择的文件不是一个有效的PDF文件"
        label_filename="另存为PDF..."
        label_level="请在下面选择优化等级"
        optimization_level="优化等级"
        level_default="默认"
        level_screen="仅在屏幕上浏览"
        level_low="低品质"
        level_high="高品质"
        level_color="高品质（护色） "
        filename_suffix="-优化";;

        ar*)
                # Arabic (ar) by Mohammed hasan Taha
        error_nofiles="لم يتم اختيار ملف"
        error_noquality="لم يتم اختيار درجة الضغط"
        error_ghostscript="هذا السكربت يحتاج حزمة ghostscript package لذا يرجى تنصيبها ثم اعادة المحاولة"
        error_nopdf="الملف الذي تم اختياره ليس ملف pdf صالح"
        label_filename="حفظ الملف باسم"
        label_level="الرجاء اختيار درجة الضغط"
        optimization_level="درجة الضغط"
        level_default="افتراضي"
        level_screen="عرض للشاشة فقط(الدرجة الأكثر انخفاضا)"
        level_low="جودة منخفضة"
        level_high="جودة مرتفعة"
        level_color="جودة عالية جدا"
        filename_suffix="-الأمثل";;

    ml_IN*)
        # Malayalam (ml_IN) by Hrishikesh K B
        error_nofiles="ഒരു ഫയലും തിരഞ്ഞെടുത്തിട്ടില്ല."
        error_noquality="യാതൊരു ഒപ്റ്റിമൈസേഷന് ലെവലും തിരഞ്ഞെടുത്തിട്ടില്ല."
        error_ghostscript="പി ഡി എഫ് കംപ്രസ്സറിന് ഗോസ്റ്റ് സ്ക്രിപ്റ്റ് പാക്കേജ് ആവശ്യമാണ്. ആ പാക്കേജ് ഇന്‍സ്റ്റാള് ചെയ്‌ത ശേഷം ദയവായി വീണ്ടും ശ്രമിക്കുക."
        error_nopdf="തിരഞ്ഞെടുത്ത ഫയല് സാധുവായ ഒരു പിഡിഎഫ് ആര്‍ച്ചീവ് അല്ല."
        label_filename="പിഡിഎഫ് ഇങ്ങിനെ സംരക്ഷിക്കുക..."
        label_level="ദയവായി താഴെ നിന്നും ഒരു ഒപ്റ്റിമൈസേഷന് ലെവല് തിരഞ്ഞെടുക്കുക."
        optimization_level="ഒപ്റ്റിമൈസേഷന് ലെവല് "
        level_default="ഡീഫാള്‍ട്ട്"
        level_screen="സ്ക്രീനില് കാണാന് മാത്രം "
        level_low="കുറഞ്ഞ നിലവാരം"
        level_high="കൂടിയ നിലവാരം "
        level_color="കൂടിയ നിലവാരം (നിറം സംരക്ഷിച്ചിട്ടുള്ളത്)";;

    he*)
        # Hebrew (he-IL) by Yaron (from Launchpad question)
        error_nofiles="לא נבחר אף קובץ."
        error_noquality="לא נבחרה רמת הייעול."
        error_ghostscript="התכנית PDF Compress דורשת את החבילה ghostscript, שאינה מותקנת. נא להתקין אותה ולנסות שוב."
        error_nopdf="הקובץ הנבחר אינו ארכיון PDF תקני."
        label_filename="שמירת ה־ PDF בשם..."
        label_level="נא לבחור את רמת הייעול להלן."
        optimization_level="רמת הייעול"
        level_default="בררת מחדל"
        level_screen="לצפייה בצג בלבד"
        level_low="איכות נמוכה"
        level_high="איכות גבוהה"
        level_color="איכות גבוהה (שימור הצבע)"
        job_done="הדחיסה הסתיימה בהצלחה";;

esac

# Check if Zenity is installed
if ! ZENITY=$(which zenity)
then
    echo "error: Compress PDF $VERSION needs zenity to run." # maybe we could translate this someday
    exit 1
fi

# Check if Ghostscript is installed
if ! GS=$(which gs)
then
    $ZENITY --error --title="Compress PDF $VERSION" --text="$error_ghostscript"
    exit 1
fi

# Check if the user has selected any files
# if [ "x$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" = "x"  -o  "$#" = "0" ] # we double check. Remove the first part if you plan to manually invoke the script

if [ "$#" = "0" ] # removed nautilus specific variable to make the script compatible with other file managers
then
    $ZENITY --error --title="Compress PDF $VERSION" --text="$error_nofiles"
    exit 1
fi

# Check if we can properly parse the arguments
INPUT=("$@")
N=("$#")
if [ "${#INPUT[@]}" != "$N" ] # comparing the number of arguments the script is given with what it can count
then
    $ZENITY --error --title="Compress PDF $VERSION" # if we arrive here, there is something very messed
    exit 1
fi

# Check if all the arguments are proper PDF files
for ARG in "$@"
do
    IS_PDF=$(file --brief --mime-type "$ARG" | grep -i "/pdf") # ignoring case for 'pdf'; as far as I know, the slash before (sth/pdf) is universal mimetype output. In most cases we can even expect 'application/pdf' (portability issues?).
    if [ "x$IS_PDF" = x ]; then NOT_PDF=1; break; fi
done
if [ "x$NOT_PDF" != x ]
then
    $ZENITY --error --title="Compress PDF $VERSION" --text="$error_nopdf"
    exit 1
fi

# Everything is OK. We can go on.

# Ask the user to select an output format
selected_level=$($ZENITY --list --title="Compress PDF "$VERSION"" --text "$label_level" --radiolist --column "" --column "$optimization_level" TRUE "$level_default" FALSE "$level_screen" FALSE "$level_low" FALSE "$level_high" FALSE "$level_color" --height 250 --width 400)
if [ "$?" != "0"  -o  "x$selected_level" = x ]; then exit 1; fi

# Select the optimization level to use
case $selected_level in
    "$level_default")
        COMP_COMMAND="/default"
    ;;
    "$level_screen")
        COMP_COMMAND="/screen"
    ;;
    "$level_low")
        COMP_COMMAND="/ebook"
    ;;
    "$level_high")
        COMP_COMMAND="/printer"
    ;;
    "$level_color")
        COMP_COMMAND="/prepress"
    ;;
esac

# Choose output filename(s)
if [ $# -eq 1 ]
then
    pdf_file=$(basename "$1")
    suggested_filename=${pdf_file%.*}${filename_suffix}.${pdf_file##*.}
    output_filename=$($ZENITY --file-selection --save --confirm-overwrite --filename="$PWD/$suggested_filename" --title="$label_filename")
    if [ "$?" != "0"  -o  "x$output_filename" = x ]; then exit 1; fi
else
    filename_suffix=$($ZENITY --entry --title="Compress PDF $VERSION" --text="$label_suffix" --entry-text="$filename_suffix")
    if [ "$?" != "0" ]; then exit 1; fi
    if [ "x$filename_suffix" = x ]
        then if ! $ZENITY --warning --title="Compress PDF $VERSION" --text="$warning_overwrite"; then exit 1; fi
    fi
    case "$filename_suffix" in */*) $ZENITY --error --title="Compress PDF $VERSION"; exit 1; esac # Check if the specified suffix is legal (we use 'case' instead of 'if' to directly use asterisk * globbing -- and avoid [[...]] for portability)
fi

# Finally, we process the files

for arg in "$@" # this processing is partly inspired by Edouard Saintesprit's patch from Compress PDF page at Launchpad
do
    if [ $# -ne 1 ]
    then
        pdf_file=$(basename "$arg")
        output_filename=${pdf_file%.*}${filename_suffix}.${pdf_file##*.}
    fi

    output_name=$(basename "$output_filename")

    temp_pdfmarks=tmp-compresspdf-$output_name-pdfmarks
    temp_filename=tmp-compresspdf-$output_name

    if [ -e $temp_pdfmarks  -o  -e $temp_filename ]; then $ZENITY --error --title="Compress PDF $VERSION"; exit 1; fi

    # Extract metadata from the original PDF. This is not a crucial functionality, but maybe we could warn if pdfinfo or sed are not available
    pdfinfo "$arg" | sed -e 's/^ *//;s/ *$//;s/ \{1,\}/ /g' -e 's/^/  \//' -e '/CreationDate/,$d' -e 's/$/)/' -e 's/: / (/' > "$temp_pdfmarks"
    if ! grep /Title "$temp_pdfmarks"; then echo '  /Title ()' >> "$temp_pdfmarks"; fi # Warning: if the pdf has not defined a Title:, ghostscript makes a fontname become the title.
    # echo -e 0a'\n''  /Title ()''\n'.'\n'w | ed afile # use to prepend instead of append
    sed -i '1s/^ /[/' "$temp_pdfmarks"
    sed -i '/:)$/d' "$temp_pdfmarks"
    echo "  /DOCINFO pdfmark" >> "$temp_pdfmarks"

    # Execute ghostscript while showing a progress bar
    (
        $GS -sDEVICE=pdfwrite -dPDFSETTINGS=$COMP_COMMAND -dColorConversionStrategy=/LeaveColorUnchanged -dCompatibilityLevel=1.4 -dNOPAUSE -dQUIET -dBATCH -dSAFER -sOutputFile="$temp_filename" "$arg" "$temp_pdfmarks" & echo -e "$!\n"
        # we output the pid so that it passes the pipe; the explicit linefeed starts the zenity progressbar pulsation
    ) | ( # the pipes create implicit subshells; marking them explicitly
        read PIPED_PID
        if $ZENITY --progress --pulsate --auto-close --title="Compress PDF $VERSION"
        then
            rm "$temp_pdfmarks"
            mv -f "$temp_filename" "$output_filename" & # we go on to the next file as fast as possible (this subprocess survives the end of the script, so it is even safer)
            notify-send "Compress PDF" "$output_name $job_done"
        else
            kill $PIPED_PID
            rm "$temp_pdfmarks"
            rm "$temp_filename"
            exit $COMPRESSPDF_BATCH_ABORT_ERR # Warning: it exits the subshell but not the script
        fi
    )
    if [ "$?" = "$COMPRESSPDF_BATCH_ABORT_ERR" ]; then break; fi # to break the loop in case we abort (zenity fails)
done

Original Source: https://launchpad.net/compress-pdf

Script based on this branch by oriolpont and modified according to cipricus' suggestion.

Oriolpont's modified revision comes with a number of improvements:

  Hebrew translation by Yaron
  Multifile support based on changes by Edouard Saintesprit
  Several other bash tunings to make the script much safer (PID tempfiles, safer mode for GS, more initial checks)

Screenshot

Options

The options offered in the zenity GUI dialog correspond to these ghostscript settings:

  dPDFSETTINGS=/screen (screen-view-only quality, 72 dpi images)
  dPDFSETTINGS=/ebook (low quality, 150 dpi images)
  dPDFSETTINGS=/printer (high quality, 300 dpi images)
  dPDFSETTINGS=/prepress (high quality, color preserving, 300 dpi
  imgs)
  dPDFSETTINGS=/default (almost identical to /screen)

  More options and fine tunning on the site:
  http://milan.kupcevic.net/ghostscript-ps-pdf/

Source: Open Source command line tool for optimizing PDF

You can find some more information on the options used here. Oriolpont's README offers additional details on customizing the script to your needs.

Installation

The script depends on a number of packages. You can install them with:

sudo apt-get install ghostscript poppler-utils zenity

If you don't know how to install a Nautilus script, just follow this guide:

How can I install a Nautilus script?

Installation on alternate desktop environments

The script does not depend on any custom Nautilus variables and can be used with pretty much any file manager out there that supports custom menu actions. Please refer to your file manager's manual on how to install your script. XFCE-users can find a nice tutorial here.

Of course you can also launch the script from the command line. Basic usage:

compresspdf "filename.pdf"

  Moonshiner

Overview

More advanced control over your PDF output can be achieved with Moonshiner, a GUI front end to ghostscript.

Installation

Moonshiner is not available from the official repositories. Unfortunately I wasn't able to find an official PPA, either. There's only this private PPA which hasn't been updated in a while. The .deb archive available here should work on recent Ubuntu revisions, but don't take my word for it.

As far as I can see the safest way of installing moonshiner is directly from its source. To do so, first download the most recent revision:

svn co https://moonshiner.svn.sourceforge.net/svnroot/moonshiner/trunk moonshiner_svn
cd $HOME/moonshiner_svn/

Moonshiner depends on Python, PyGTK and Ghostscript. If these dependencies are satisfied (which they should be on a stock Ubuntu installation) you can proceed to install the application with:

sudo python setup.py install

Or with python's packet management tool (sudo apt-get install python-pip):

python setup.py sdist
sudo pip install $HOME/moonshiner_svn/dist/moonshiner-1.1svn.tar.gz

Uninstalling moonshiner is a breeze with pip:

sudo pip uninstall moonshiner

If you go with the first installation method you will have to remove all installed files manually.

Usage

After installation you should be able to launch Moonshiner from the dash or your preferred application launcher. The GUI is pretty self-explanatory. To modify a PDF you simply drag and drop the file onto the interface, change the settings you want and hit Go Moonshining!.

Three separate governors under the Images tab allow you to fine tune DPI and quality settings to your will:

I won't dive into the other settings here but I encourage you to consult the official documentation for any questions you might have.

Custom icon

I wasn't too fond of moonshiner's icon, so I created one of my own:

You can download the SVG here. The icon is based on the fantastic Faenza iconset and released under the same license (GNU/GPL).


Your code got the following error message:
ImportError: numpy.core.multiarray failed to import

Change your Python code like this and then test it first in the terminal:
:~$ python
>>> import numpy
>>> from numpy import core
>>> from numpy.core import multiarray as ma

If you also have python-matplotlib installed, the first line of code to enable plotting in the current Jupyter Notebook is %matplotlib inline
Your Jupyter Notebook also shows another error message:
RuntimeError: module compile against API version 0xa but this version of numpy is 0x9

numpy from Anaconda is not compatible with ipython or some other package that you have installed. This would not happen if you installed the python-numpy, ipython, and python-matplotlib packages from the default Ubuntu repositories. I have installed Jupyter Notebook in Ubuntu 14.04 with the command sudo apt-get -y install ipython ipython-notebook && pip install --user jupyter and used it with ipython, python-matplotlib and python-numpy also from the default Ubuntu repositories without any problems.
To install jupyter-notebook in Ubuntu 18.04-19.10 open the terminal and type:
sudo apt install python-all python3-pip python3-notebook jupyter jupyter-core python-ipykernel

To install jupyter-notebook in Ubuntu 20.04 and later open the terminal and type:
sudo apt install python-all python3-pip python3-notebook jupyter jupyter-core


Install Ubuntu with other linux distributions on same machine

Partition the hard drive into however many installations you want using a tool like GParted.
Install each distro into their respective partitions.
Install grub to the root of the hard drive. You can either

install Ubuntu last because it can automatically install grub to the root without issue, or
if you installed Ubuntu first you may need to re-install Grub for it, e. g. with the help of Boot-Repair.

There are many tutorials online to achieve exactly what you are attempting to do. That is my reason for not providing extreme detail and posting this to the community wiki, rather than to myself.


using gedit through ssh connection - should I have gedit installed on the server?

The correct command is

ssh -p 2222 -X user@host

where I suppose the server listen on 2222 port number. Also note that the case of X option is important, it must be uppercase.

You need to have the program you want to run installed on the server (gedit in this case). Also you may install gedit without installing X, just because you can run gedit on a remote X server, as you are trying to do.


Python closes output terminal when error in code

Use journalctl -b-0 and the most recent boot information and error messages are displayed.
Then press the End key and the most recent messages are displayed. If you terminal closed abnormally I would expect an error message to appear.
You can use Page Up if the error occurred sometime ago.
Note this is for the current boot only. You need to have multi-boot logging enabled to see previous boots. If you don't have it enabled you can view the file /var/log/syslog for pretty much the same information and error messages.


As seen, your PATH contains /usr/local/bin before /usr/bin, hence the watch you have installed by compiling locally (/usr/local/bin/watch) is having the precedence over original watch (/usr/bin/watch). Another very unlikely case is that /usr/bin is not in your PATH.

You have some solution options now:

Rename the local watch (/usr/local/bin) as something else, given renaming won't create any problem
Edit your PATH to have /usr/bin before /usr/local/bin, again if would create no problem:

PATH=/usr/bin:/usr/local/bin:.....

Make an alias:

alias watch=/usr/bin/watch

Use full path:

/usr/bin/watch


Lenove Z570 Brightness Setting Gone in Ubuntu 13.10

the only way to change brightness is to use this command

sudo su

echo 150 > /sys/class/backlight/intel_backlight/brightness

all other solution does not work at the moment.
this is not my work around. i dont remember where i got this but it works and hats off to the person who gave this workaround :)

Using Ubuntu 13.10 64Bit Wubi on Lenovo Z570


Encrypted backup with Deja Dup fails on Ubuntu Budgie 17.10

Got the same error when trying to restore my backup on 18.04. I've managed to find a workaround for my case which might also help for verification.
on the commandline run:

$ export PASSPHRASE= < your_passphrase >

(prepend it with a space to keep your password out of your command history
then instead of opening deja dup through a gui I open it through the same terminal,which in my case is:

$deja-dup --restore-missing ~


Where can I find documentation about the gtk+ aurora engine

The official website is at gnome-look.org. There are some informations, and you can download the source code.

A real documentation does not seem to exist.


Curl with SSL failing to download with https (DigitalOcean Ubuntu Server 15.04)

I "fixed" the problem with:

sudo mkdir -p /usr/local/opt/curl-ca-bundle/share/
sudo cp /etc/ssl/certs/ca-certificates.crt /usr/local/opt/curl-ca-bundle/share/ca-bundle.crt

After this, curl works correctly, though I'm still unsure as to what caused the issue in the first place.


Yes you need X server. Won't work from Linux server with no X server.

Assuming you have an X server, you can run

export DISPLAY=:0

unless your display manager is not running on the default X display.


Yes, this is possible. As mentioned by @muldune, you can use a Yubikey to perform 2FA encryption with LUKS. Have a look at my AskUbuntu answer here.


How to install angularjs on Ubuntu 16.04 LTS

To install globally use:

npm install -g generator-angular

To install locally for project only:

npm install --save angular

More information:

https://gist.github.com/tusharbabbar/d8fc8d3448db6085bae6

https://www.npmjs.com/package/angular


Eclipse shows blank screen after upgrading to 12.04

Ok, I found out the problem - should anyone recognize the above screenshot, the problem lies with dropbox sync across 11.10 and 12.04. It's unrelated to download locations.

Opening up a blank workspace and copying files there solves the problem.


vmware player xorg driver broke after ubuntu 12.04 LTS automatic system update on 06/07/2014

The very same problem happened to me. I was able to circumvent the issue by reverting to a VM snapshot and setting the 8 updates related to the Linux kernel to not install (they are very close to the top of the list of updates). I do not know which of the 8 (or a combination) caused the problem, but those updates are indeed the change that caused the problem with the display.


File copying from jump server to multiple server

You can simply use scp to copy the file from a host to different one.
More information about scp can be found at: scp Example Syntax


VirtualBox headless: Why can't I get the guestproperty network address?

Find the mac address for the newtworking interface that you want to get the address for. You can do this using ifconfig or I think its listed in the machine config for the virtual interface.
From the host (or which ever machine you are using to ssh) install arp-scan.
sudo apt-get install arp-scan. arp-scan lists all mac and ip address pairs on the network.
Then the command to run arp-scan and grep out the mac address you want would look somehting like

sudo arp-scan 10.253.0.0/24 | grep -i <mac address>

You may have to specify an interface if you have more than 1 e.g. --interface=eth0. And your network and subnet may be different.

Now for extra credit you could use awk to pull out just the ip address and put together your ssh command, and have everything done in one little script.

This is what I would do.

pseudocode:

start vm
sleep 1 min
ip=$(apr-scan | grep | awk print $2)
echo $ip
ssh <user>@$ip


Installing Ubuntu on Toshiba Portege 3500

Portege 3500's have a wide variety of boot options but only through a modified win98 boot disk still available from Toshiba(found it on the first page of search results when looking for how to install a new OPSYS.) It provides numerious options and drivers for USB,cardbus,PCMCIA drives and network installs.You will need a USB floppy drive,mine was a generic NEC drive and of course a blank disk. Unaware if you would need to modify the disks files. I know XP is setup to ignore Linux. As far as WiFi,the solutions I have seen require opening a terminal and utilizing the command line as well as inserting a script to make the connection automatic on boot. The problem seems to have something to do with the Toshiba cards firmware.
  Ubuntu 14.xx.xx 32 bit might be a bit heavy for the 3500 as it was released in late 2002,has a Early PIII mobile and a max 1 Gig ram. A lighter distro with tablet functionality would most likely give a better result.  L.L.G.


Try to install latest drivers from Xorg-Edgers PPA:

sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install fglrx-12

And if you want more stable drivers, use ppa:ubuntu-x-swat/ppa


Ubuntu delete count shows more files than initial count

Turns out the project was still live with a SASS compiler watch command. So as I deleted files maybe it kept compiling more files. I closed the terminal window and then deleted it.
Why did this happen?


Changed the user password, but now I can't access my encrypted folder

Fixed it by manually re-wrapping the pass-phrase after reading this link:

ecryptfs-rewrap-passphrase ~/.ecryptfs/wrapped-passphrase

It’ll prompt you for your old password, and you can enter a new one afterwards.