Apply LADSPA filter to only one channel of multichannel output with Alsa and PulseAudio

Assigning a LADSPA filter to a single audio channel
We can do this with fine tuning the pulseaudio LADSPA sink module. This module loads a sink where any LADSP plugin will be applied to. It is the usual case to apply a filter to all channels but we can also define a single channel to assign a filter to by remapping and then combining channels.
The following Pulse Audio commands are involved:

Get a valid sink_name and channel_map:
 pacmd list-sinks

Load a LADSPA filter:
 load-module module-ladspa-sink sink_name=ladspa_out master=alsa_out plugin=<filer> label=<label> control=<control>

Create a new remapped sink:
 load-module remap-sink sink_name=<name> master=<sink> channels=<n> master_channel_map=<list> channel_map=<list>

Create a new combined sink:
 pacmd load-module module-combine-sink sink_name=<name> sink_properties=device.description=<displayed_name> slaves=<list_of_n_sinks> channels=<n>

To get the desired effect we need to load the LADSPA filter to create a ladspa_out-sink with filtered audio from a given sink. Then we need to create separate, named sinks for each audio channel. Channels where we wish the filter to be applied need the ladspa_out-sink as master, channels we need to be clean need the unfiltered sink as master. Lastly we combine the separate channels again to give us new combined sink.

Example for two channels
pacmd load-module module-ladspa-sink sink_name=ladspa_out master=alsa_output.pci-0000_00_14.2.analog-stereo plugin=bandpass_iir_1892 label=bandpass_iir control=660.0,440.0,2

A new sink ladspa_out is created using bandpass_iir filter with given controls applied to the audio signal from our master sink (replace with the master sink from step 1. above)
pacmd load-module module-remap-sink sink_name=remapR master=ladspa_out channels=1 master_channel_map=front-right channel_map=front-right

A filtered sink with name remapR is created for the front right audio channel from the filtered ladspa_out sink.
pacmd load-module module-remap-sink sink_name=remapL master=alsa_output.pci-0000_00_14.2.analog-stereo channels=1 master_channel_map=front-left channel_map=front-left

An unfiltered sink remapL for the front left audio channel is created from our unfiltered master sink as defined above.
pacmd load-module module-combine-sink sink_name=combine sink_properties=device.description=myCombine slaves=remapL,remapR channels=2

A new sink combine (or any other name you choose) will be created with 2 channels using the unfiltered sink remapL for the left channel, and the filtered sink remapR for the right channel.
Now we can choose this newly created sink (displayed as "myCombine") in audio settings to have the left channel unfiltered, and the right channel filtered with the LADSP filter from above.
In case we have more than two channels we will have to perform these steps for all channels, replacing each channel with filtered, or unfiltered signals to combine them again in the last step.


How can I uninstall the new Ubuntu One systray indicator?

You need to remove the indicator-sync package, then log out and back in.


Do I need a driver for pen and touch screen in Toshiba Portege M750?

You can Install kde-config-touchpad:

sudo apt-get install kde-config-touchpad

Depending on the version, you can choice between switch to on the corresponding buttom or mark a verification box for activate the touchpad. In this way, I solved a similar problem in my Eee PC 1001PXD Asus.


This is included in Shotwell .8, which you can get here.


set shortcut for executable program from terminal

You can use alias also. Add below line to the ~/.bashrc file.(gedit ~/.bashrc command will open file for the editing.) Then close and open a terminal.

alias eclipse='/home/<user>/Programs/eclipse/eclipse'

Then type eclipse to open Eclipse. You don't need ./ at the begining of the command.


Installing Ubuntu on a USB hard drive from a USB stick

You can do a Persistent install using Startup disk creator however a Full install has several advantages, it can be upgraded/updated, is more secure, and boots much faster than a Persistent install, also a Persistent install is initially limited to a 4GB persistence) file as it is FAT32. Persistence can be increased by using an ext2 partition named casper-rw to replace the casper-rw file.

Following is step by step for installing 13.04 on a 8GB flash drive on an Intel machine.

Turn off and unplug the computer. (See note at bottom)
Remove the side from the case.
Unplug the power cable from the hard drive.
Plug the computer back in.
Insert the flash drive.
Insert the Live CD or Live USB.
Start the computer, the CD/USB should boot.
Select language
Select install Ubuntu.
Select Download updates while installing and Select Install this third-party software.
Continue.

At "Installation type" select "Something else".
Continue

Confirm Device is correct.
Select "New Partition Table".
Click Continue on the drop down.

(Optional partition for use on Windows machine)
Click "Free space" and "+".
Make "Size:" about 1000 MB.
Select "Primary".
Location for the new partition = "Beginning of this space".
"Use as:" = "FAT32 file system".
And Mount point = "/windows".
Select "OK"

Click "free space" and then "+".
Select "Size:" = 5000 to 7000 megabytes, "Primary", "Beginning of this space", Ext4, and Mount point = "/" then OK.

(Optional home partition)
Click "free space" and then "+".
Select "Size:" = 1000 to 4000 MB, "Primary", Beginning, Ext2, and Mount point = "/home" then OK.

(Optional swap space, allows hibernation)
Click "free space" and then "+".
Select "Size:" = remaining space, (1000 to 2000 megabytes, or same size as RAM), "Primary", "Beginning of this space" and "Use as" = "swap area" then OK.

(Important)
Confirm "Device for boot loader installation" points to the USB drive. Default should be ok if HDD was unplugged.
Click "Install Now".

Select your location.
Continue.
Select Keyboard layout.
Continue.
Insert your name, computer name, username, password and select if you want to log in automatically or require a password.
Requiring a password to log in and selecting "Encrypt my home folder" are good options if you are worried about loosing your USB drive.
Select Continue.

Wait until install is complete.
Turn off computer and plug in the HDD.
Stick the side panel back on.

Note:
You may omit disabling the hard drive if, when partitioning you choose to install grub to the root of the usb drive you are installing Ubuntu to, (ie sdb not sdb1). Be cautious, many people have overwritten the HDD MBR.
You can revise grub later, if you wish.


No more access to Google Calendar from Evolution since upgrade to 3.6 (Quantal)

I can reproduce this issue on 12.10 as well (getting the HTTP Error: Not Found message when clicking on 'Find Calendars').

All I have is a workaround. You can delete your previously created calendar and create a new one. When you do this (selecting Type 'Google' and the primary Google account email address in 'User'), when you click on the Calendar drop down box, you should be able to enter your password and be presented with the calendar list from Google as you would expect.

I'm not sure why this doesn't work in the other screen (or Properties screen), but it works in the new account screen for me.


Upgrading to MySQL 5.7.15 crashes on Ubuntu 16.04

This solution solved my problem:

Back-up your database files with permissions:

sudo cp -avt /your/backup/directory /var/lib/mysql /etc/mysql/my.cnf

Delete mysql files:

sudo rm -rv /etc/mysql

Remove MySQL completely via running:

sudo apt purge mysql-server mysql-server-5.7 mysql-server-core-5.7 mysql-client-5.7 mysql-client-core-5.7

Use of Synaptic is recommended.
Create these folders:

sudo mkdir -p /etc/mysql/conf.d

mysql setup didn't do it automatically and I don't know why.
Install MySQL again

sudo apt install mysql-server

I used sudo apt install lamp-server^ instead to install other dependencies for PHP development.
Stop MySQL:

sudo service mysql stop

Restore databases and files:

sudo cp -a /your/backup/directory/mysql /var/lib
sudo cp /your/backup/directory/my.cnf /etc/mysql

Restart MySQL:

sudo service mysql start


Trying to Create a Partition for Storage

You're trying to resize the extended partition (/dev/sda2), which serves as a container for logical partitions. The partition you should be trying to resize is the logical partition (/dev/sda5). You could then either resize the extended partition and create a new primary partition or (better in most cases) create a new logical partition within the extended partition without resizing it. See here or do a Web search to learn more about the differences between partition types. Note that these distinctions apply only to the older Master Boot Record (MBR) partition table; the newer GUID Partition Table (GPT) doesn't draw these distinctions or have a 4-primary-partition limit. (I mention this mainly for completeness; you have an MBR disk and so are tied to MBR's rules.)

In addition, heed hmayag's comment about the fact that you're using an encrypted partition. You'll need to jump through some extra hoops to resize it safely.


Can't connect the second bluetooth headset ( Ubuntu 13.04 64)

You are perfectly right. There is no option in default Ubuntu sound settings to connect to more than one sink at a time.

Enable multiple devices in Bluetooth settings

To enable pairing and connecting to more than one audio device the settings file /etc/bluetooth/audio.conf needs to be edited (as root). Add/edit the following lines:

# Maximum number of connected HSP/HFP devices per adapter. Defaults to 1
MaxConnected=2

[A2DP]
SBCSources=2

Create an output sink for more than one device

Using the pulseaudio command line we are able to create a combined sink of more than one sink where audio output then is sent to both.

These are the steps involved:

Find the internal names for the attached sinks by issueing the following command in a terminal:

pacmd list-sinks

This will give us a rather long list of all available output sinks. Look out for a line similar to this for your bluetooth headsets:

name: <bluez_sink.xx_xx_xx_xx_xx_xx>

There are numbers instead of xx_xx_xx_xx_xx_xx as given above which correspond to the MAC of your headset. These numbers will be different for the both. Note down or copy paste the names of the Bluetooth sinks for creating the combined sink.
Load the pulseaudio module-combined-sink:

In a terminal issue the following commmand using the MAC numbers from above command (here exemplarily written as xx_xx_xx_xx_xx_xx, and yy_yy_yy_yy_yy_yy)

pacmd load-module module-combine-sink sink_name=combine sink_properties=device.description=myCombine slaves=bluez_sink.xx_xx_xx_xx_xx_xx,bluez_sink.yy_yy_yy_yy_yy_yy channels=2

Open Sound Settings from the Sound Indicator in the panel to find the newly created output sink we had given the name "myCombine":

Select this output device before you start your movie player and sound should be played on both devices.
Unfortunately this sink will be lost on log out. The steps above will therefore have to be repeated after every log-in or reboot.

Disclaimer: we were unable to test here if this really works because we only have one Bluetooth device at hand. What we could test however is that audio outputs to both, the default audio, and the headset after we created a combined sink.


Is there a way to tell which packages I've installed via apt-get, minus the auto-installed ones?

Apt keeps track of what is marked as auto-installed and what is marked as manually-installed. You can get the list of manually-installed packages with apt-mark showmanual.

Keep in mind that in addition to the things you manually-installed, this list will include things that the system marked as manually-installed in order to protect them from autoremove.

Synaptic has a nice graphical viewer with searching of the apt history log under File --> History. The history include packages you installed, the dependencies installed, and upgrades and packages removed.

The apt history log itself is in /var/log/apt/history.log


How to include extra applications in packages created with quickly?

Use the command quickly configure dependencies <dependency>


Best ways to keep ubuntu free from cluttering?

Ubuntu/Linux uses a journaling file system but there are userspace defragmentation tools, like Shake and defrag for ext3.

  Shake

Works by allocating space for the whole file as one operation, which will generally cause the allocator to find contiguous disk space. If there are files which are used at the same time, Shake will try to write them next to one another.

  Defrag

Works by copying each file over itself (so technically it is not defragging...). However, this strategy works only if the file system has enough free space. A true defragmentation tool does not exist for ext3.

However, modern Linux filesystems keep fragmentation at a minimum by keeping all blocks in a file close together, even if they can't be stored in consecutive sectors. Some filesystems, like ext3 and ext4, effectively allocate the free block that is nearest to other blocks in a file. Therefore it is not necessary to worry about fragmentation in a Linux system.

  ext4: Extent

ext4 uses extent so it has a new program e4defrag as part of the e2fsprogs. So it is possible to defrag ext4. But if you are thinking it will speed up your system you are wrong.

An extent is a contiguous area of storage in a computer file system, reserved for a file. When a process creates a file, file-system management software allocates a whole extent. When writing to the file again, possibly after doing other write operations, the data continues where the previous write left off. This reduces or eliminates file fragmentation and possibly file scattering too.

An extent-based file system (i.e., one that addresses storage via extents rather than in single blocks) need not require limiting each file to a single, contiguous extent.

More info at kernel.org


How can I get a list of files on my computer that are not "owned" by any package?

find /usr/lib -type f -exec dpkg -S {} + 2>&1 >/dev/null | sed -r 's/^[^/]+//'

I'll warn you now: it's slow.


Until there is a true background tasks/triggers/etc. API in Ubuntu itself this is probably not possible. It might hypothetically doable by creating a service that generates a push notification every hour and make your phone beep when it receives it, but I'm not sure if it is possible without adding a custom online account to the system image. Anyway it is kinda crazy idea and would be nothing more then a just-because-I-can solution.


I used Ubuntu Software Centre and searched on Artisan 837. Found Artisan 730 / Artisan 837 Series - Epson Inkjet Printer Driver version epson-inkjet-printer-201112w 1.0.0-1lsb3.2

Installed without plugging the printer in via USB and then followed with Add Printer after plugging it in. Printer installed with a successful Printer test page.


Menus of LibreOffice cannot be handled with KDE appmenu in Kubuntu 13.04

Remove libreoffice-gtk and install libreoffice-kde and libreoffice-style-oxygen.


Share file from Ubuntu to Windows 8.1 using network or Homegroup

Nathnael, in order to share with windows you need to use samba. Look at this tutorial. There are many other tutorials that are similar.

Samba Tutorial

Good Luck


How can I make Compiz and Metacity co-exist happily? I only have one or the other

Compiz and Metacity are both window managers. You cannot use two different window managers at the same time. However, windows' decoration is done by a window decorator, not a window manager. You can use, e.g., either gtk-window-decorator (which can match your previous MetaCity themes), or Beryl's own emerald window decorator, which was made to work with Compiz, and has lots of nice themes.

Whatever you choose, be sure to check the settings for Compiz's Window Decorator plugin. (Run CompizConfig Settings Manager or ccsm and enable that plugin, and choose either gtk-window-decorator or emerald for the command; perhaps adding --replace if it helps.)


Curtin error on autoinstall Ubuntu 20.04.1

The issue is caused when multiple network adapters are used. The issue goes away when only one NIC is used.


If you need to invoke a Bash script from Upstart, you can place the script in a file and invoke it through the exec stanza:

exec /bin/bash /path/to/my-bash-script.sh

If you place a suitable shebang (#!/bin/bash) at the script’s beginning and make the file executable you can even execute it directly:

exec /path/to/my-bash-script.sh


First generate a "modeline" by using cvt
Syntax is: cvt width height refreshrate

cvt 1680 1050 60

this gives you:

# 1680x1050 59.95 Hz (CVT 1.76MA) hsync: 65.29 kHz; pclk: 146.25 MHz
Modeline "1680x1050_60.00"  146.25  1680 1784 1960 2240  1050 1053 1059 1089 -hsync +vsync

Now tell this to xrandr:

xrandr --newmode "1680x1050_60.00"  146.25  1680 1784 1960 2240  1050 1053 1059 1089 -hsync +vsync

Then you can now add it to the table of possible resolutions of an output of your choice:

xrandr --addmode VGA-0 1680x1050_60.00

The changes are lost after reboot, to set up the resolution persistently, create the file ~/.xprofile with the content:

#!/bin/sh
xrandr --newmode "1680x1050_60.00"  146.25  1680 1784 1960 2240  1050 1053 1059 1089 -hsync +vsync
xrandr --addmode VGA-0 1680x1050_60.00


Libre Office menu does not show submenus automatically

The problem was solved by itself. I installed Libre Office 4.0.3.3. from official Libre Office PPA when problem appeared, but today Ubuntu Software Center found updates (!!!) and updated it to the same version I've already have (4.0.3.3).

After this, Libre Office shows submenus automatically, no delay...

I guess, installing software from other sources (such as Libre Office PPA) could cause such problems and it is better to wait for official Ubuntu updates.


How to change sound driver? (pulse -> oss)

Ubuntu has deprecated OSS support - the kernel no longer supports OSS devices.

  If you're considering using OSS4, you should probably use another
  Linux distro like Arch Linux

For legacy apps that insist on using a OSS device, you should look at using padsp which is the pulseaudio wrapper for OSS:

If application foo needs to use OSS devices, simply run: padsp foo.

It will emulate /dev/dsp and related devices, and redirect data between foo and these devices to PulseAudio.


How to mount a hidden NTFS WinRE which are on an external HDD

Windows Recovery Environment (WinRE) is a set of tools included in the Windows Vista, and newer operating systems to help diagnose and recover from serious errors that may prevent Windows from booting successfully. When this is installed, reboot and press F8 in order to boot into this Recovery Environment.  Therefore I don't think that it can be mounted, and even if it could it will not have any user data in it.


Ok - I don't know if You like it, but it is a somewhat solution:

create a text file PowerOff.sh (with gedit for example) and write there (if Your default shell is bash - if other You'll probably know what to do):

#!/bin/bash
sudo shutdown -h now

Click it with Your right mouse button and in proerties: allow to execute as program.

It would be comfy to copy this file in some hidden location (i mean not to leave it on desktop).

After that You need to modify a file /etc/sudoers:

sudo gedit /etc/sudoers

at the end of this file add:

user ALL = NOPASSWD: /sbin/shutdown

where user is Your user name f.ex. thonixx if that is how you log in Ubuntu

OK, now create an activator on Your panel, click it with right mouse button, and choose:add to panel ->  add activator -> your own activator -> type: program in terminal and choose Your created file PowerOff.sh

Now it should be possible to shutdown Your PC by clicking the activator on Your panel. if You wish You could even give it an icon of Your choice

In that manner You could possibly make other commands. Or even write a simple python wrapper to show a form letting You to choose if You want to reboot, shutdown, logout etc.
I gave You the solution without poping out the shutdown dialog, because You didn't really mention which shutdown button makes this errors. You could make identical solution using the command:

gnome-session-save --shutdown-dialog

in bash file instead shutdown. In such case You would probably not need to edit /etc/sudoers

Regards

PS: for now it looks like a bug in Unity. try to google: org.ayatana.bamf.view

a few links:

using logout dialog from terminal or bash script

how to logout

how to edit permissions

how to write scripts in python


For those who are having this problem too, I was able to solve it by getting a .nagstamon.conf from a centOS machine, just altering the username and password.

So to fix this, put the settings, credentials at the first screen of nagstamon as you usually do, after that, hit OK. It won't open, right ?

Now copy and paste somewhere the field username and password, configfile, debug_file and app_ssh_options something like:

username = eJwFwdEOaiAUANWP6iTEWfmo4VVg11NlL .. // and go on
password = aJwdawadsfcaErfdEtqWfdffaere .. // and go on
configfile = /home/username/.nagstamon.conf
debug_file = /home/username/nagstamon.log
app_ssh_options = -l username

Now, kill the process :

ps aux | grep nagstamon

Create a new .nagstamon.conf file in you home folder.

vim ~/.nagstamon.conf
chmod 664 ~/.nagstamon.conf

Now copy and paste this configuration below and replace the fields the fields mentioned above:

[Nagstamon]
connect_by_dns_yes = False
color_down_text = #ffffffffffff
notify_if_unreachable = True
statusbar_systray = False
app_ssh_bin = /usr/bin/gnome-terminal -x ssh
color_ok_background = #000064640000
filter_services_on_hosts_in_maintenance = False
default_color_ok_text = #FFFFFF
color_warning_text = #000000000000
update_interval = 1
color_unknown_text = #000000000000
default_color_warning_text = #000000
notification_custom_sound_warning = None
long_display = False
filter_acknowledged_hosts_services = False
color_unknown_background = #ffffa5a50000
debug_mode = False
notify_if_warning = True
filter_services_on_down_hosts = False
notify_if_unknown = True
default_color_critical_background = #FF0000
color_critical_background = #ffff00000000
notification_custom_sound = False
color_critical_text = #ffffffffffff
configfile = /home/<replace>/.nagstamon.conf
notification_sound = True
notification = True
debug_to_file = False
filter_hosts_services_disabled_notifications = False
filter_services_on_acknowledged_hosts = False
default_color_critical_text = #FFFFFF
notify_if_down = True
notify_if_critical = True
popup_details_hover = False
re_service_reverse = False
show_grid = True
re_service_pattern =
default_color_error_text = #000000
debug_file = /home/<replace>/nagstamon.log
app_rdp_options = -g 1024x768
color_warning_background = #ffffffff0000
unconfigured = False
color_unreachable_background = #8b8b00000000
default_color_unreachable_text = #FFFFFF
notification_custom_sound_critical = None
re_service_enabled = True
default_color_down_background = #000000
default_color_down_text = #FFFFFF
filter_hosts_services_maintenance = False
filter_services_on_unreachable_hosts = False
filter_all_warning_services = False
filter_all_unreachable_hosts = False
default_color_warning_background = #FFFF00
filter_all_down_hosts = False
re_host_reverse = False
color_ok_text = #ffffffffffff
popup_details_clicking = True
re_host_enabled = False
short_display = True
app_vnc_bin = /usr/bin/vncviewer
check_for_new_version = False
re_host_pattern =
position_y = 4
default_color_ok_background = #006400
position_x = 2164
default_color_unknown_background = #FFA500
notification_default_sound = True
app_ssh_options = -l <replace>
color_error_text = #000000000000
default_color_unknown_text = #000000
filter_all_unknown_services = False
icon_in_systray = False
default_color_error_background = #D3D3D3
default_color_unreachable_background = #8B0000
color_unreachable_text = #ffffffffffff
statusbar_floating = True
notification_custom_sound_down = None
color_error_background = #d3d3d3d3d3d3
notification_flashing = True
filter_hosts_services_disabled_checks = False
app_rdp_bin = /usr/bin/rdesktop
notification_sound_repeat = False
color_down_background = #000000000000
filter_all_critical_services = False
filter_services_in_soft_state = False
connect_by_dns_no = True
app_vnc_options =
[Server_Default]
username = <replace>
use_proxy = False
name = Default
nagios_cgi_url = <replace>
enabled = True
nagios_url = <replace>
proxy_password = <replace>
save_password = True
proxy_username = <replace>
proxy_address = http://proxy:port/
password = <replace>
type = Nagios
use_proxy_from_os = False

If there's any dobut, I will put my .nagstamon.conf below so you can see how it should look:

    [Nagstamon]
connect_by_dns_yes = False
color_down_text = #ffffffffffff
notify_if_unreachable = True
statusbar_systray = False
app_ssh_bin = /usr/bin/gnome-terminal -x ssh
color_ok_background = #000064640000
filter_services_on_hosts_in_maintenance = False
default_color_ok_text = #FFFFFF
color_warning_text = #000000000000
update_interval = 1
color_unknown_text = #000000000000
default_color_warning_text = #000000
notification_custom_sound_warning = None
long_display = False
filter_acknowledged_hosts_services = False
color_unknown_background = #ffffa5a50000
debug_mode = False
notify_if_warning = True
filter_services_on_down_hosts = False
notify_if_unknown = True
default_color_critical_background = #FF0000
color_critical_background = #ffff00000000
notification_custom_sound = False
color_critical_text = #ffffffffffff
configfile = /home/valter.silva/.nagstamon.conf
notification_sound = True
notification = True
debug_to_file = False
filter_hosts_services_disabled_notifications = False
filter_services_on_acknowledged_hosts = False
default_color_critical_text = #FFFFFF
notify_if_down = True
notify_if_critical = True
popup_details_hover = False
re_service_reverse = False
show_grid = True
re_service_pattern = ^OPS
default_color_error_text = #000000
debug_file = /home/valter.silva/nagstamon.log
app_rdp_options = -g 1024x768
color_warning_background = #ffffffff0000
unconfigured = False
color_unreachable_background = #8b8b00000000
default_color_unreachable_text = #FFFFFF
notification_custom_sound_critical = None
re_service_enabled = True
default_color_down_background = #000000
default_color_down_text = #FFFFFF
filter_hosts_services_maintenance = False
filter_services_on_unreachable_hosts = False
filter_all_warning_services = False
filter_all_unreachable_hosts = False
default_color_warning_background = #FFFF00
filter_all_down_hosts = False
re_host_reverse = False
color_ok_text = #ffffffffffff
popup_details_clicking = True
re_host_enabled = False
short_display = True
app_vnc_bin = /usr/bin/vncviewer
check_for_new_version = False
re_host_pattern =
position_y = 4
default_color_ok_background = #006400
position_x = 2164
default_color_unknown_background = #FFA500
notification_default_sound = True
app_ssh_options = -l valter.silva
color_error_text = #000000000000
default_color_unknown_text = #000000
filter_all_unknown_services = False
icon_in_systray = False
default_color_error_background = #D3D3D3
default_color_unreachable_background = #8B0000
color_unreachable_text = #ffffffffffff
statusbar_floating = True
notification_custom_sound_down = None
color_error_background = #d3d3d3d3d3d3
notification_flashing = True
filter_hosts_services_disabled_checks = False
app_rdp_bin = /usr/bin/rdesktop
notification_sound_repeat = False
color_down_background = #000000000000
filter_all_critical_services = False
filter_services_in_soft_state = False
connect_by_dns_no = True
app_vnc_options =
[Server_Default]
username = MG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYN=
use_proxy = False
name = Default
nagios_cgi_url = http://nagios.company.com/nagios/cgi-bin
enabled = True
nagios_url = http://nagios.company.com
proxy_password = MG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYN/f0C8W
save_password = True
proxy_username = MG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYN==
proxy_address = http://proxy:port/
password = MG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYNMG24QxTk8TYN ==
type = Nagios
use_proxy_from_os = False


unrar: An error occurred while accessing the archive

Open a terminal and do:

sudo apt-get update
sudo apt-get install unrar

Now you can actually extract it with:

unrar x -r /path/to/rarfile.rar


Did you end up here after running sudo startx? Nevertheless:

Press Ctrl+Alt+F3 and login into the shell.

Now run ls -lA. If you see the line

-rw-------  1 root root   53 Nov 29 10:19 .Xauthority

then you need to do chown username:username .Xauthority and try logging in (you may also need to do the same for for .ICEauthority).

Else, do ls -ld /tmp. Check for the first 10 letters in the left: they should read exactly so: drwxrwxrwt.

drwxrwxrwt 15 root root 4096 Nov 30 04:17 /tmp

Else, you need to do sudo chmod a+wt /tmp and check again.

If not both, I'd recommend you either

sudo dpkg-reconfigure lightdm
or uninstall, reinstall it.

Now press Alt+→ until you reach the login screen again, and restart.


Assuming you're on "regular" Ubuntu (not Xubuntu, Kubuntu, etc) you could try running

gksudo nautilus

in a terminal or launcher.

That will open the file manager with root privileges, and you can check Root's trash from there.

Also check to see if there are any hidden folders within /var/www/html/ -- Nautilus should have an option called "View Hidden Files" that could potentially reveal a .Trash or .Trash-1000 directory.

However, if your files are not there, I'm afraid that (barring more-complex file-recovery methods) you're out of luck, my friend... consider this a good opportunity to re-evaluate your backup strategy.

Please let me know if this answer was helpful or if you have any questions.

--Nick


Can I run compiz with specified profile from terminal?

No, you can't. So far, you can use ccsm with only one from the following four options:

-h (--help) - show the help message and exit
-p PLUGIN (--plugin=PLUGIN) -open ccsm to the page of PLUGIN. For example:

ccsm -p expo

-c CATEGORY (--category=CATEGORY) - open ccsm directly to CATEGORY. For example:

ccsm -c "Window Management"

-v (--version) -display the current version of ccsm and exit.

See man ccsm to check all of these.

Meanwhile, in your script, you can play with a command similar to the following:

(ccsm &) && sleep 2 && xdotool key Tab Tab Tab Tab Tab Tab Tab Tab Tab Tab Tab Return && sleep 2 && xdotool key Tab Tab Tab Tab Tab Tab Tab Return && sleep 2 && xdotool key slash p a t h slash t o slash y o u r underscore c c s m period p r o f i l e Return

You only need to adapt it to your system.


I searched the internet for google chrome three dots missing and found a possible reason for the three dots (⋮) being AWOL:

For some reason (see the link below), it may have morphed into the yellow round icon (with an upward-pointing white arrow) at the right-end of your address bar. Hover on that, you may even see a tooltip indicating that updates are available.

The following image is from  Three Dots in Chrome

More reading:

How do I reinstate the Menu (3 vertical dots)? …


Would Xubuntu Live USB boot and work if I removed the main drive from the laptop?

Computer with Only a Live USB and No HDD
Programs like Etcher, Win32DiskImager, dd, Gnome-Disks and Startup Disk Creator, create a USB with a ISO9660 read only operating system.
However, since 19.10, these programs do produce a inactive persistent partition named writable.
The drive will be persistent if while booting Shift is pressed, then Escape, F6 and Escape again, then a space is typed followed by persistent.
The drive will be booted persistent every time this procedure is followed while booting and will see the data that was there the last persistent boot.
The session will not be persistent if this procedure is not followed.
A writable partition on a ISO9660 drive can be changed to a NTFS data partition by running sudo mkfs.ntfs -f -L data /dev/sdx3 from a second Live USB or while booted toram. x3 is the drive and writable partition of the ISO9660 drive.
To answer the main question, an internal drive is not required when booting from a Live, (non-persistent) USB or from a persistent one.


Setting python IDLE as default editor for python scripts

After a few days of trial and error I found the answer to my question. I decided to post my solution to my question because it might help someone who is experiencing the same problem. Here are the steps that I followed.

Open the terminal crt+alt+t
Type gedit ~/.local/share/applications/mimeapps.list
Under [Added Associations] list add text/x-python=idle-python2.7.desktop;
The text/x-python=idle-python2.7.desktop; entry must be the first line of the [Added Associations] list
Under the [Default Applications] add text/x-python=idle-python2.7.desktopthis must also be the first line.
Note the [Default Applications] entry does not have a ; at the end
If you have python3 substitute idle-python2.7.desktop by idle-python3.4.desktop

What I'm yet to figure out is how to open a python3 script with the IDLE3 and a python2 script with IDLE2 in computers that have both python versions installed like mine. Currently with my solution both python3 and python2 scripts will open with the same IDLE. For example I have a scrip1.py which I programmed with python3 and script2.py which I programmed with python2 both of this scripts will open with the IDLE that a write on the mimeapps list. If i write text/x-python=idle-python2.7.desktop; they both open with IDLE2 and if i write text/x-python=idle-python2.7.desktop; and also text/x-python=idle-python3.4.desktop; IDLE3 will take preferrence and both script1.py and script2.py will open with IDLE3.
I Hope thats clear and if anyone can help me to solve this problem it would be much appreciated.Thank You


Ubuntu's Optimus management dropped bbswitch in 18.10, later backported to 18.04.
So you don't need it. The acpi calls are I think now supported by the kernel. .
If you use NVIDIA drivers, sudo prime-select Intel should turn off NVIDIA.
If it's  not working, it's a bug which you should report.. The Ubuntu devs take Optimus support seriously.


How do you change text color in LibreOffice Impress?

Found via searching menu bar Help > LibreOffice Help for 'color': Click View > Toolbars > Color Bar (scroll down; it is not alphabetized but rather at the bottom of the list), then with the text highlighted, click on the desired color panel in the bottom Color Bar (panel that appears beneath the slide).


How to write a script with nautilus actions?

You're in a directory with no mp4 files. When a glob pattern (like *.mp4) does not match any files, the pattern is treated as a literal string ("*.mp4")

In bash you do this to replace a pattern that matches no files with the empty string:

shopt -s nullglob

So, it seems that your script is not running in the directory you think it should be running in. You might want to add a echo $PWD line to debug.


There seems to be something wrong with peaq_wmi module. You can try to blacklist it (worked in Kubuntu 17.10):

sudo su
echo "blacklist peaq_wmi" >> /etc/modprobe.d/50-blacklist.conf

Reboot your machine and everything should be ok.
Hope this helps.

Found it here:
https://forums.opensuse.org/showthread.php/527307-Keyboard-repeat-problem


Empathy not able to sign into a SIP Account

Most everything is fixed in 12.04 recommend upgrading.

Press Alt+F2 and type in update-manager -d into the command box. Update Manager should open up and tell you:

  New distribution release ’12.04 LTS‘ is available


How to install VLC in ubuntu 12.04 64-bit?

The simple way is, open the Ubuntu Software Center and in the search box type "VLC". There you can find the player and and you can install it by clicking on "Install", but you need Internet connection to install it, I hope you have it.

Another way is using Synaptic. Open it and type VLC in the search box as you would do for the Software Centre. Among the search results, select VLC and it will automatically select the required dependencies and install them for you.

These are the simple ways.


Solution for 12.10

sudo apt-get install cifs-utils

Now you can use cifs in /etc/fstab instead of smbfs

Solution for 12.04

sudo apt-get install smbfs

Change cifs to smbfs in fstab listings.

Although it was primarily trial and error. This Ubuntu wiki page was highly useful and contains information about other common setups:

https://wiki.ubuntu.com/MountWindowsSharesPermanently


Removing popularity-contest without trashing the system?

Given that ubuntu-standard is a metapackage, removing it do not imply the removing of any other package, nor the removing of some functionality:

$ sudo apt-get --simulate purge popularity-contest
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  popularity-contest* ubuntu-standard*
0 upgraded, 0 newly installed, 2 to remove and 13 not upgraded.
Purg ubuntu-standard [1.245]
Purg popularity-contest [1.53ubuntu1]


Under your home directory, there you will see lots of hidden files and folders. You may see them with "ls -al" . Most of them are for your application settings. But as you did not specifically mention which application settings you want to backup, I offer you to backup them all. First, tar and gzip them and then you may send it to dropbox.


To fix this problem, make a dvd with the .iso with the latest version of ubuntu on it. Open the dvd. Click on the following: pool>restricted>b>bcmwl and drop the file on the desktop. Next go to pool>main>d>dkms and drop the file on the desktop. Both files should be .deb  Next open the terminal(Control Alt T). Type in the command:
cd ~/Desktop
and then:
sudo dpkg --configure -a
if there is an error, type the command:
lsof /var/lib/dpkg/lock
and then:
ps cax | grep PID
if it is running then type:
kill PID
wait
kill -9 PID
type this next:
ps cax | grep PID
then type:
sudo rm /var/lib/dpkg/lock
and finally:
sudo dpkg --configure -a
after typing that repeat:
sudo dpkg --configure -a
and finally type:
sudo modprobe wl
this will unlock your wifi. If it is still blocked by hardware switch, then type:
sudo rfkill unblock wifi
your wifi will be fixed. If not, look elsewhere for answers.


When you boot hold shift as soon as the Mainboard screen goes away to bring up the GRUB menu

select "Previous Version" from the menu
select the last version that worked

report back whether that works for you -- can make it a permanent change or flip back and forth until you can get -21 to work properly


Virtualbox won't start because of "retpoline"

Answer migrated from the question:

  Solved this by installing gcc-7:

sudo apt-get install gcc-7

  Then (probably not correctly) I created symbolic links to the 7 versions of gcc, gcc-ar, gcc-nm, and gcc-ranlib in /usr/bin.

  After verifying that gcc --version reported that it's version 7, I ran the following to recompile and install the vboxdrv module:

sudo /etc/init.d/vboxdrv setup

  And, viola!, it works.


Is it possible to setup multiple Virtual Hosts with one ip/domain?

You have at least two options:

Setup a virtualhost for a subdomain of example.com and direct it to your dev folder. Here's an example of a .conf file to put in sites-available:

<VirtualHost *:80>
DocumentRoot "/htdocs/www/dev/proj3/"
ServerName dev.example.com
<Directory "/htdocs/www/dev/proj3/">
allow from all
Options +Indexes
</Directory>
</VirtualHost>

Setup virtualhost for a different port, i.e. 8080 or whatever you choose, and point this to the dev folder.

<VirtualHost *:8080>
DocumentRoot "/htdocs/www/dev/proj3/"
ServerName example.com
<Directory "/htdocs/www/dev/proj3/">
allow from all
Options +Indexes
</Directory>
</VirtualHost>


Where are bluetooth received files saved

I found my BT transferred files in Home>Public


How can I script the settings made by gnome-tweak-tool?

Easily find out what is being set

Instead of searching through a whole directory of options:

Open a terminal window
Run the command:

dconf watch /

Make your changes and see what the terminal shows:

...and there you are.

Dconf & gsettings

In the example, you see the output from dconf. Gsettings is the cli- frontend to dconf. Many times, you can use both a dconf command or a gsettings command. In this case either:

dconf write /org/gnome/desktop/background/show-desktop-icons false

or:

gsettings set org.gnome.desktop.background show-desktop-icons false

If the gsettings key exists however, the latter is considered to be better practice, to protect the integrity of your dconf database.

See also here and here.


I can't connect to the internet wirelessly through xUbuntu

The Ubuntu living in you virtual machine doesn't connect directly to networks with the wifi card Windows uses.

The virtual machine "installs" another virtual network card for your virtual Ubuntu. In your virtual Ubuntu you should try to connect with a wired connection (eth0) that should be installed by default.

There are many modes for the handling of the virtual network connection for fine-grained controls (eg: allow connection with hosts on the lan but not to the net, only allow access to the net, etc.) but the default should work.

This tutorial http://rednectar.net/2011/07/20/vmware-interfaces-tutorial/ might help you.


Changing from Fahrenheit to Celsius in Weather Dash Plugin

Open your terminal (Ctrl + Alt + T) and run the following command to change the temperature unit to Centigrade:

gsettings set org.gnome.GWeather temperature-unit "'centigrade'"

As can be seen in the image below, temperature is now shown in Centigrades:

Alternatively, you can use dconf Editor  to change the temperature unit and all the other Weather settings from a single place.

Navigate through org → gnome → GWeather in the sidebar. Then, change the temperature-unit and other settings as per your liking.


The pixel saver applet for Budgie is not working. What might I be doing wrong?

The pixel saver applet has to be added to the top panel in desktop settings in order to work. I did not see it listed in those settings initially (not sure if I overlooked it or it wasn't there until after a reboot). Now that I have added it to the panel, it is working fine.


How to convert rmvb to mp4? (or, why ffmpeg doesn't work?)

The FFmpeg package you'll find on Ubuntu repositories does not contain libfaac for some silly licensing reasons. That's why you're having problems.

However you almost certainly don't need to transcode your audio in your specific case anyways (assuming you just want the audio to play at the same quality as the original, and not try tweakings) because the rmvb audio stream is probably already in aac format, which is what you need.

So you should simply substitute in your script this bit:

 -acodec libfaac -ab 128kb

for this:

-c:a copy

This will simply copy the audio stream from the rmvb file to the mp4 file, while converting the video stream. The resulting file will work perfectly.

However, if you wish to have your initial settings work exactly as they were laid out, and on Ubuntu, then you'll have to compile FFmpeg from source to add the missing codecs.

Follow this guide for compiling FFmpeg on Ubuntu:
http://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide

Here's a more authoritative explanation for the problem involving libfaac:
http://ffmpeg.org/trac/ffmpeg/wiki/AACEncodingGuide


how to connect to the Vino server desktop from the client-side?

I figured it out. the gsettings set org.gnome.Vino require-encryption 'false' command doesn't work in my ubuntu16.04 version and I had to install dconf-editor and setthe remote desktop encryption there. I used 129.254.xxx.yyy:0 to connect.
During a trial I wanted to mve the server to background so I pressed ctrl-Z (thinking I would give a 'bg' comand immediately) but this maded vnc connection stall. That's why I saw 'connection refused by the server' message.
So whey you start the server , place empersand at the end like /usr/lib/vino/ino-server &. Now I can use vnc for my new machine using Unity desktop environment. (That's why I started with vino)


Recover Error in downloaded file using wget

You will need to download a new DVD, I do not think you can recover with wget.

This is a great user case for using torrents ;) The torrent client will download the file in chunks which are then checksummed. If a single chunk is invalid, only that part has to be downloaded again instead of the whole file in case of a regular HTTP download.

FYI the DVD does not contain additional packages, it just contains additional language support, so unless you need the language support, the CD should be sufficient.

https://answers.launchpad.net/ubuntu/+question/24376


What does Ubuntu use for app status/tray icons?

Ubuntu ships a GNOME Shell extension called Ubuntu AppIndicators (package name: gnome-shell-extension-appindicator) which is activated by default in a standard Ubuntu session.

Note that this extension is a fork of the KStatusNotifierItem/AppIndicator Support extension.


I have same problem recently. I used following steps to solve the issue :

open terminal (use Ctrl+Alt+T or go to dash and type terminal)
sudo apt-get purge bcmwl-kernel-source
sudo apt-get update
sudo update-pciids
sudo apt-get install bcmwl-kernel-source
sudo reboot


Wifi cuts in Kubuntu 14.04 with RTL8723BE PCIe Wireless Network Adapter

wget -N -t 5 -T 10 https://www.kernel.org/pub/linux/kernel/projects/backports/stable/v3.18.1/backports-3.18.1-1.tar.xz

tar -xf backports-3.18.1-1.tar.xz

cd ~/backports-3.18.1-1

make defconfig-rtlwifi

make

sudo make install
Reboot and enjoy wifi


How do you keep the internal microphone switched on by default and accessible by apps?

I have a somewhat similar problem. My microphone does work, but once (and only once) did the microphone test (Sound -> Input) work. Also, the bar graph for that test is now much smaller in width than it was when it worked.
More info regarding microphone test (Settings -> Sound -> Input) in Ubuntu 18.04 with Gnome.

Test shows with bar graph approx. 14 cm wide on my screen. Bar graph responds when I talk into mic.
I exit Settings and then return to microphone test. This is the only change I make. Bar graph is now about 3.25 cm wide on my screen and it does not respond when I talk into mic.
I click on "Bluetooth" in Settings. It says "Bluetooth not found". I do nothing else.
I return to Sound -> Input. Bar graph is now about 5 cm wide and it does respond to my talking into mic.
I click on "Power" in Settings. I do nothing there.
I return to Sound -> Input. Bar graph is now about 14 cm wide (!) and it does respond to my talking into mic.


AMD and Resolve are not the best of friends, but it is doable. Sounds like you've done the Resolve install correctly - the issue here is that it can't see the GPU properly.
First up, you really need to use an offboard GPU. Integrated GPU's in the CPU aren't what Resolve is intended to use.
Next, if your AMD drivers are the latest and greatest already, you may have to rollback one or two versions.
If you are not the latest and greatest version, try upgrading to the next version (not necessarily the latest and greatest release).
You may also glean some further assistance from the Black Magic Design Linux issues discussion thread: https://forum.blackmagicdesign.com/viewtopic.php?f=21&t=56878


This may not be the solution you are looking for, but here are instructions on how to install the latest version of node.js on Ubuntu without needing any tar.gz files.

sudo apt-get update
sudo apt-get install python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs


Chances are that the firmware for your particular wireless card is not pre-installed with Ubuntu.  Try typing the following command from a terminal:

lshw -C network

If something comes up with information about your wireless card's chipset, then that's a good thing -- it means Ubuntu sees it and is able to identify it.

What you then need to do is find the firmware for your particular wireless card.  You can go to http://packages.ubuntu.com and type in the chipset name it gives you (this will be something like Atheros, Broadcom, IBM, etc.).  You will then be presented with a list of firmware choices.  Download one (this should be in the form of a .deb file) and save it to a USB drive.  Plug that USB drive into your system and try double-clicking it, which will install it.  Oh, and you will more than likely need to reboot in order for Ubuntu to load the firmware at startup.

If that particular piece of firmware doesn't do it for you, try one of the other choices that shows up when you type in your chipset name.

Hope this helps!

Fred in St. Louis


None of the peripherals(eth, USB ) working after upgrading to kernel version 3.8.5 in Ubuntu 12.04 LTS

Go through following steps to re-configure all the packages installed in you system.

Open the terminal and execute these commands one after other.

sudo dpkg-reconfigure $(dpkg -l | awk '{print $2}' | grep "^xserver" | tr '\n' ' ')
sudo dpkg-reconfigure -a
sudo update-initramfs -u
sudo update-grub

sudo dpkg-reconfigure -a would take some time approx. 5-10 minutes, bases on the packages installed in your system. So wait for it to finish. It won't give any error or message if executes successfully.
Then restart your system once. You can use following command to restart:

sudo reboot

Reply if all goes well or you get any trouble at any command or any error message.

Edit

Since it is confirmed that the kernel you installed doesn't support, I suggest you to install the kernel from the default Ubuntu Repository. Since you installed the kernel 3.8.x not from the repository but from other places, it would be the reason that you get that much trouble. You can install the same kernel version i,e 3.8.x from the repository in Ubuntu 12.04.

Since many have got similar issues, including me, I've already solved it before.
I'm providing the link that can help you:

Experiences major issues on graphics displays

Except 3rd step just go through it precisely. Reply if you get any trouble.


Amazon Web Service Wordpress Plugin cURL Error

I found the answer:
sudo apt-get install php7.0-curl


Avoiding user interaction with tzdata when installing certbot in a docker container

To run dpkg (behind other tools like Apt) without interactive dialogue, you can set one environment variable as

DEBIAN_FRONTEND=noninteractive

For example, you can set it in Dockerfile using ARG:

ARG DEBIAN_FRONTEND=noninteractive


Automatically get a file onto another computer?

I'm not sure if I understand, but I would suggest dropbox or google drive...,
to install google drive try http://www.webupd8.org/2014/04/10-things-to-do-after-installing-ubuntu.html it is long page so try find section 10. Other tweaks / things to install:

sudo add-apt-repository ppa:alessandro-strada/ppa
sudo apt-get update
sudo apt-get install google-drive-ocamlfuse

Once it's installed, you'll firstly need to authorize it with Google, by running the following command:

google-drive-ocamlfuse

then make folder where you want to have google drive synchronized and make this folder to sync with google drive:

google-drive-ocamlfuse ~/your-drive

~/your-drive is folder which will by synchronized


Problem with Ubuntu installation alongside WindowsXP

Note that you already have 4 partitions which is the maximum amount possible in the MBR partition table, so Ubuntu can't create another primary partition.

It would be able to create another logical partition inside your extended partition, but the latter is too small to install Ubuntu there.

So Ubuntu unstaller is literally out of options here :) You need to help it by shrinking your C: drive and then moving/resizing your extended partition to make it a bit larger. In the process you can even create an ext4 logical partition for your Ubuntu manually.

As I remember Ubuntu requires somewhere between 6 and 7 Gb of disk space to install.


How do I install utorrent on ubuntu 14.04 other instructions seem specific to older versions of the os

There isn't (yet) a 14.04 package from the µTorrent team.

Instead you have to work with the 13.04 package, which you can download from HERE.

make sure you have libssl installed:

sudo apt-get -y install libssl0.9.8

extract your downloaded tarball to /usr/local:

cd /usr/local && sudo tar -xzf /path/to/utserver.tar.gz

symlink that into place:

sudo ln -s /usr/local/utorrent-server-alpha-v3_3/ /usr/local/utorrent/

extract the webUI and set up the necessary subdirectories:

cd /usr/local/utorrent
sudo unzip webgui.zip
sudo mkdir maint torrents.queue torrents.active

copy and paste this example configuration file into /usr/local/utorrent/utserver.conf using your editor of choice (e.g. vim, nano, gedit):

dir_root: /usr/local/utorrent/
ut_webui_dir: /usr/local/utorrent/webui/
dir_active: /usr/local/utorrent/torrents.active/
dir_completed: /home/<userid>/Downloads/
dir_temp_files: /usr/local/utorrent/tmp
dir_autoload: /usr/local/utorrent/torrents.queue/
dir_request: /usr/local/utorrent/maint

You can now start µTorrent like this:

sudo utorrent -settingspath /usr/local/utorrent/

And connect to the webUI at localhost:8080/gui with admin and no password (change that immediately).

EDIT: 201405241343Z: replaced opt with usr/local as more idiomatic for debian/ubuntu


gtk header files libgtk2.0-dev package paths broken by install directory hierarchy

The proper way to solve this would be to add in -I/usr/include/gtk-2.0 as part of the compile command. However, ideally, this isn't directly included. Instead, the pkg-config tool can provide the CFLAGS to add and the libraries to link to (in the ld command) for the required libraries.

The libgtk2.0-dev package ships with 5 different pkg-config files: gtk+-x11-2.0.pc, gtk+-unix-print-2.0.pc, gtk+-2.0.pc, gdk-2.0.pc, and gdk-x11-2.0.pc. To use the gtk+-2.0.pc one, run pkg-config gtk+-2.0 --cflags to get the CFLAGS and pkg-config gtk+-2.0 --libs to get the flags for ld.


The hard disk is definitely set up for BIOS-style booting. Specific evidence of this includes:

The partition table is MBR. Although it's theoretically possible to boot in EFI mode from an MBR partition table, to the best of my knowledge Windows does not support this configuration. Certainly its installer doesn't; the Windows installer supports MBR-on-BIOS or GPT-on-EFI, but not MBR-on-EFI or GPT-on-BIOS.
There's no ESP on /dev/sda. (There are EFI boot files on /dev/sdb1, but that looks like a USB flash drive, not your regular boot disk.)
The Boot Info Script output identifies GRUB as being installed in the MBR of /dev/sda. This is consistent with a BIOS-mode GRUB installation.
The Boot Info Script output has identified /Windows/System32/winload.exe as a boot file on /dev/sda2. If this were an EFI installation of Windows, you'd see a reference to winload.efi somewhere.

Thus, whatever the source of the problem, it doesn't seem to have anything to do with EFI; it's a straight-up GRUB-on-BIOS problem.

The biggest clue I see is this, from the Boot Info Script output:

=> Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of
   the same hard drive for core.img. core.img is at this location and looks
   for (,msdos6)/root/grub on this drive.

Note in particular the reference to (,msdos6)/root/grub. Later in the Boot Info Script output, there's a list of boot files on /dev/sda6 ((,msdos6) in GRUB-speak). This list includes /boot/grub/grub.cfg, but there's no mention of anything in the root directory. In fact, the root directory (not to be confused with the / directory, whose name is pronounced "root") is the superuser's home directory, and it doesn't ordinarily hold boot files. Thus, I suspect that GRUB was mis-installed. Perhaps you used options to grub-install that you didn't mention and that were inappropriate, or perhaps there's a bug in the installation script. In any event, I recommend re-installing GRUB using the usual procedures for doing this on a BIOS-based computer. Note, however, that if your emergency system boots in EFI mode, that could create complications, so you should be sure to boot your emergency system in BIOS mode.

You can check your boot mode in Linux by looking for the /sys/firmware/efi directory. If it's present, you've booted in EFI mode. If it's absent, you've probably booted in BIOS mode (although there are conditions when that file will be absent even though you've booted in EFI mode).


Update brightness level depending on the power source on 16.04 LTS

Intro

The script below allows remembering brightness levels depending on the power source used by a laptop. It defaults to 50% on battery, 90% on AC.

Overview of options and usage

source_monitor.sh [-a INT] [-b INT] [-v] [-h]

-a set initial brightness on AC adapter
-b set initial brightness on batter
-v enable verbose output
-h prints this help text

Installation

Installation using git through terminal:

Run sudo apt-get install git to install git
Run mkdir $HOME/bin. Skip this step if $HOME/bin exists already
cd $HOME/bin
Run git clone https://github.com/SergKolo/sergrep.git
The script will be in $HOME/bin/sergrep/source_monitor.sh. Make sure the script is executable with chmod +x $HOME/bin/sergrep/source_monitor.sh
Add the script as a startup application. Look for Startup Applications menu in Unity Dash or Gnome search. Alternatively, run gnome-session-properties command in terminal to launch the menu. Add the full path to script as startup application so that it launches every time you log into GUI.

Alternatively, you can copy and save script source by oneself, chmod +x file, and go through the step #6 described above.

To make the script automatically start every time you log in to Gnome or Unity, use Startup Applications utility.

Script source

#!/usr/bin/env bash
#
###########################################################
# Author: Serg Kolo , contact: 1047481448@qq.com
# Date: June 18th 2016
# Purpose: Script that remembers and sets brightness
#      depending on power sources
#
# Written for: https://askubuntu.com/q/788383/295286
# Tested on: Ubuntu 16.04 LTS , Ubuntu Kylin 16.04 LTS
###########################################################
# Copyright: Serg Kolo , 2016
#
#     Permission to use, copy, modify, and distribute this software is hereby granted
#     without fee, provided that  the copyright notice above and this permission statement
#     appear in all copies.
#
#     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
#     IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
#     FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
#     THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
#     LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
#     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
#     DEALINGS IN THE SOFTWARE.

ARGV0="$0"
ARGC=$#
wait_ac_connect()
{
  while ! on_ac_power ; do : ; sleep 0.25 ; done
  $VERBOSE && echo "<<< adapter plugged in"
}

wait_ac_disconnect()
{
  while on_ac_power ; do : ; sleep 1.25 ; done
  $VERBOSE && echo "<<< adapter unplugged"
}

change_brightness()
{
  qdbus org.gnome.SettingsDaemon \
       /org/gnome/SettingsDaemon/Power \
      org.gnome.SettingsDaemon.Power.Screen.SetPercentage "$1"
}

get_brightness()
{
  qdbus org.gnome.SettingsDaemon \
        /org/gnome/SettingsDaemon/Power \
        org.gnome.SettingsDaemon.Power.Screen.GetPercentage
}

print_usage()
{
cat <<EOF

source_monitor.sh [-a INT] [-b INT] [-v] [-h]

-a set initial brightness on AC adapter
-b set initial brightness on batter
-v enable verbose output
-h prints this help text

Copyright Serg Kolo , 2016
EOF
}

parse_args()
{
 # boiler-pate code for reusing, options may change
 local OPTIND opt  # OPTIND must be there,
                   # opt can be renamed to anything
 # no leading : means errors reported(which is what i want)
 # : after letter means options takes args, no :  - no args
 while getopts "a:b:vh" opt
 do
   case ${opt} in
      a)  AC_PERCENTAGE="${OPTARG}"
        ;;
      b) BAT_PERCENTAGE="${OPTARG}"
        ;;
      v) VERBOSE=true
        ;;
      h) print_usage && exit 0
        ;;
     \?)
      echo "Invalid option: -$OPTARG" >&2
      ;;
    esac
  done
  shift $((OPTIND-1))
}

main()
{

    # default values, if -a,-b, or -v options given
    # they will be changed
    local BAT_PERCENTAGE=50
    local AC_PERCENTAGE=90
    local VERBOSE=false # for debugging

    parse_args "$@"

    while true
    do

      if on_ac_power ; then
         wait_ac_disconnect
          AC_PERCENTAGE=$(($(get_brightness)+1)) # too long to explain why +1
                         # just try it for yourself
          sleep 0.25
          change_brightness "$BAT_PERCENTAGE" > /dev/null
      else
          wait_ac_connect
          BAT_PERCENTAGE=$(($(get_brightness)+1))
          sleep 0.25
          change_brightness "$AC_PERCENTAGE" > /dev/null
      fi

      sleep 0.25

    done

}

main "$@"


Intel AX201 detected as AC9462. WIFI connectivity problems

Actually no, the proper firmware is loaded. Consult the drivers/net/wireless/intel/iwlwifi/cfg/22000.c, the IWL_QUZ_A_HR_B_FW_PRE macro. You'll see, that iwlwifi-Qu-b0-jf-b0- and iwlwifi-Qu-c0-jf-b0- are used for Intel Wireless-AC 9462 indeed.
I also experience the same problem with my MEDION® AKOYA® P17605, Intel® Core™ i7-10510U, Windows 10 Home, 43,9 cm (17,3") FHD Display, MX250, 512 GB PCIe SSD, 1,5 TB HDD, 16 GB RAM, Notebook, using latest 5.6.15 kernel on Ubuntu 20.04 LTS. Still striving to find a proper solution.
UPDATE 09/2020: With kernel 5.8, problem is still there. I start thinking about giving my laptop back for maintenance...


This sounds like a bug in the moonlight system, if you have tried deleting the settings for moonlight and it still doesn't work, please report the bug:

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


Creating shortcut to a network location on desktop

Say your server is an sftp server of the url ftp://myserver.com and your username there is myuser (works the same way for a regular ftp server or samba). You can open it with your regular nautilus file manager using nautilus ftp://myuser@myserver.com &.

The proceeding to do so in a .desktop file is basically as in 天使の's answer. You create a *.desktop file:

[Desktop Entry]
Name=Network(myserver)
Comment=Open ip in Nautilus
Exec=nautilus nautilus ftp://myuser@myserver.com
Icon=network
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;
OnlyShowIn=GNOME;Unity;
X-GNOME-Keywords=Network;myserver;
Name[en_US]=blubb

When you first connect to that server, you will be asked for a Password. Type in your password and click "Remember forever" in the password dialog.


Where should the tlp configuration file be found?

Since tlp 1.3, the previous default directory for the configuration file /etc/default has been replaced by /etc.
So you will find the file as /etc/tlp.conf rather than /etc/default/tlp.
Source : article on Linux Uprising website .
Still, if you can't find it just search the file in file manager in the root directory (only for read purpose - can't guarantee whether editing will change the configuration if found in non-default directory. But still you can try and test).


Lenovo G580 with trackpad issues on Ubuntu 13.10 64 bit

I have similiar problem with my lenovo thinkpad t400
after trying any other method I am remember that now ubuntu have many GUI based setting (after alot of hassle to install usb modem)
just do this :

click ubuntu setting icon (icon that looks like gear on the top right of ubuntu panel
click system setting
click/choose mouse touchpad under hardware
check if touchpad is disabled if disabled swift to on


Is there any Ubuntu twitter app that handles scheduled tweets?

There are some command line Twitter clients, like twidge or bti that you can use with at or cron the schedule tweets.


Screensaver on Ubuntu Mate 18.04 with 3 monitors

xscreensaver main screen:

From the Display Modes tab set the first field Mode to Same Random Savers.

As the tool-tip states:

  When idle or locked, chose a random display
  mode from among the checked items in the
  list below. Run that same mode on each
  monitor.


try this command vi /etc/mysql/my.cnf and check your mysql configure file is well written, I mean make sure no port conflict or spelling errors.

if you're not sure how to configure it well, just reset it to the default.

HERE IS THE DEFAULT FILE, JUST FOR REFERENCE!!!!

[client]
port        = 3306
socket      = /var/run/mysqld/mysqld.sock

[mysqld_safe]
socket      = /var/run/mysqld/mysqld.sock
nice        = 0

[mysqld]

user        = mysql
pid-file    = /var/run/mysqld/mysqld.pid
socket      = /var/run/mysqld/mysqld.sock
port        = 3306
basedir     = /usr
datadir     = /var/lib/mysql
tmpdir      = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking

bind-address        = 127.0.0.1

key_buffer      = 16M
max_allowed_packet  = 16M
thread_stack        = 192K
thread_cache_size       = 8

myisam-recover         = BACKUP

query_cache_limit   = 1M
query_cache_size        = 16M

expire_logs_days    = 10
max_binlog_size         = 100M

[mysqldump]
quick
quote-names
max_allowed_packet  = 16M

[mysql]

[isamchk]
key_buffer      = 16M

!includedir /etc/mysql/conf.d/


If I understand what you are saying then you need an application that enable you to zoom a video?!

For that you can use the amazing application VLC, install it if you didn't yet:

sudo apt-get install vlc

Now to enable zooming:

run your video using VLC
Click on the Tools menu > Effects and Filters.

Click on the Video Effects menu > Geometry.
Check "Interactive Zoom"

The VLC zoom option is enabled.
Move the rectangular selection tool to select the area you want to
zoom.
From there simply adjust the zoom level.


desktop weird behavior re. icons not displaying properly and drag and drop hanging the UI

it was not an issue related to the filesystem but to the poor handling of Desktop by 20.10
the solution was to use the extension
https://gitlab.com/rastersoft/desktop-icons-ng
BTW, I like tiny icons, so I had to redefine their size editing ./home/myname/.local/share/gnome-shell/extensions/ding@rastersoft.com/enum.js


Is there a way to increase performance by reducing image quality?

In YouTube you can reduce quality from the gear icon in its user interface. You could also try lowering display resolution in Monitor Settings.


I'd stick with ffmpeg. You weren't far off. Here's what I've just used to convert a load of 50-meg flacs to 5-meg m4as, complete with metadata:

find -name "*.flac" -exec ffmpeg -ab 192k -i "{}" -map_meta_data "{}.m4a":"{}" "{}.m4a" \;

You could expand that to clean up the original files or save them somewhere else (I was actually struggling with that bit).

For some reason, mine was crawling along at 190kbits/s so there might be a better encoding string (I should hope there is, this is a bit silly).


Window switcher appears randomly on any monitor in KDE

On my system (Ubuntu 16.04 Unity Interface) the Window Switcher appears on the monitor where the mouse pointer is. You could get the same features in 18.04 or others in 19.04 if the Unity Interface is installed:

How can I make LightDM the default display manager?

Of course this means abandoning KDE which you may not want to do!

Alternately, you can explore other Window Switchers via Gnome extensions:

Alternate Tab GNOME shell extension


Cannot add/edit/remove Startup Applications; Ubuntu 14.04 with Unity

I figured it out with the help of a number of random threads/questions around this site and the web with different but related issues.

Enter the following in the terminal (without quotes, and with your username):

sudo chown "yourusername":"yourusername" -R ~/.config

Use of sudo will prompt you for your password. Enter it (the terminal won't show anything while you do), then press Enter. Doing this grants permission to edit the ~/.config directory.
Enter the following in the terminal:

sudo rm -r ~/.config/autostart

Doing this first grants permission to, then removes the contents of the directory. Initially I tried running without sudo, but I was denied access and told Directory not empty.
Enter the following in the terminal:

rmdir -r ~/.config/autostart

Doing this removes the directory. If access is denied, try adding sudo before the command as in the previous steps.
Enter the following in the terminal:

mkdir ~/.config/autostart

Doing this recreates the directory you just deleted, only now you should have full permission over it. If access is denied, try adding sudo before the command as in the previous steps.
Use Startup Applications (in the Dash) or gnome-session-properties (in the terminal) to add an application to the startup applications.

Feel free to comment and correct me if I'm mistaken about anything. This is my (EXTREMELY LIMITED) understanding of what is accomplished by this process. Following these steps, I have had no problems adding/editing/removing applications using Startup Applications via the Dash or gnome-session-properties from the terminal. I have logged out and restarted, and the settings hold.


An equivalent of xkill is the windowkill function in xdotool. If you don't have xdotool installed, please run

sudo apt-get install xdotool

With this tool you can indeed kill a window by using the search option and by specifying its class:

xdotool search --class gedit windowkill

You can find the pid of the process with getwindowpid, but just specifying the name of the class of window (i.e --class gedit) is enough. The tool is non-interactive in the sense that you do not need to click on a window to kill it as you sometimes need to do with xkill.

More information on the options available with xdotool are available with man xdotool and at the Ubuntu manpages online. The manpages explain well how xdotool can be incorporated into a script much easier than xkill could be.

So I think probably xdotool's windowkill option is what you want and it may be more handy than that of xkill.

However, if you still want to use xkill and feed it the window's resource id, so that it closes the window without prompting you, you could parse the output of xwininfo, as in this example using the program Meld:

xkill -id $(xwininfo -name Meld | awk -F ':*"*' '{print $3}')

However, the name of the program sent to xwininfo must be in the proper case, so launch the program beforehand, and, in our example here, see if it is Meld or meld.

I prefer the xdotool command I gave above, as the case doesn't have to be correct: Meld or meld will work as the search --name switch instead uses regex to match a given string and ignores the case.


Ubuntu 12.04 LTS freezes entirely. what should i do?

You can take a look at systems logs located on /var/log/, mainly /var/log/syslog or /var/log/kern.log.

This is likely a fault in some hardware component or in some Linux driver module. If that's the case, you should find more information there.

There's a chance that you will only see the driver name, and you have to figure out what device corresponds to. Also, as your system is crashing badly, the logs might not be written on the hard disk on time, so maybe you will find nothing.

As this is happening frequently, just leave a terminal opened with the output from this command visible:

sudo tail -f /var/log/syslog

You will probably spot the problem that way.

When I have this kind of problems on desktops I always blame the wifi/networking devices, then the USB devices, then the graphical card, in that order. Then I freak out and run in circles.

If you suspect from some device, e.g. the computer always crashes when downloading a big file, or when playing a video, or when writing on a USB device, you can also try to not using it for a while and see if the system goes more stable. Once you've found the culprit, you can start trying to fix the problem.


Filesystem that gives an encrypted view of a directory—the inverse of EncFS

There actually is an Encfs "inverted" option. From the Encfs man page:

   --reverse
       Normally EncFS provides a plaintext view of data on demand.  Normally it stores enciphered data and displays plaintext data.  With --reverse it
       takes as source plaintext data and produces enciphered data on-demand.  This can be useful for creating remote encrypted backups, where you do
       not wish to keep the local files unencrypted.

       For example, the following would create an encrypted view in /tmp/crypt-view.

           encfs --reverse /home/me /tmp/crypt-view

       You could then copy the /tmp/crypt-view directory in order to have a copy of the encrypted data.  You must also keep a copy of the file
       /home/me/.encfs5 which contains the filesystem information.  Together, the two can be used to reproduce the unencrypted data:

           ENCFS5_CONFIG=/home/me/.encfs5 encfs /tmp/crypt-view /tmp/plain-view

       Now /tmp/plain-view contains the same data as /home/me

       Note that --reverse mode only works with limited configuration options, so many settings may be disabled when used.

I have not tried it for syncing, but I think it would work as long as you use the same .encfs5 config folder at the other end.


QML: What does i18n.tr("blah blah blah") mean?

The i18n portion is the component name, and the tr() function is the function to translate a string, in the Ubuntu SDK, with QML.

This method of translation support uses gettext, and not the built-in localization features of Qt/QML, which are not compatible with gettext.


The mysqld.sock isn't a regular file, but a socket used to connect to a running mysql instance. Because of Linux' Everything is a file philosophy, it presents like a file to te user.

A missing socket usually indicates that either the program creating that socket – mySQL or mariaDB in your case – isn't running (properly) or the program is not configured to create that socket.

You can check if mysql is running by issuing service mysqld status.

To check whether mysql is configured to create the socket you are looking for, open /etc/my.cnf with a text editor of your choice and look for a line like the following. It should be in the mysqld section of the file.

socket=/var/run/mysql/mysqld.sock


How do I change the OS name in the Boot menu - Windows bootloader?

I don't think this belongs on Ask Ubuntu as the bootloader being used actually belongs to Windows. You'd need Windows technical advice to do this.


The default apache page is only shown when you have apache installed on the target machine. It sounds like you're trying to access your own machine instead of the router.

Make sure you're accessing the default route ip address and not your own ip address. Example:

You can get to this by right clicking on the network icon and clicking "Connection Information"


Wine stopped working. How do I re-install w/o losing data

I'm on Ubuntu 12.04.4 LTS x86_64 with 3.11.0-24-generic kernel, wine-1.7.18.
I solved this issue by adding
echo 1 > /proc/sys/abi/ldt16
to
/etc/rc.local before exit 0 line. After reboot I can install win16 programs.


You do not need to convert the UCAC4 catalog in order to use it with Skychart. These catalog files are compatible for use within Ubuntu/Skychart as provided.

As you are probably aware, the catalog is available in three parts and can be downloaded from here.

Once you have downloaded the catalog, follow these steps:

Extract the file to your ~/Downloads directory.
Move the ucac4 and ucac4-streak folders to /usr/share/skychart/cat

sudo mv ~/Downloads/ucac4 /usr/share/skychart/cat/ucac4
sudo mv ~/Downloads/ucac4-streak /usr/share/skychart/cat/ucac4-streak

Follow the instructions here to add and activate the ACAC4 catalog within the Cartes du Ciel/Skychart application:

From within Skychart, open the menu Setup -> Catalog -> Catalog.

Click the Add button and select the file /usr/share/skychart/cat/ucac4/4uc.hdr.

Click on the first column to make catalog selection circle green.
Do not forget to save the default options.


You have done the WUBI installation. Wubi has some limitation. Wubi installs Ubuntu on a large virtual partition that is a single big file called the root.disk. In your case, this file seems to be 20GB and is located in the 100GB partition you created.

What to do?

Ubuntu has its own partition format ext4 and can't use the format used by Windows. To install Ubuntu in its own partition, you have to create a live DVD/USB and boot directly from the DVD/USB.

Before you boot from Ubuntu DVD/USB, you should delete the 100GB partition while you are in Windows. This will create 100GB free space that Ubuntu will recognize and create its own set of partitions in.

See the following links at Ubuntu.com for detailed instructions:

How to make Live DVD.

How to make Live USB.

Steps to install Ubuntu.

Also see:

Ubuntu installation on Windows7 with D partition

I have formatted a partition for Ubuntu. How do I install it on that partition?

Dual Boot Installation with Win7 - Install Ubuntu in New Partition

How do I install Ubuntu?

Hope this helps.


Learning terminal by observing commands being run by GUI

If you think whatever you do in your GUI has a terminal (CLI shell: bash, csh, ...) command associated with, and for example when using your file manager you go into a directory named foo, behind the seen something like $ cd foo would happen then you are wrong.
The GUI is a shell itself just like your CLI shell (say bash).
Both GUI and CLI use some kind of programming interface to talk to the kernel for handling your requests. Each have their own implementation and work their own way.
However, there is a high chance that whatever you do in GUI has an equivalent command in CLI. For knowing these commands you should read manuals, documentation and start working with CLI.


Pages not in correct order when printing

Open the print dialog. This can normally be done through Print in the menu or using the Ctrl+P keyboard shortcut.
Click the Properties… button
In the Orientation drop-down list, make sure that Landscape is selected.
In the Duplex drop-down list, select Short Edge.
Click OK to go back to the print dialog.
Under Range and Copies, choose Pages.
Type the numbers of the pages in this order (n is the total number of pages, and a multiple of 4):
n, 1, 2, n-1, n-2, 3, 4, n-3, n-4, 5, 6, n-5, n-6, 7, 8, n-7, n-8, 9, 10, n-9, n-10, 11, 12, n-11…
Examples:

    4 page booklet: Type 4,1,2,3

    8 page booklet: Type 8,1,2,7,6,3,4,5

    20 page booklet: Type 20,1,2,19,18,3,4,17,16,5,6,15,14,7,8,13,12,9,10,11

Choose the Page Layout tab.

Under Layout, select Brochure.

Under Page Sides, in the Include drop-down list, select All pages.

Click Print.

Source


I think the problem may be that you are trying to boot a device rather than a drive. These instructions may help.

Try running sudo blkid. This will give a list of the drives and their unique identifiers (UUID). The output will be something like... (there will probably be more)

/dev/sdb3: LABEL="extras" UUID="94b47b57-1f66-4e1f-8280-4b016c6c055e" TYPE="ext4"
/dev/sdb5: LABEL="backup" UUID="4b55b1c7-7219-48b4-a82f-b4affb4896df" TYPE="ext4"

find the UUID for the drive/partition you are trying to boot automatically and use this UUID in your /etc/fstab file. Also try mounting with default options. The line would look something like.....

UUID=<UUID> /media/media    <TYPE>    defaults      2 2

Replace <UUID> and <TYPE> with the options that were listed from blkid.

IMPORTANT: make sure /media/media exists

Good luck


How to partition harddisk for Ubuntu 18.04

You don't need to prepare in advance a partition for installing Ubuntu 18.04 as a single boot. The Ubuntu installer is able to create the partition for installing Ubuntu in either of two ways: automatically or manually. The default partition format for Ubuntu 18.04 is ext4. For new installations of Ubuntu 18.04 the Ubuntu installer will install Ubuntu by default in a single ext4 partition which contains a swap file instead of the old-fashioned swap partition.


Is there a way to edit/tweak the regional settings?

To change a single locale category, you can edit your ~/.profile file. Try adding this line to ~/.profile:

export LC_NUMERIC=en_US.UTF-8


How to use smbclient to connect anonymously to a server?

[1] The easiest way for me to reproduce your error is to try to access a subfolder of the share - as in smbclient //server/share/subfolder OR  smbclient //server/subfolder.

The sytnax is: smbclient //server/share

[2] When you use Connect to Server it mounts under /run/user/$UID/gvfs


Just do right click on panel , and click on add applet then add clock it will restore your clock and time


How to restore a single file from a package?

Download the package, for example transmission-daemon, with

sudo apt-get --download-only install transmission-daemon

unpack the package with

mkdir ~/dummy
dpkg-deb -x /var/cache/apt/archives/transmission-daemon_*.deb ~/dummy

restore the file, for example /etc/init.d/transmission-daemon

sudo cp ~/dummy/etc/init.d/transmission-daemon /etc/init.d

remove the dir

rm -rf ~/dummy


How to reset all brightness modifications?

I have uninstalled xbacklight. Things are fine now.

In the past, after upgrading my OS from Ubuntu 18.10 to 19.04, I had to install xbacklight in order to make my brightness button working. My guess is, later Ubuntu update fixed this, so I don't need xbacklight anymore.

If u want to keep xbacklight and have this issue, you can try this solution:

Go to /etc/default/ directory and edit "grub" file with "sudo" privilege. and edit try adding below words in this line GRUB_CMDLINE_LINUX_DEFAULT="quiet splash":

  "acpi_backlight= native"

  "acpi_backlight=video"

  "acpi_backlight=none"

Note: above line is written after "splash " word. Use 1 line at a time. See if it resolve the issue by rebooting the pc. Keep the changes if the one (i.e native, video, none) that is working.

If removing "acpi_backlight", works fines, u might don't need xbacklight anymore. Which is what I did.


Problem running tecplot2017 in Ubuntu 18.04

I encountered the same issue for the processor other than intel. As suggested by support, use ./tec360 -mesa to start the program instead of instead of ./tec360.


Is the Ubuntu phone filesystem mountable via a usb connection?

Ubuntu Touch lets you access the file system via the MTP protocol, but does not support USB Mass Storage mode.  In this respect, it is similar to newer Android devices and is unlikely to change.  Out of the box, you should be able to access files on the phone using any GVFS aware application.

There is a good reason why many smart devices have been moving away from mass storage mode as a way of performing file transfer: mass storage mode involves exposing a block device, while MTP exposes a file system.

Unless a file system is specially designed, only one OS should access the underlying block device at a time.  FAT is not designed for this use case, which is why older Android phones that supported mass storage mode would unmount the SD card before making it available over USB.

In contrast, with MTP the phone is the only thing accessing the underlying block device, and the connected computer instead makes file system level requests over USB (e.g. list directory, download or upload a file, etc).  This means you can continue to use the device while it is connected.


How do I update something in the Ubuntu repository?

Initially do Read this Packaging/ SourceBuilds/ GettingStarted guide

First Create a Launchpad account

Then proceed to ttytter Packaging branch , then Select the Version of Ubuntu you want to Contribute to .

Contact the “Ubuntu branches” team for Uploading your version to ttytter Packaging branch.

Create your New source package recipe - Precise for Example

NOTE : I am assuming they would allow you , otherwise as con-f-use in the above answer mentioned , create your own PPA , then Upload your package to PPA.

other Useful Links

How do I create a PPA?

How do I create a PPA for a working program?

Complete Ubuntu Packaging Wiki Guide


filezilla make fails with error "recipe for target 'all-recursive' failed"

I get the same results on my system while doing the following

sudo apt-get build-dep filezilla
cd ~/Downloads
tar -xf libfilezilla-0.21.0.tar.bz2
cd libfilezilla-0.21.0/
./configure
make
sudo make install
tar -xf FileZilla_3.47.2.1_x86_64-linux-gnu.tar.bz2
cd filezilla-3.47.2.1/
./configure
make

Also note that FileZilla_3.47.2.1_x86_64-linux-gnu.tar.bz2 binary from official site does not run on Ubuntu 18.04 LTS. As it built for newer Debian parent distribution.

But we have two alternatives

install FileZilla 3.47.2.1 as FlatPak

sudo apt-get install flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install flathub org.filezillaproject.Filezilla

install FileZilla 3.46.3 from third-party PPA:

sudo add-apt-repository ppa:sicklylife/filezilla
sudo apt-get install filezilla


Why crontab doesn't want to execute the job as root?

Solution

Here is the problem :

There is a awstats jobs setup on /etc/cron.d which is run with www-data.
This one is causing the problem cause www-data doesn't have access to /var/log/apache2

First you need to :

chmod o+rx /var/log/apache2

Next you need to change on /etc/logrotate.d/apache2

create 640 root adm

Into:

create 644 root adm

restart the service.

My /etc/crontab was working fine. But i prefer to run the script with a non root accound.


I was just wrong. The release incompatibility is the issue. It appears a post-install script was silently failing, which is why the missing file did not exist.

The solution turned out to be very similar to this question, which suggests running this script.

I made minor changes to the script, in accordance with a change to the default file locations for MongoDB 3.2.6. (The changes aren't strictly necessary. I just don't like cruft.) Previously, data files were located in /data/db/. The default location is now /var/lib/mongodb/, and the old location is no longer used at all. So I removed the lines in the script that refer to that path.

Ubuntu now uses systemd by default rather than Upstart, so /var/run/mongodb/ is no longer needed. I just commented out these lines rather than removing them. If you're still using Upstart for whatever reason, you'll need to uncomment the three lines that refer to this path.

The updated script looks like this:

# enable_mongo.sh

echo '[Unit]
Description=High-performance, schema-free document-oriented database
After=syslog.target network.target

[Service]
User=mongodb
Group=mongodb
ExecStart=/usr/bin/mongod -f /etc/mongod.conf

[Install]
WantedBy=multi-user.target' > /lib/systemd/system/mongod.service

# Setup the required directories
# mkdir -p /var/run/mongodb/
mkdir -p /var/log/mongodb/
mkdir -p /var/lib/mongodb/

# chown mongodb:mongodb /var/run/mongodb/
chown mongodb:mongodb /var/log/mongodb/
chown mongodb:mongodb /var/lib/mongodb/

# chmod 0755 /var/run/mongodb/
chmod 0755 /var/log/mongodb/
chmod 0755 /var/lib/mongodb/

# Start the new service and enable it on boot
systemctl --system daemon-reload
systemctl enable mongod.service

echo "Starting"
systemctl start mongod.service


Please I'm new to ubuntu 14.04 and i can't connect to wifi

Please try this workaround (not a fix):

After you boot the system, suspend and wake up. Now check if wifi
networks are detected or not.
I read this somewhere sometime ago, it works for my hp laptop.


Initial Purple Boot Screen is text not Image in 12.10

As long as your system boots and shows a GUI after this screen, you should be fine. With that said, you may not be able to access the tty's easily, so if a deep problem arises where you cannot use your graphical environment(or worse, if GRUB were to fail) then it is harder to diagnose it as the screen for GRUB prompts and the tty you can see with Ctrl+Alt+F1 may be unreadable. You can try pressing Ctrl+Alt+F1 to see whether you get a readable prompt to log in, and use Ctrl+Alt+F7 to return to the GUI. If you don't, you should be warned that recovery or TTY mode may be extremely difficult to use.

In a nutshell, it won't hurt anything, but if something breaks, it may be harder to fix it.


Run:

sudo apt-get install r8168-dkms

Then reboot your PC.


With Bluez and ofono you can achieve it.

I have tried it with bluez 4.x.
Not sure if it'll work with bluez 5.x.

https://bugs.freedesktop.org/show_bug.cgi?id=73325

First to make sure HFP is supported by the hardware.

$ sdptool browse local

This will list all profiles supported. It should show up something like:

Service Name: Hands-Free Audio Gateway
Service RecHandle: 0x10002
Service Class ID List:
  "Handsfree Audio Gateway" (0x111f)
  "Generic Audio" (0x1203)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 13
Profile Descriptor List:
  "Handsfree" (0x111e)
    Version: 0x0105

Service Name: Hands-Free
Service RecHandle: 0x10003
Service Class ID List:
  "Handsfree" (0x111e)
  "Generic Audio" (0x1203)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 7
Profile Descriptor List:
  "Handsfree" (0x111e)
    Version: 0x0105

Next step is to pair your phone with pc using bluetoothctl or GUI.
Now you need to check with ofono for modems. Here your phone acts as a modem. Goto ofono test directory and type

$./list-modems

Now it should list your phone in the list. Next enable it

$./enable-modem

Start calling your phone and you'll be able to get the voice to pc.


What package is a tool to check hard drive health

The package is called gnome-disks or gnome-disk-utility.


Touchpad 2 finger scroll ends with a right click, text marking lag

Reinstall the drivers:

sudo apt-get --purge autoremove xserver-xorg-input-synaptics && sudo apt-get install xserver-xorg-input-synaptics


password field to install programs using gdebi is disabled

There might be a problem with gksudo or even your theme; From what I can see in your screenshot you are getting "Incorrect password" message, remember that you should enter your own user's password not the root, both the gksu and gksudo work in --sudo-mode cause root user is disabled in Ubuntu by default.

Anyway you can always run gdebi from terminal:

sudo gdebi /path/to/your/package.deb

It should work for you.

You can also try this one for graphical gdebi installer:

sudo -H gdebi-gtk /path/to/your/package.deb

Another option is to use pkexec to run gdebi-gtk:

pkexec gdebi-gtk /path/to/your/package.deb

You can even use apt to install your deb package:

sudo apt install /path/to/your/package.deb

gdebi will install your desired package from terminal, and gdebi-gtk will show a GUI and you can use "Install package" option as always you do.


Skype in Linux: No device found for Audio, microphone, Camera

I had the same problem and tried many of the 'old' solutions in the blog posts. There is a very simple solution. Download Google Chrome internet browser, go to 'extensions' type SKYPE, and download the first SKYPE extension. An icon will appear on the Chrome toolbar for skype - click it! sign in... And... you're done ;-)


I upgraded the system and I forgot to remove the problematic package

When turning on your computer, you should get a grub screen that has the option to boot in safe mode.(*Here it is Advanced Options for Ubuntu *)

Select that and it would take you to a bare terminal with root privileges. You can then Run Timeshift from terminal


Ubuntu 14.04 userdel -f does not remove user

sudo deluser <USER_NAME> is the command you need to use to remove a user.


package installations are very slow in docker build

This is probably related to the ulimit for nofile.

You can check what your container get by running

docker run ubuntu:16.04 bash -c "ulimit -n"

Set this during build/run with

docker run --ulimit nofile=1024 ...
docker build --ulimit nofile=1024 ...

Or configure your docker daemon as described in the documentation.

I would recommend 1024 as a good starting point.
Tweak to your personal needs.

https://docs.docker.com/engine/reference/commandline/run/#set-ulimits-in-container---ulimit

  Note that there is a bug that preventes you from setting the default-ulimits in the daemon.json file prior to Docker 1.13.
  You need to use the --default-ulimits command line option when launching the daemon for docker versions prior to 1.13.


Invalid desktop entry file error - midi2input

You have not specified the full path of the executable.
You have only put:
Exec=/usr/local/bin/

See the documentation on Desktop Entry Specification - GNOME Developer

Exec
Program to execute, possibly with arguments. See the Exec key for
details on how this key works. The Exec key is required if
DBusActivatable is not set to true. Even if DBusActivatable is true,
Exec should be specified for compatibility with implementations that
do not understand DBusActivatable.

Not to be confused with:

Name
Specific name of the application, for example "Mozilla".


Want to give Ubuntu 18.04 more disk space -- dual XP boot

You have several options (IMHO), some more advanced than others:

  Backup your data!!, as @sudodus commented "In any case, editing partitions is risky, so you should have a good and current backup of everything you cannot afford to lose before starting on this adventure"

Get rid of windows xp (do you really need it?), wipe your disk, and make a fresh install of Ubuntu in your HDD.
Format your second NTFS partition, which is larger, to EXT format, and mount /home in it.
Use your second NTFS partition, and make a fresh install of Ubuntu in it. Merge the last partitions, (except the FAT one, which may be aercovery partitin used by windows?) in the format you prefer.
Wipe your disk and install windows 7/10, given that you have modern hardware, and then install Ubuntu alongside it.
Other options available depends on what you actually need from your systems.

  You can always make a backup image of your disk with clone tools like
  clonezilla, so you can retrieve your system to it's previous state.

And you can always come back here to ask new questions.


Why is my Hard drive recognised as removable?

You have to enter your 2nd hard disk information to /etc/fstab file. Then your 2nd hard disk will be treated by internal hard drive.

Just go for following step:

First take back up of /etc/fstab and unmount all 2nd HDD partitions

sudo cp /etc/fstab /etc/fstab.backup
sudo umount /dev/sdb*

Execute following command to get your 2nd HDD UUID information that will help you to configure /etc/fstab file.

sudo blkid

Search for your 2nd hard disk UUID of all partitions. Your 2nd HDD partitions shouls be displayed like: /dev/sdb1: LABEL="Backup" UUID="00A0CE7EA0CE7A24" TYPE="ntfs" and so on. It is just an example but format will be same.
Now copy the UUID of the partitions of 2nd HDD which you want to insert in /etc/fstab file.
Now open /etc/fstab file and insert entry for your HDD partitions on the last line of /etc/fstab file. Take help from previous entry, for format etc:

sudo gedit /etc/fstab

When opened your entry would be like this:

UUID=<your_UUID_for_2nd HDD partitions> /media/<location_where_you_want_to_mount>             ntfs    errors=remount-ro 0

Just an example:

UUID=00A0CE7EA0CE7A24 /media/Backup               ntfs    errors=remount-ro 0
Now create location where to mount your 2nd HDD partitions. Create a folder for each partitions to mount. For example:

sudo mkdir /media/Backup

Then execute this command once finished:

sudo mount -a

You can refer this link for further help: Auto mounting with /etc/fstab
Hope it works for you..