Why there are resolvconf.service and systemd-resolved.service services present in ubuntu at the same time

I was investigating why the documentations for NetworkManager, systemd-resolved, and resolvconf are all inconsistent with regards to how Ubuntu does DNS.

It appears that Ubuntu uses both resolvconf and systemd-resolved together to handle DNS resolution, which I discovered in a small comment on a GitHub issue:

  /etc/resolv.conf -> /run/resolvconf/resolv.conf

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.

nameserver 127.0.0.53 search lan

The top comment in the Github PR that fixes that above issue states that this behavior is the default for systemd-resolved and resolvconf on Ubuntu starting on 17.10+:

  ... It is used by default on Ubuntu 17.10+


My router settings as so:

Router Status
Hardware Version    WNR1000v2
Firmware Version    V1.0.1.1NA
GUI Language Version    V1.0.0.35
Internet Port
MAC Address     C0:3F:0E:8B:4D:05
IP Address  192.168.0.16
Internet    DHCP
IP Subnet Mask  255.255.255.0
Domain Name Server  64.59.144.18
64.59.150.134
LAN Port
MAC Address     C0:3F:0E:8B:4D:04
IP Address  192.168.1.1
DHCP    ON
IP Subnet Mask  255.255.255.0
Wireless Port
Name (SSID)     NETGEAR
Region  United States
Channel     Auto ( 2(P)+6(S) )
Mode    Up to 150 Mbps
Wireless AP     ON
Broadcast Name  ON
Wi-Fi Protected Setup   Not Configured

with the IOGear Universal Wi-Fi N Adapter connected to the yellow "internet" port on the router.  Now, it was a bit tricky configuring the IOGear device and I don't have the details, but in general it was as so:

Access Point Status
This page shows the current status and some basic settings of the device.

System
Uptime  0day:0h:22m:34s
Firmware Version    AC1x1-1201-B03
Build Time  Thu Jun 23 17:42:14 CST 2011
Wireless Configuration
Mode        Infrastructure Client
Band        2.4 GHz (B+G+N)
SSID

425BF3

Channel Number      11
Encryption      WPA2
BSSID   70:54:d2:36:b7:05
Status  Connected
Wireless Configuration
Mode        Infrastructure Client
Band        2.4 GHz (B+G+N)
SSID

425BF3

Channel Number      11
Encryption      WPA2
BSSID   70:54:d2:36:b7:05
Status  Connected
TCP/IP Configuration
Attain IP Protocol  Fixed IP
IP Address  192.168.1.252
Subnet Mask     255.255.255.0
Default Gateway     0.0.0.0
DHCP Server     Disabled
MAC Address     00:21:79:c6:5a:de

Which is quite odd because the Default Gateway is 0.0.0.0, which makes no sense.  I even tried setting the gateway as so:

thufir@dur:~$
thufir@dur:~$ cat /etc/network/interfaces.static
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.252

# The secondary network interface
auto eth1
iface eth1 inet dhcp
thufir@dur:~$

as /etc/network/interfaces but even after doing so, and running service network stop and then start, just couldn't get the default gateway to a non-zero address.

Magically, or seemingly so, just moving some ethernet cables around for some double-NAT action, now the IOGear supplies the internet connection for the router, which the computer connects to.

Strange.  I welcome comments, suggestion and alternate solutions.

Hmm, seems that the router is automagically configuring itself for a static IP address -- although that address might change when the IOgear device is booted (I'm not sure about that):


Bi-directional synchronization of folders on two (or more) machines

I can think of three options.

Zeroth, is Ubuntu One. It is similar to Dropbox but has more free space and better integration with Ubuntu. For example, you can sync any folder, as long as you have the same folders in each computer. (Ubuntu One is no longer available).

First, is Unision. It is a local network solution and involves more manual intervention. You can run Unision "server" at the server end and "clients" on the laptops. When you are on your "homebase" network you will have to run Unison on the laptop to sync the files at login and before shutdown of each laptop. Unison is available on the Software Center.

Second, rsync / grsync. Rsync is a command line tool for synchronizing files and directories in "Unix-like" systems. The best way to use it is to write a script and set it to run automatically at login and before shutdown on the laptops. Grsync is a GUI for rsync that makes choosing various options a bit easier.

Hope this helps


There is no need to install any drivers. Intel drivers are installed in Ubuntu by default and are regularly updated through routine system updates.

If you installed Ubuntu 14.04, not 14.04.2, you can upgrade the graphical stack including the Intel drivers and the kernel by running:

sudo apt-get install --install-recommends linux-generic-lts-utopic xserver-xorg-lts-utopic libqt5gui5 libgles1-mesa-lts-utopic libgles2-mesa-lts-utopic libgl1-mesa-glx-lts-utopic libgl1-mesa-glx-lts-utopic:i386 libglapi-mesa-lts-utopic:i386 libegl1-mesa-drivers-lts-utopic


How do I override an MTU provided by DHCP?

Edit the interfaces file to set the mtu when the interface comes up:

$ sudo vi /etc/network/interfaces

Edit the file so it includes the post-up line:

iface eth0 inet dhcp
    . . .
    post-up /sbin/ifconfig eth0 mtu 1500


Qt apps are very slow to load in Xubuntu 20.04 when export QT_QPA_PLATFORMTHEME=gtk2 is enabled

The startup speed of qt applications in clean installs of GNOME-based, 19.10+ versions of Ubuntu, its official flavors and derivatives is much longer if one tries to style them to appear consistent with native GNOME applications.

See

Why does forcing Qt applications to use GTK theme makes those apps startup slowly?
QT Applications very slow to open on fresh install of 19.10 #712 and
"7. Fix Qt5 applications style under GNOME Shell on Ubuntu 20.04" in Top Things To Do After Installing Ubuntu 20.04 Focal Fossa To Make The Most Of It

For whatever reason, users who upgrade from 19.04 don't see this problem.

Anyway, one satisfactory workaround is based on using Kvantum. See, for example, Use Custom Themes For Qt Applications (And Fix Qt5 Theme On GNOME) On Linux With Kvantum.

As described in the preceding link, since Kvantum isn't installed by default, it can be installed on 20.04 using

sudo apt install qt5-style-kvantum qt5-style-kvantum-themes

A ppa is available:

sudo add-apt-repository ppa:papirus/papirus
sudo apt update
sudo apt install qt5-style-kvantum qt5-style-kvantum-themes

After that, run

echo "export QT_STYLE_OVERRIDE=kvantum" >> ~/.profile

Log out and log back in. The link also has instructions for using Kvantum system-wide (with export QT_STYLE_OVERRIDE=kvantum in /etc/environment) and for uninstalling it.


12.04 HWES OEM won't upgrade, new HP455 laptop

I have since solved this problem.

If you look in the proprietary drivers list, you will see a driver that is enabled that prevents loading of invalid fglrx drivers.

If you deactivate this, then reboot, the Security and Hardware support package will install.


It turned out that I did not have /etc/ld.so.conf, so the library directories referenced from /etc/ld.so.conf.d were not added to /etc/ld.so.cache. After creating /etc/ld.so.conf:

include /etc/ld.so.conf.d/*.conf

The errors are gone.


Cannot update: "installation or removal of a software package failed."

Instead of trying to uninstall dropbox I would try the following, one at a time

sudo apt-get install -f
Open Software sources find the dropbox lines under the Other Software tab and disable them. Then try sudo apt-get update.
If this fails too, then try sudo apt-get install -f again with the
dropbox ppa diabled.


Compiz and drag behavior after "snapping"

There is a workaround for this. Fire up CCSM (thats compiz config settings manager, you might need to install it via the Software Center).
Go to Snapping Windows -> Behaviour and untick Edge Resistance.


Failing to initialize Nvidia GPU Geforce GTX 650 Ti

Probably the best thing to do is install the Bumblebee. Generally it solves all the nvidia drivers issues in a "smooth way".


Make sure your hardware (video card and ram) are seated correctly in your motherboard. If you can, create a second live USB, perhaps with a different version of Linux and see if you can boot from that.


Changed 'txt.cfg' file in a lubuntu live usb and now its 'read only'

Ok, done.

When the Try Lubuntu without changes screen start, choose language and then, before select any option, press F6. A little window with 'boot options' will pop-up. Esc, an then the append line of txt.cfg will be there, and you can edit it. Simple write persistent there. Something like this:

file=/cdrom/preseed/lubuntu.seed boot=casper persistent initrd=/casper/initrd.lz quiet splash noprompt locale=pt --

After that, the system boots with my old persistence, wirelles passwords and everything saved and just like before.
So you'll be able to modify the txt.cfg file again. Simple write persistence again and it will be fine.


sudo modprobe b43 not working in ubuntu 13.04

I believe b43, ssb and firmware are correct for your device 14e4:4318. I wonder if the wrong driver was installed and not removed or at least removed incompletely. Please open a terminal and do:

sudo apt-get remove --purge bcmwl-kernel-source

Let's be sure there are no blacklists:

gksudo gedit /etc/modprobe.d/blacklist.conf

Look for any lines about b43 or ssb; if there are any, remove them. Proofread, save and close gedit. Reboot and if your wireless is not working as expected, post:

dmesg | grep -e b43 -e wlan


Use the Windows 8 Bootloader for dual boot instead of GRUB

Open command prompt with administrative privileges form Windows 8.1. Type following command

bcdboot C:\Windows

C is drive letter where your Windows 8.1 is installed. If it is installed in any other drive replace the drive letter accordingly. Then reboot the system.

The above command replace the boot files with the ones from Windows 8.1

After the reboot if Ubuntu is missing from the bootloader use EasyBCD and add entry for Ubuntu as Grub2 and leave all other fields to default and click Add entry.


I had a similar problem with my notebook. My solution was to purge compiz: sudo apt-get purge compiz* After the restart, I could simply log in (there was a problem with the video driver).

X vs gdm:

X contains the whole graphical subsystem, basically it does the communication with your hardware
GDM is the Gnome Display Manager, it manages the graphical sessions. It is like the tty, creates a new session, and you log in with a user+pass, but with graphics. Similar tools are kdm, lightdm, xdm.

Sorry, I don't know how to check whether gdm and X is installed. You can restore the full working desktop with all the packages sudo apt-get install ubuntu-desktop and then remove the unwanted in the next step


Nautilus: Remotely accessed files are wrongly mounted in a temp dir

I find an old related article

Try to install gvfs-fuse:

apt install gvfs-fuse

And unmount and remount your sftp in your nautilus.

If that still doesn't work, try to manually start virtual mount with specific directory:

/usr/lib/gvfs/gvfsd-fuse $XDG_RUNTIME_DIR/gvfs


Weird colors after installing KDE Plasma [on Chrome browser]

not sure if this is the best solution for this, but I disabled:
Color correct rendering in chrome://flags/ and now colors look good.


How to make icons on XFCE panel work like in Windows?

I'm afraid XFCE doesn't have widget with this functionality. You have either a launcher or a switch widget here. But you can use software like Plank or something similar, to get what you want.


I talked to Ted Gould, the indicator-datetime author about this:

It would be easier to do as a patch next release.  We're going to make adding custom dbusmenu items easier. We still need to work out the details, but basically we're looking to have a set of items that can be loaded by the panel service instead of having them hard coded in the indicator .so's
This makes it so that you can build them and test them reasonably on their own. But also so that app developers could make them, install them in the right directory, and then use them.
Yeah, there's still a lot of details to work out.  But I'm hoping to land that in O.

So long story short, Ted is looking for someone to make this happen, and unfortunately we don't have anything for 11.04. The code is here and if you can find someone to get involved that would be even better. I'd be more than happy to point a contributor to the right resources if someone is interested.


Here is a workaround for this problem...

Step 1

Install xdotool...

$ sudo apt-get install xdotool

Step 2

To start empathy in hidden mode just for yourself...

$ mkdir -p ~/.config/autostart
$ cp /usr/share/applications/empathy.desktop ~/.config/autostart
$ gedit ~/.config/autostart/empathy.desktop

...OR....

To start empathy in hidden mode for all users...

$ cp /usr/share/applications/empathy.desktop /etc/xdg/autostart
$ sudo gedit /etc/xdg/autostart/empathy.desktop

Step 3

In section [Desktop Entry]

Replace...

Exec=empathy

With...

Exec=sh -c 'empathy & xdotool search --sync --onlyvisible --class "empathy" windowmove 25 25 windowunmap'

Finally, save your changes; log out and log back in.  You will see the Empathy window "flash" for split-second and then it will disappear.  Empathy will continue to run in the background, and you will be able to open the Empathy contacts window (from the unity indicator) whenever you want.

Note: If you don't like the command line, install xdotool using the Software Center.  Then use the Startup Applications GUI from the Dash to to create a new launcher called "Empathy," and enter the following as the command: sh -c 'empathy & xdotool search --sync --onlyvisible --class "empathy" windowmove 25 25 windowunmap'.


wifi is connected in ubuntu but internet is not working

Click on Network Manager>

Click 'Edit'

Edit the wireless connection>

Click the IPv6 tab>

Set IPv6 to ignore>

click OK>

Reboot.


How can i create unity launch icon for Chrome Evernote?

I have found an answer myself.
Open your desired web page tab in Google Chrome.
Then click Wrench - Tools - Create Application Shortcut. Choose Desktop and Applications.
Then go to Desktop, you will see web app link there, drag&drop it to Unity.
You can also change its icon by clicking right click-icon.


dpkg:error:parsing file '/var/lib/dpkg/status' near line 1146 package 'python-minimal'

It looks like there is a typo in the Python post-installation script. This may have been caused by an Internet error of some kind...

Try this:

(Press CTRL-ALT-T for the Terminal)

sudo apt-get purge python-minimal
sudo apt-get update
sudo apt-get install python-minimal
sudo apt-get upgrade

If that doesn't work, then try using Aptitude instead of apt-get.

If that doesn't work, comment and tell me what's going wrong.


How can i keep icons aligned both horizontally and vertically?

I wrote iconic to solve this problem by letting you define a grid to evenly space icons. Additionally it will:

Allow you to move icons to any of three monitors
Not suffer the "lost icon syndrome" that occurs when monitors of multiple resolutions are used
Sort icons alphabetically, alphabetically with "Link to" prefix ignored, sort by modified date ascending or date descending
Allow different grid size (columns x rows) depending on monitor, EG more on 4K monitor than 2K monitor
Instant Test button for quick experimentation on column x row changes or reserved space changes for monitor left, top, right or bottom areas
Test button will last for x seconds defined by you, clear all windows before test and restore them after test
Bash script for easy modifications

You can get the script on github.

Here's the main screen:

Visit the github page for iconic to see all the other screens, explanations and a copy of the script.


Ubuntu 14.04 mounts external USB drive on boot with option "noauto" in fstab entry

Nautilus can automount USB media using udisks.

Check

gsettings get org.gnome.desktop.media-handling automount

If true, disable it.

gsettings set org.gnome.desktop.media-handling automount false

BTW, There is a graphic tool called dconf-editor that let you search through dconf settings. It may help find out what want is such similar case.

Install it

sudo apt-get install dconf-editor

Launch it → Ctrl+f
Enter: automount then Enter

It is an exact search tool. If you can't find anything try to search for other possible option: auto_mount, auto-mount ...


Why does my Live-USB fail to boot with "Syslinux..."?

Make sure you have in the bootable usb a folder called syslinux and not isolinux. If so, rename it and change isolinux.bin to syslinux.bin and isolinux.cfg to sysinux.cfg;  you'll find them in the syslinux folder.


Setting up LetsEncrypt renewal on Ubuntu

I had to set up

acl letsencrypt-acl path_beg /.well-known/acme-challenge/
use_backend letsencrypt-backend if letsencrypt-acl

On the non-ssl front end


Ubuntu 13.10 not usable because of focus problems

I've encountered the exact same behavior over multiple installs on my current hardware. What consistently solved it for me was killing and restarting the x server. A system restart was never sufficient, the glitch persisted after a vanilla reboot.
The method I employed was to first enable ctrl+alt+backspace to kill and restart the x server: http://www.humans-enabled.com/2013/10/ubuntu-1310-enable-controlaltbackspace.html

1.) Hit Control+Alt+t to launch the terminal
2.) Type or paste in the command below into the terminal, hit enter, then authenticate with your user password necessary (below is a one liner):

sudo dpkg-reconfigure keyboard-configuration

3.) Hit enter 5 times, or as necessary, to accept the already-set values for the keyboard settings and arrive at the screen to change the behavior for "Control+Alt+Backspace" (see picture above).
4.) At the screen that says, "Use Control+Alt+Backspace to terminate the X server?", hit the left arrow key to select yes, then hit Enter to save the setting and complete the kbd configuration.

Once done, fire off ctrl+alt+backspace and cross your fingers!


How do I make GNOME panels transparent in classic mode?

there is a different way of doing this but it is with compiz is you install the  "compiz config settings manager" and go to "opacity,brightness and saturation" on the opacity tab down at the bottom hit the new button,and add

name=gnome-panel

your panel will disappear just slide the bar over to adjust the opacity. be careful with compiz and 11.04 it seems to break easily.


Installing Microcode for dummies new install of Ubuntu

If you are actually installing Ubuntu, you just need to install the intel-microcode package, and reboot.  This will fix things on a still-supported Ubuntu release.

If you are running Ubuntu from CD, DVD or USB, someone needs to generate an updated CD/DVD/USB image with the updated microcode for you, and you need to start using the updated image.


The question was answered by  Yuval Adam in this Stack Overflow post:

  Your virtualenv became corrupt due to diffs in the Python system lib.

  Best choice is to reinstall your virtualenv:

$ deactivate
$ rmvirtualenv nlmanagement
$ mkvirtualenv nlmanagement
$ pip install -r requirements.txt


Dell XPS 13 Ubuntu 20.04 select audio device no sound when no selection made (or pressing escape)

alsactl restore causes sound to come out from both laptop speaker and headphones simultaneously.

To get sound from the wired headphones one has to open Sound Settings, go to Input and select Internal Microphone Built-in Audio every time headphones are connected to the 3.5mm jack. Observed the same on Dell XPS 13 and Dell 75-series gaming laptops.

Looks like a 20.04 bug. Reproducible in Cinnamon and KDE Plasma DEs.
In 18.04 there was no such issue.


Triple Monitors, Dual Cards, and Openbox problem

https://github.com/awesomeWM/awesome/issues/598

In the attachments you find a working xorg.conf.d :
"zaphod mode" = four separate independant screens,
working with e.g. twm, fluxbox, xfce.

Unfortunately, latest Openbox x11-wm/openbox-3.6.1 (Gentoo) for me
also only opened a working Desktop environment on Screen 0.0 only -
0.1 .. 0.3 remained blank,
although "xrandr -q --screen 0.n" delivered correct results.


When using Bumblebee, how do I query the current state of the nvidia card?

You can check that using cat /proc/acpi/bbswitch:

$ cat /proc/acpi/bbswitch
0000:01:00.0 OFF

If for some reason it stays on when you are not using it, check your Bumblebee configuration (stored in /etc/bumblebee/bumblebee.conf), more precisely the PMMethod value.


Try:

$ awk 'f{hdg=$0; f=0} /errors|warning/{if(hdg){print hdg; hdg=""}; print} /START/{f=1}' file
Heading1
errors
Heading3
errors

How it works

f{hdg=$0; f=0}

If f is true (nonzero), then save the current line in the variable hdg and set f back to zero.
/errors|warning/{if(hdg){print hdg; hdg=""}; print}

If the current line contains errors or warning, then, if the variable hdg is non-empty, print it.  Also, print the current line.
/START/{f=1}

If the current line contains START, then set variable f to one.

Multiline version

For those who prefer their commands  spread over multiple lines:

awk '
   f {
      hdg=$0
      f=0
   }
   /errors|warning/{
      if(hdg){
         print hdg
         hdg=""
      }
      print
   }
   /START/{
      f=1
   }' file

Variation:  Add a blank line before heading

If we want a blank line to separate the output:

$ awk 'f{hdg=$0; f=0} /errors|warning/{if(hdg){print nl hdg; hdg=""; nl="\n"}; print} /START/{f=1}' file
Heading1
errors

Heading3
errors

Variation: Ignore errors/warnings after an END line

$ awk 'f{hdg=$0; f=0} g && /errors|warning/{if(hdg){print nl hdg; hdg=""; nl="\n"}; print} /START/{f=1; g=1} /END/{g=0}' file
Heading1
errors

Heading3
errors

To make the above case insensitive (GNU awk):

awk 'BEGIN{IGNORECASE=1} f{hdg=$0; f=0} g && /errors|warning/{if(hdg){print nl hdg; hdg=""; nl="\n"}; print} /START/{f=1; g=1} /END/{g=0}' file


You can install 13.04 through update manager. In software sources make sure that it is set to notify you of any new versions, otherwise it will only notify you of LTS versions. Then run update manager and it will tell you there is a new version available. Please note that you will have to upgrade from 12.04 to 12.10 then upgrade to 13.04.


LXDE on a virtual machine refuses to log me in, what can I do?

Despite being in a VM you should be able to get access to the shell, have you tried pressing Ctrl+Alt+F1 on the login screen?


How to dual boot my laptop with Windows 8.1 with Ubuntu?

Just boot your PC with the Ubuntu 14.04 DVD and follow the installer instructions. The section you are asking of is the disk preparation step - there is an option "Install Ubuntu alongside Windows" - choose it, and installer will automatically shrink Windows partition to make room for Ubuntu.

See Install Ubuntu 14.04 LTS for details; point 4 refers to allocate drive space for Ubuntu, but it is good idea to read the whole document before doing Ubuntu installation.


Updated to 14.04 and now my basic terminal commands such as "ls" dont work?

The awk: 1: unexpected character '.' should be a good indication for what's gone wrong here. Something has pooped over your command line start-up scripts and because it's breaking out, it's not adding your path correctly.

I'd look for any instance of awk in ~/.bashrc but you'll need to call things with their full paths:

/bin/grep awk /home/$USER/.bashrc

If you find something, /usr/bin/nano is where the Nano editor lives.


Locate the following settings in php.ini

 upload_max_filesize =

 post_max_size =

 max_execution_time =

And set them as

 upload_max_filesize = 64M

 post_max_size = 64M

 max_execution_time = 300

Once the change is made

sudo service apache2 restart

Edit: You may want to revert all your changes, like in .htaccess and that php file. I never used that mem setting in wp-coinfig, but that probably okay to keep

Also I have never changed chmod on any WordPress directory before. I always just unzipped and did a

 sudo chown -R www-data:www-data /var/www/wordpress


Can I install Ubuntu on my Asus Fonepad?

Not currently, but there is a petition asking ASUS to unlock the bootloader (change.org) and allow development on the device.


After I tried many things I finally think that I discovered the problem. Actually in the logs I noticed the following lines.

Mar  6 23:31:11 ubuntu kernel: [  148.400120] Marking TSC unstable due to cpufreq changes
Mar  6 23:31:11 ubuntu kernel: [  148.400194] Switching to clocksource acpi_pm

Since I have an old motherboard with an old bios, I though maybe the power management was not working correctly. I deactivated everything related to that in my bios, and found this :

http://ubuntuforums.org/showthread.php?t=211138

so I added the acpi=off when booting from the liveCD in order to be able to complete the installation. It worked. Then I added acpi=off in grub.
I used a Kubuntu 10.10 installation, and Kubuntu doesn't have a rc.conf, so setting this value is done like this:

edit the /etc/default/grub file and add acpi=off like this:

GRUB_CMDLINE_LINUX_DEFAULT="**acpi=off** quiet splash"

Must be edited as root.

Then run:

sudo update-grub

Then reboot.

At the moment of this writing, the system has an uptime of 15 hourrs without freezing. I run stress tests, videos, audios and everything looks fine.

The logs do not contain the strings like before.


Local chat between empathy and telepathy?

Serverless Messaging is a feature included in the XMPP protocol some years ago: XEP-0174

Every client that implements this feature should be able to connect to clients on the same network, I just tested it with gajim on my Linux box and Adium on my Mac, worked flawlessly..

If you have any problems you should check if the avahi daemon is installed and running on your machine.


How to create a .deb package for a Qt programme?

As it happens, dh can not possibly be used to package a Qt programme in the traditional way presented in most guides and tutorials out there. More specifically, the rules file must be informed of which snippets it must use to include in the final Makefile.

One way of achieving this is using the cdbs package:

sudo apt-get install cdbs

Then the rules file must be edited to include the snippets from this package:

#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/qmake.mk

These should be the only contents in the rules file, any direct references to dh must be removed or commented out.

At this time, debuild should be operational, it can be run like:

debuild -S


Why does my panel drawer not work properly?

It's probably bug #108951. You'll note that a patch is attached to comment #62.


Ubuntu 16.04 NFS Exports/Shares not mounting on client machine

Thanks to @ridgy for pointing me in the direction of this solution.

When using NFS, it is necessary to make sure the ports 111 and 2049 are open to TCP and UDP traffic. (If you are ONLY using NFS v4, you don't need the 111 PORTMAPPER port) You can restrict it to your local network as you see fit. But, it must be open on both client and server for both traffic types.

If you want to use the command line, first check the status of the firewall, issuing

  $ sudo ufw status

if the returned info states "Status: Inactive", Then you can either leave it off or activate it and enter rules to allow NFS and its PORTMAPPER data to pass through.

Issue the directive:

  $ sudo ufw enable

to start the firewall service

Check the current rules by issuing the status directive again

  $ sudo ufw status

You will see the list of rules that are currently defined (If any have been defined) However, you should now see that the status directive returns;

  Status: Active

Look for any rules that apply to ports 2049 and 111. They should both be open to TCP and UDP traffic... from "anywhere" (This should be tightened up after your shares are operating - depending on your situation)
*NOTE the firewall generally, allows you to apply rules based on "APPLICATION" defaults, however, save yourself some time. I found that NFS is not on the list.

The output should look something like this:

 To                 Action          From
111,2049/tcp       ALLOW           ANYWHERE
111,2049/udp       ALLOW           ANYWHERE
111,2049/tcp (v6)  ALLOW           ANYWHERE (v6)
111,2049/udp (v6)  ALLOW           ANYWHERE (v6)

If you do not see the ports explicity opened, then you can issue the following directives to open them. This must be done on host and client.

$ sudo ufw allow 2049
$ sudo ufw allow 111

NOTE: This will open these ports to ALL traffic not just NFS and PORTMAPPER. I highly recommend that - once you have your NFS exports/mounts working properly, that you revisit firewall configuration to tighten the security around these ports. (This is currently beyond my knowledge and the scope of this answer)

Once again issue the ufw status directive to make sure the entries were properly added to your firewall rules.

NOW... for the embarassing part...
The firewall on the host and client systems may not be your only firewall problem. You must insure that your router is not blocking these ports as well. (This caused some hair pulling in my case. As I had tunnel-vision on the two machines. And, totally forgot the harware between them.) Thanks again @ridgy !

I am using an ASUS AC3200 with DD-WRT. So, of course, your router system will, likely be different.

If your router firewall is active (recommended), refer to your manufacturer's instructions on how to open ports 111 and 2049 to LAN traffic... Optionally, and just to get things working, you can TEMPORARILY disable your router's firewall (not recommended) until you get your exports/mounts working properly.

I sincerely hope this experience is helpful to anyone having the same issues with implementing and NFS network environment.


Create files if they don't already exist

Change 6 with whatever number you want.

touch {1..6}.txt

touchs the existing files and create an empty one for missing ones.

find . -name '*.txt' -size 0 -exec tee <<<"0" {} +

Adds number 0 to all empty files. remember that if your already existing files are empty it will add zero to all of them too.

A not efficient way:

for i in {1..100}.txt; do if [ ! -f "$i" ]; then echo 0 > "$i"; fi; done;

Looks for .txt files between 1 to 100 one by one and creates them if they're not there. Created files have one text character, "0"; existing files are not modified.


Upgrade to 18.04.01 from 16.04 LTS... Login but no Gnome Gui

PARTIAL ANSWER: Running sudo apt-get install --reinstall ubuntu-desktop got the 18.04.01 GUI up and running but I have issues on my HP dm4 Pavilion such as internet connection is broken on GUI and terminal.  GUI sees possible connections but 'Connect' is disabled and grayed-out. Terminal had been able to connect before running "...reinstall ubuntu-desktop". Thank you to @Eliah Kagan & @Radu Rădeanu for posting: Reinstalling Ubuntu via Terminal  And @lzzy88 for posting: Restore Ubuntu 16.04 without losing files and settings


How to take a screenshot every n second?

Install scrot and then run this:

while true; do scrot & sleep 2; done


Can't add a second Google account/Drive on 19.10

I am experiencing this issue as well on Pop!_OS 19.10.

I asked the Pop!_OS developers about it via the General discussion thread on their MatterMost chat (https://chat.pop-os.org), here is what they said:

  It happens every now and then. You have to wait until Google re-enables GNOME's API keys. It's referring to GNOME's API key, so it's an issue they often have with GNOME's account.

So basically: "wait until you can log in again." It doesn't sound like there is much that end users can do.

I wonder if it relates to the upgrade cycle, with too many people upgrading to 19.10 at once, and the volume of new sign-ins triggering some flags with the GNOME API KEY? I am usually a "late upgrader" which may be why I never experienced this issue before.

If so, this might be worth a GNOME bug report, as many people upgrading their OS at the same time, which creates a flood of new app sign-ins, should not trigger an app review, IMO. But it also might just be part of Google's standard security process. An inquiry into the developers of Gnome Online Accounts might provide some more info on what to do to fix or prevent this: https://gitlab.gnome.org/GNOME/gnome-online-accounts/

UPDATE: according to https://gitlab.gnome.org/GNOME/gnome-online-accounts/issues/42#note_642763

  Hello to the folks that are experiencing this Issue. We're aware about the problem and we (Foundation & respective maintainers) are already working on a solution, as you can see we initially raised this Issue 9 months ago.
  In order to keep the thread clean and make the Issue readable to the proper contributors, I'm going to lock this Issue to Contributors only.
  Thank you!

I submitted a question about preferred Google account security settings for end users: https://www.reddit.com/r/gnome/comments/dtk2mn/gnome_online_accounts_preferred_login_settings/ just for the sake of thoroughness, just to make sure there isn't something that end users can do to help avoid or resolve the issue. This issue is probably frustrating hundreds or thousands of people.


Is it possible to add a location/folder on my hard disk to sources.list?

There are 4 steps to setting up a simple repository for yourself:

Install dpkg-dev
Put the packages in a directory
Create a script that will scan the packages and create a file apt-get update can read
Add a line to your sources.list pointing at your repository

Install dpkg-dev
Type in a terminal
sudo apt-get install dpkg-dev

The Directory
Create a directory where you will keep your packages.
sudo mkdir -p /media/Data/Ubuntu

Now move your packages into the directory you've just created.
The Script update-mydebs
It's a simple three liner:
#! /bin/bash
cd /media/Data/Ubuntu
dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz

Cut and paste the above into gedit, and save it as update-mydebs in ~/bin. (the tilde '~' means your home directory. If ~/bin does not exist, create it: Ubuntu will put that directory in your PATH. It's a good place to put personal scripts). Next, make the script executable:
chmod u+x ~/bin/update-mydebs

Sources.list
add the line
deb [trusted=yes] file:/media/Data/Ubuntu ./

to your /etc/apt/sources.list, and you're done.
Using the Repository
Whenever you put a new deb in the mydebs directory, run
sudo update-mydebs
sudo apt-get update

Now your local packages can be manipulated with Synaptic, aptitude and the apt commands: apt-get, apt-cache, etc. When you attempt to apt-get install, any dependencies will be resolved for you, as long as they can be met.
Source: https://help.ubuntu.com/community/Repositories/Personal


Permission problem with files created by Deluge when one fstab entry was removed

The issue is that the original mounted drive was an NTFS formatted disk therefore the file permissions would default to root and 777 in the absence of any umask.

The solution if you are running deluged as service is to modify the umask setting in the service config (e.g. deluged.conf).

Excerpt from deluge upstart guide:

You may wish to modify the above umask as it applies to any files downloaded by deluged.

 007 grants full access to the user and members of the group deluged is running as (in this case deluge) and prevents access from all other accounts.
 022 grants full access to the user deluged is running as and only read access to other accounts.
 000 grants full access to all accounts.


I have been looking for a solution to multiple persistent partitions for many years now, without success. Multiple persistent casper-rw files can be used by adding the persistent-path to grub.cfg right after persistent, ie persistent-path=/foldername/

If you reuse a persistent partition for a different version of Ubuntu, without first deleting the data in it, you will end up with a total mess and it will probably not boot.

Just open the casper-rw partition using "sudo nautilus" and delete the data in it and the new version should run persistent fine.

You can also make a second persistent partition labeled home-rw it will store the home folder and it is usable from version to version.

You can make multiple casper-rw partitions, however Ubuntu always seems to use the one with the lowest number ie sda4 not sda5.

You do know that currently, (16.04), syslinux type installs, (Rufus, UNetbootin, SDC, Universal) do not work with persistent partitions. You need a grub2 installer like mkusb to use persistent partitions.


The package (.deb) pdftk 1.44 can be found at packages.debian. As well as many other packages and different versions of them.


How can I create a select menu in a shell script?

#!/bin/bash
# Bash Menu Script Example

PS3='Please enter your choice: '
options=("Option 1" "Option 2" "Option 3" "Quit")
select opt in "${options[@]}"
do
    case $opt in
        "Option 1")
            echo "you chose choice 1"
            ;;
        "Option 2")
            echo "you chose choice 2"
            ;;
        "Option 3")
            echo "you chose choice $REPLY which is $opt"
            ;;
        "Quit")
            break
            ;;
        *) echo "invalid option $REPLY";;
    esac
done

Add break statements wherever you need the select loop to exit. If a break is not performed, the select statement loops and the menu is re-displayed.

In the third option, I included variables that are set by the select statement to demonstrate that you have access to those values. If you choose it, it will output:

you chose choice 3 which is Option 3

You can see that $REPLY contains the string you entered at the prompt. It is used as an index into the array ${options[@]} as if the array were 1 based. The variable $opt contains the string from that index in the array.

Note that the choices could be a simple list directly in the select statement like this:

select opt in foo bar baz 'multi word choice'

but you can't put such a list in a scalar variable because of the spaces in one of the choices.

You can also use file globbing if you are choosing among files:

select file in *.tar.gz


Snap packages, by default, only have access to a user's home folders, for security reasons. You could try a symlink:

sudo ln -s /opt /home/$USER/opt

Which will create a symbolic link of /opt into your home folder.


broken packages error while trying to install xserver-xorg-input-mtrack

I just checked out that xorg-input-abi-20 is  present in other packages xserver-xorg-core-udeb and xserver-xorg-core

So try to install xserver-xorg-core manually,

sudo apt-get install xserver-xorg-core

and then install mtrack


With command

sudo netstat -at | grep ssh

you can see who is connected on SSH server.
This can write to some .log file

sudo netstat -at | grep ssh >> ssh.log

Or you can create script, something like this

nano ssh.sh

or give some diferent name

#!/bin/bash
date >> ssh.log
netstat -at | grep ssh >> ssh.log

give chmod 777. This script will first write date and ssh sessions
This log cen send to email ....


How to make a shell file execute by double click

To run your script by double clicking on its icon, you will need to create a .desktop file for it:

[Desktop Entry]
Name=My script
Comment=Test hello world script
Exec=/home/user/yourscript.sh
Icon=/home/user/youricon.gif
Terminal=false
Type=Application

Save the above as a file on your Desktop with a .desktop extension. Change /home/user/yourscript.sh and /home/user/youricon.gif to the paths of your script and whichever icon you want it ot have respectively and then you'll be able to launch by double clicking it.

Specifically, for your situation, you need to do:

Create a script that runs mono LOIC.exe. To do so, create a new text file with these contents:

#!/bin/bash
mono /home/logan/.loic/LOIC.exe

Save this as /home/locan/run_loic.sh and then run this command to make it executable (or right click => properties and choose "Allow executing file as program"):

chmod +x /home/logan/.loic/LOIC.exe

Create a .desktop file that launches that script. Create a new text file on your Desktop called run_loic.desktop with these contents:

[Desktop Entry]
Name=Run LOIC
Comment=Run LOIC
Exec=/home/logan/run_loic.sh
Icon=
Terminal=false
Type=Application


How can I customize an icon on the dash/launcher?

You can copy the blender.desktop out of /usr/share/applications, and into your ~/.local/share/applications directory, and edit it there to have a different command line. Don't edit the one in /usr/share/applications, as package updates will revert your changes.


Ubuntu 18.04 boot process stops at "ATA11: failed to resume link"

If you think problem is with graphical drivers i can recommend you to try "non-graphical" installation which not much harder. Do you wish get it try?
https://www.ubuntu.com/download/alternative-downloads

Optimal way is using netboot installer, which pulls everything from internet (and gives you freshest software).

For 18.04 right link is http://cdimage.ubuntu.com/netboot/18.04/

You should select arch your hardware corresponding too - amd64 for 64 bit, i386 for 32 bit.

Which actual "flavor" (Ubuntu, Kubuntu, Xubuntu, etc) is installed is depends on which Desktop Enviroment you will choose during installation.


How To Use Network "Metric" to Manage Two NICS in one PC?

Your /etc/network/interfaces should look like the following to keep the interfaces enabled.

auto lo
  iface lo inet loopback

auto eth1
  iface eth1 inet dhcp
  metric 10

auto eth2
  iface eth2 inet dhcp
  metric 100

From the man interfaces page:

   Lines beginning with the word "auto" are used to identify the physical
   interfaces to be brought up when ifup  is  run  with  the  -a  option.
   (This  option is used by the system boot scripts.)  Physical interface
   names should follow the word "auto" on the same line.   There  can  be
   multiple  "auto"  stanzas.  ifup brings the named interfaces up in the
   order listed.

So, putting the word auto will make it so those connections come up on boot or when restarting the network.

Hope this helps!


Get terminal that was never installed ubuntu-desktop gui

In order to open your terminal in Unity, press Ctrl+Alt+T, or press Super, then type 'terminal' and hit enter.

Edit: I see that you're using Ubuntu 10.04, so ubuntu-desktop probably comes with GNOME, I'm not sure if that Ctrl+Alt+T opens the terminal then, but you can find it in the menu; Applications → Accessories → Terminal.
It is also worth noting that ubuntu-desktop depends on gnome-terminal, so you do most likely have a terminal installed you can open from the GUI.

You can also change to a different TTY with Ctrl+Alt+F1*

*F1 to F6 will give you a text based TTY, where as F7 will take you back to your graphical session.


Try to download the official tar.gz from canon-asia.com (I had to choose the MP237 instead of the MP230, but that works too) , uncompress it, enter into the recent created directory, and then execute the following command:

sudo ./install.sh

It will install (in order) two packages that are inside the subdirectory 'packages', in first place the "common" package, and in second place the "mp230series" package.


How can I change Python version in Sublime Text 3?

Changing alias just changes the default python version when python as a command is called. But Sublime uses path /usr/bin/python when building python source. I strongly suggest you to roll back the alias definition.
Now to build your code using python3, you can either install python-is-python3 package which is available on 20.04 and higher to invoke python3 using python or create a new build system and set that build system as default.
The package python-is-python3 should be avoided if there are some existing packages which depend on Python 2. If you don't have such packages, install the above said package using
sudo apt install python-is-python3

Alternatively, to add a new build system,

Go to Tools→Build System→New Build System

A new tab will be opened to create a new build system. Paste this
{
  "cmd": ["/usr/bin/python3", "-u", "$file"],
  "file_regex": "^ ]*File \"(...*?)\", line ([0-9]*)",
  "selector": "source.python"
}

Press Ctrl+S to save it. Rename it to Python3.

Now to make Python3 as default, go to Tools→Build System and select newly created build system, here Python3.

(optional) Create a new .py file to check whether it has been changed and paste this
import sys
print("Sublime is using: ", sys.version)

Build your source using Ctrl+B

If the output is like
Sublime is using:  3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0]
[Finished in 0.1s]

That means that code is built using python3.


LibreOffice shows many icons on the Launcher, what can I do about this?

As someone else posted I do not see this issue. I see the following when opening lots of new files of the same application i.e. Writer, Calc, Draw, Impress.

I think the needs clarification but it could be a bug and make sure you are installing from Natty's official repository and not an old PPA.

The only thing I can add is that I have a custom libreoffice launcher, hence the white writer icon.


Ubuntu doesnt use the FGRLX graphics driver?

Be sure first to install "Additional Drivers", usually you find it in the menu, or it can show in your panel as an update warning.

If you are a bit more brave you can also try to install the propietary driver from the AMD site.

Once you are sure the correct driver is intalled and running properly, it can fix your performance problems.

Give a try to the instructions here:

AMD Catalyst Ubuntu Precise Installation Guide

After installing it you can test it with the commands

~$ fglrxinfo

~$ fgl_glxgears


Nux is a OpenGL based widget toolkit and canvas used to create user interfaces, similar to GTK+. At a high level, nux is broken down into 3 libraries.

NuxCore
NuxGraphics
Nux

NuxCore is responsible for basic things like a type system, math functions, color definitions, etc. It basically provides all the primitive types for a widget system (color, rectangle, point). Very little logic is present here, this is a foundational library.

NuxGraphics is a thin OpenGL abstraction layer. It provides simplifications of common OpenGL patterns (pushing and popping clipping rectangles, changing render targets, state setting, etc), however it does not directly forbid users from making raw OpenGL calls themselves. NuxGraphics provides abstractions for textures and loading/unloading data.

Nux is a widget library implemented on top of NuxCore and NuxGraphics. Nux contains a duplicate for almost every major widget in the GTK stack as well as several composition widgets (color picker, graphs, 3d views). The Nux widgets are not yet at the same level of complexity as GTK widgets, lacking advanced text rendering (being fixed) and clear theming support.

Rendering inside of nux could be described as “canvas style”. Nux provides a painter to perform basic drawing primitives which can be used in addition to embedding other widgets. So rather than embedding an hbar to create a horizontal line, a widget author may, at their choice, use the painter to draw the bar directly. Images may also be rendered in this fashion, rather the embedding an additional widget simply to render a static non-reactive image. This does not however rule out simply embedding widgets.

In Unity nux is used in what we call “Embedded Mode”. Essentially nux provides a function for painting itself in a foreign open gl context. We call the paint function and nux blits itself onto the backbuffer. We can then continue to paint on top of it if we desire (sometimes we allow compiz to do this). There are functions provided to do opengl state management in embedded mode.


Quit the Ubuntu One client and use these commands in a terminal to reset the configuration files for your user

sudo rm -rf ~/.share/local/ubuntuone
rm -rf ~/.cache/ubuntuone
rm -rf ~/.config/ubuntuone
mv ~/Ubuntu\ One/ ~/Ubuntu\ One_old/

Look for Passwords and Encryption Keys on your dash, go to the Passwords tab, delete the Ubuntu One token.
Note: if you do not have Unity/Gnome installed you will need to install the Password and Encrytpion Keys program.

sudo apt-get install seahorse

to remove all the UbuntuOne program files and reinstall run:

sudo apt-get purge ubuntuone*
sudo apt-get install ubuntuone*

Open Ubuntu One again and you will have all UbuntuOne reseted and ready to be used with any account you provide. Old files under the previous setup will be in your ~/Ubuntu One_old folder.


Installing and running VMWare Workstation 10 on Ubuntu 14.04

I raised a service ticket with VMWare who in turn informed me that VMWare 10 was not compatible with this Kernel version due to the age of the product. VMWare upgraded my product to VMWare Workstation 12 which I downloaded, installed, and ran without issue.


Open a Terminal and type the following commands -

sudo apt-get update

sudo apt-get install --only-upgrade firefox

This will upgrade Firefox to the latest version, ie 34.


Windows 10 boots instead of Linux Live USB (Ubuntu 15.10) - prior installed and deleted Ubuntu (GRUB is not functioning)

First, know and understand your boot modes (BIOS/CSM/legacy vs. EFI/UEFI)! If you're dual-booting, it's important that both OSes use the same boot mode. Fiddling with your boot-mode (BIOS/CSM/legacy vs. EFI/UEFI) options in the firmware is more likely to cause problems than to solve them. If Windows was pre-installed on the system, it almost certainly used EFI/UEFI mode, so you should leave it set to boot in that way. See this page of mine for more on what BIOS/CSM/legacy mode is on an EFI/UEFI-based computer.

To properly diagnose your problem, you should run the Boot Info Script on the computer. (Use an Ubuntu live CD/USB drive for this purpose.) This will generate a file called RESULTS.txt, which holds tons of information on things like installed boot loaders. You can post the file to a pastebin site and post back here for help interpreting it. My hunch is that you installed an EFI-mode copy of GRUB (Ubuntu's default boot loader), then installed a BIOS-mode copy at some point. That's why launching the EFI-mode version (which is what shows up in the boot list as ubuntu) fails; it's expecting the EFI-mode configuration file but getting the BIOS-mode file, which it doesn't like. That's just a hunch, though.

If my hunch is correct, the solution is to install a working EFI-mode boot loader. There are two relatively easy ways to do this:

Run the Boot Repair tool from an EFI-mode boot of the Ubuntu installation image (in its "try before installing" mode). This should replace the GRUB configuration files, as well as GRUB itself. This approach often works, but if my hypothesis about what's causing the problem is wrong, it might not work at all.
Download the CD-R or USB flash drive image of my rEFInd boot manager and prepare a boot image from it. If it's currently enabled, disable Secure Boot. You can then boot from the rEFInd medium and test that you can boot both Ubuntu and Windows. If so, boot into Ubuntu and install the PPA or Debian-package version of rEFInd, which should then take over the duties normally performed by GRUB. This approach has the advantage of enabling you to test the solution (rEFInd) before installing it to your hard disk.


How to back up your internal hard drive OS before instaling Ubuntu

You should back up your hard drive before you install Ubuntu just like you back up your hard drive all the other times you regularly back up your hard drive. If you don't regularly back up, this is a great time to start, whether you continue and install Ubuntu or not. To do this, you need a second hard drive, because you need someplace to copy your files to, someplace off your computer's hard drive for the copies to sit, safe from any disaster that might befall your computer or its hard drive. There is really no other way, short of subscribing to a cloud backup service.

Assuming you're going on to install Ubuntu and keep your current OS (Windows? I can't tell because you talk of saving your OS and formatting your hard drive. You wouldn't want to do both.), you should find a Windows backup solution that works for you. There are lots of programs available to make a copy of your entire hard disk or parts of it to a USB drive. You have to have the USB drive. Buying anything smaller than 2TB is a waste.

Your next problem, assuming you want to save your current OS and install Ubuntu is deciding if you're up to creating a separate partition for your user data so it can be available to you when you boot to your old OS or your new Ubuntu OS. You'll need to look up "ubuntu dual boot" on Google and research your options and see what fits your needs and your skills.


Change Keybindings (hardware to software)

You should be able to do this using xmodmap- see here for documentation and here for more information. The command will be something like xmodmap -e "keycode <key code>=<key sym>".

You can determine key code and key sym names for the keys in question by opening Terminal and running xev. Once this is running press the key in question and something similar to this will show:

KeyPress event, serial 33, synthetic NO, window 0x5800001,
root 0x15a, subw 0x0, time 117923881, (73,50), root:(736,103),
state 0x0, keycode 38 (keysym 0x61, a), same_screen YES,
XLookupString gives 1 bytes: (61) "a"
XmbLookupString gives 1 bytes: (61) "a"
XFilterEvent returns: False

The third line gives both the key code (here, 38) and the key sym (0x61).

To make this new mapping permanent, you'll need to have these commands run at startup by adding them to System > Preferences > Startup Applications.


How can I make apt-mirror to save repositories files on router-provided FTP server?

I created the following script in case anyone is interested.

The script mounts a samba share in the local file system, executes apt-mirror, and unmount the samba share when it finished.

This is pretty much my first scrip ever, so I am sure there is lots of room for improvement

#!/bin/bash
# This scripts expects cifs-utils installed and apt-mirror
# installed and configured, and all samba shares properly configured

######### Variables Definition ##############

mountDir='/mnt/apt-mirrors'
sambaShare="//myserver/apt-mirrors"
sambaUser="myUser"
sambaPwd="mySambaPassword"

######### End Variables Definition ##########

clear

echo
echo "********** Starting Execution **********"
echo

if [ ! -d $mountDir ]; then
    echo "creating dir: $mountDir.."
    mkdir $mountDir
    echo "$mountDir created"
else
    echo "dir $mountDir exists"
fi

mounted () {
    eval "grep -qs $mountDir /proc/mounts"
}

echo

if mounted; then
    echo "something is mounted in $mountDir. Unmounting..."
    umount -f $mountDir
    echo
fi

echo "mounting share $sambaShare in dir $mountDir..."
mount -t cifs -o username=$sambaUser,password=$sambaPwd $sambaShare $mountDir

if mounted; then
    echo "samba share $sambaShare successfuly mounted"
    echo
    echo "********* starting apt-mirror **********"
    echo
    (exec /usr/bin/apt-mirror)
    echo
    echo "********* apt-mirror finished **********"
    echo
    echo "unmounting $mountDir"
    umount -l $mountDir
fi

echo

if ! mounted; then
    echo "unmount successful"
else
    echo "something went wrong: $sambaShare is still mounted"
    echo "forcing unmount..."
    umount -f $mountDir
fi

echo

echo "cleaning $mountDir..."
rm -r $mountDir

echo
echo "********** Execution Finished **********"

exit

You can replace the values of the variables to fit your needs


How can I configure gateway in Remmina UI?

What version of Ubuntu are you on?
I managed to get it working on elementary Freya which is based on Ubuntu 14.04. I run remmina version 1.2.0-rcgit.4, and the gateway setting is under the domain setting. This picture shows it in Norwegian but I think you'll manage:
remmina


How to remove Ubuntu 12.10 and install 10.04?

The simplest procedure would be to boot with the Live CD for 10.04LTS.

Install it on the current / partition by formatting it during installation. Select other partitions like home, swap etc. if applicable but do not format them.

When you reboot, Grub menu should indicate Ubuntu 10.04 LTS.


Cronjob saves json into a wrong directory

By default Cron jobs are executed in the user's home directory. While in your script is not provided path where the output file to be saved, it will be saved into the directory where the script is executed.

According to the question, you want to generate the .json file into the same directory where the script is located. So (in this case) you have to change your code in some way, similar as this:

$parseinfo = 'parseme.json';
$path = realpath(dirname(__FILE__));
$handle = fopen("$path/" . $parseinfo, 'w');
fwrite($handle, json_encode($res));

If you don't want to change the script you could change the Cron job in this way:

*/10 * * * * root    cd /var/www/somederictory/somefolder/ && php parse.php > /dev/null


Huawei EC315 not working on ubuntu 14.04?

To use Tata DoCoMo 3G on Ubuntu OS, find the step below. Read them carefully before you take the step and do not miss the step mentioned herein.

You try to connect Tata DoCoMo 3G stick and boot up Ubuntu / system.
You may choose network connections and click on the 'New Mobile
Broadband Connection'
Select 'continue' in the dialog box and select "India" as country &
then click continue.
It will show the list of service providers, select 'I don't know my
provider' option and type 'TATA DOCOMO UMTS', click continue. Note:
Don't select 'Tata DoCoMo' since it is for Tata Photon+ (2G) and not
for DoCoMo 3G
Now, under billing dialog, select 'My plan is not listed' option and
enter as "tatadocomo3g" as APN, just click 'confirm' and save your
settings.

After these steps, you will get Network Connections, you will find "TATA DOCOMO UMTS connection" option and click on it. In case if it does not connect to internet then you can just unplug and then plug your 3G stick.

Hope this helps!


I have a ThinkPad T60 with Ubuntu 13.04 and WIFI is inoperable--anyone know how to get it working?

The ThinkPad T60, and T60P do have a hardware switch.  See image below. (Image compliments of Lenovo).

To enable WiFi the switch must be pushed to the right side, a green dot should be visible.


How to start ubuntu-touch on Nexus 7 3G Tilapia (nakasig)?

Just in case anyone else is looking for info on this,
      - I did it (mine Tilapia nakasig).
      - using the 2014-06-18 build of utopic: it works, almost:
      GSM is hopelessly unworkable
      camera is dead
      bluetooth seems dead
      but wifi runs ok

  You could probably poke around and find drivers for the camera and
  bluetooth I guess
      but GSM will be and remain hopelessly dead in the water,
      unless you fix the ofonod (and probably a whole host of other things)

This is a perverse hack of
 https://wiki.ubuntu.com/Touch/Install#Manual_Download_.26_Installation

start here: (you need the bzr package to do this)
Get the bzr branch of project-rootstock-ng and,
(  much later ! )    run the rootstock-touch-install script.

cd to somewhere convenient in your home directory maybe

bzr branch lp:project-rootstock-ng
cd project-rootstock-ng

get these (put them somewhere convenient, like in the project-rootstock-ng folder ):

( http://cdimage.ubuntu.com/ubuntu-touch/daily-preinstalled/current/ )

> utopic-preinstalled-boot-armhf+grouper.img
> utopic-preinstalled-recovery-armel+grouper.img
> utopic-preinstalled-system-armel+grouper.img
> utopic-preinstalled-touch-armhf.tar.gz

run on your host (I was using Makulu and also LMDE for this)

abootimg -u utopic-preinstalled-boot-armhf+grouper.img -c "cmdline=console=tty1 datapart=/dev/mmcblk0p10"

Then ran the following: (the img files were in the current directory)

adb reboot fastboot
fastboot flash recovery utopic-preinstalled-recovery-armel+grouper.img
fastboot flash boot utopic-preinstalled-boot-armhf+grouper.img

Then followed with

adb reboot recovery

after which the final install with (remember the bzr stuff at the beginning ?)

./rootstock-touch-install utopic-preinstalled-touch-armhf.tar.gz utopic-preinstalled-system-armel+grouper.img

Good luck - remember the last entry takes a very long time,
 do not (as I did, so many times) give up and reboot.
Take a long lunch or something.


How to uninstall virtualbox package: "is not installed, so not removed"

dpkg -l shows that the package is not installed in.

The first character in in means that the package is marked for installation, the second means that it is not currently installed.


Move directory to Grandpa directory and delete the parent directory

You can just use standard bash commands - mv, rm, etc - for example

mv ~/grandpa/pa/* ~/grandpa/ && rmdir ~/grandpa/pa/

This:

uses mv to move the files in ~/grandpa/pa/* to ~/grandpa/
uses && so the rmdir command only if the mv exits successfully - ; could be used..
uses rmdir to remove the pa directory if it is empty.

N.B. tested on the directory structure - before:

$ tree ~/grandpa/
./grandpa/
|-- anotherfile.txt
`-- pa
    |-- child
    |   `-- file3.txt
    |-- file1.txt
    `-- file2.txt

2 directories, 4 files

after:

$ tree ~/grandpa/
./grandpa/
|-- anotherfile.txt
|-- child
|   `-- file3.txt
|-- file1.txt
`-- file2.txt

1 directory, 4 files


404 Error when installing stuff on Ubuntu Bash Shell Windows 10

This is often caused by a Windows app that blocks networking requests like an anti-malware, firewall, or anti-virus software.


Clarifications on Installing Ubuntu and Windows

I've just done exactly this:

Installed Win10 (or 8, or 7) on 1/3 of my laptops SSD
Installed Ubuntu on 1/3 of the laptops SSD
Allocated the remaining 1/3 as a shared disk for data I want in both operating systems.  This partition has to be allocated in NTFS (do it in Windows just to make sure). Ubuntu can load NTFS partitions without issue, including the windows partition if you want.

Don't bother uninstalling though, once backed up I would just delete all existing partitions and start from a fresh disk, it makes allocating your new partitions easier

One thing to be aware of though, make sure you are consistent in installing both in either MBR (old method) or UEFI mode (new method).  UEFI is the way of the future, but older systems may not support it.


Ubuntu CAN be dual-booted on the Flex 5 (without wiping Windows). All you have to do is change the controller type from Intel RST Premium to AHCI. I was wary of doing this because of the scary warnings Windows was giving me about "breaking my existing partitions".

You must change this setting in safe mode (otherwise Windows will fail to boot!), from Intel RST Premium to AHCI [3]. This is because safe mode "avoid[s] loading conflicting drivers" [2].

Steps to dual boot:

While creating a USB live disk for Ubuntu using Rufus, select GPT partition scheme for UEFI [1].
In BIOS settings, set Boot to UEFI before running installation for Ubuntu
Follow instructions in article to change from RST Premium to AHCI: https://medium.com/@petragospodneti/windows-10-and-linux-love-hate-dual-boot-problems-d9994cbe16c0
Boot with USB and install Ubuntu normally. In my experience, I knew it worked because it gave me a "Install Ubuntu alongside Windows" option, previously not available.

References:

[1] https://forums.lenovo.com/t5/Linux-Discussion/Flex-5-Linux-Support/td-p/3704110

[2] https://superuser.com/questions/1251596/why-safe-mode-when-changing-from-ide-to-ahci

[3] https://en.wikipedia.org/wiki/Advanced_Host_Controller_Interface

Extra reading: https://mjg59.dreamwidth.org/44694.html


How do I register a Wine App as an "Other Application" in 11.10?

I just solved this, and it turns out that the trick with having something show up as an "Other Application" lies in having %f on the executable line of the .desktop file. Here is my "corrected" .desktop file for the the Wine program I'm running PDFEdit (I have shell scripts set up in my .Wine folder that are being referred to.

[Desktop Entry]
Name=Lauch with PDFEDit
Comment=Launch with PDF Edit
Exec=/home/kschiff/.wine/Foxit %f
Icon=/home/kschiff/Pictures/Ubuntu Wallpaper and Icons/icons/Foxit.png
Terminal=0
Type=Application
Encoding=UTF-8
Categories=Network;Application;


How do I get Ubuntu out of the way of Windows 10?

You can change which OS grub boots by default.
In terminal, do:

sudo gedit /etc/default/grub

Find the line that says:

GRUB_DEFAULT=0

and change 0 to the grub menu item that you would like to boot first by default. In your case, it should be entry 4. To double check, or if you forget the boot order, open /boot/grub/grub.cfg

After you made the changes, save it, and then do:

sudo update-grub

Hope this helps.


Unable to start VirtualBox VM on Ubuntu - Kernel driver not installed

VirtualBox doesn't work with kernel 5.3 yet, so either downgrade to kernel 5.2 or wait for VirtualBox update that fixes this (or patch it yourself).


Open VM Tools producing warnings in syslog every 30 seconds / how do I suppress these warnings?

According to this post in the vmware forums, you have to modify isolation.tools.setinfo.disable to false in your vmx file:
[...]
isolation.tools.setinfo.disable = "false"
[...]

Further explanations:

If you have this setting "isolation.tools.setinfo.disable = "true" this mean "Setinfo communication from tools to the ESXi host are being blocked".
Refer this Link for more detail about this parameter  page 6  http://www.vmware.com/files/pdf/vi35_security_hardening_wp.pdf


How to fix a grub boot error : "symbol 'grub_calloc' not found

Using Linux Mint 19.3 bios grub setup in a simple 2 partition installation.
After GRUB2 update the machine crashed on reboot and entered rescue mode.
error: symbol 'grub_calloc' not found

To restore GRUB I booted into Linux Mint 19.3 Live USB stick and issued the following commands in the terminal:
sudo mount /dev/sda1  /mnt
sudo grub-install --root-directory=/mnt/  /dev/sda

On reboot the desktop showed up nicely.


Is it possible to restore directory on Ubuntu and backup the files?

Or could anyone tell me what are the main repository of Ubuntu

create your own "main" repository list here: Ubuntu Sources List Generator

Select your Country from the drop down list.
Select your Version/Release from the drop down list.
Select the Branches you want by clicking on their check boxes. I
suggest not to select the various Sources Repositories unless you
know you need them.
Select the Updates you want by clicking on their check boxes. I
suggest just choosing Important Security Updates and Recommended
Updates
Scroll to the bottom of the page and click on the Generate List
button.

The resulting page will give you a list of repositories based on your previous selections.


Cannot boot Windows 7 after installing Ubuntu 13.04

You could try using Boot Repair which is explained pretty well in this thread.

If you are also having trouble accessing the windows partition you could try a boot repair from a Windows Rescue CD.

After using a Windows Rescue CD you will in all likelihood need to use Boot Repair to restore a GRUB menu.


I found the problem. For some reason that I don't know, the programs appear at some place where their menu bar appear under the bar at the top of the screen. Using Ctrl+Drag made the menu bar visible.


I want to remove Windows 7 completely and just use Ubuntu. How do I do this?

If you already have a dual-boot configuration between Windows and Ubuntu at the moment, just delete the windows partition with Disk Utility in Ubuntu and run sudo update-grub in the terminal.

If you still have not installed Ubuntu and are planning to do it, just choose Use Entire Disk during Ubuntu installation (be sure to previously backup any important data on the disk).


xmodmap pointer setting doesn't affect all applications

Try the following:

pointer = 1 2 3 4 5 6 7 8 9 10 11 12

  There is a known bug:

  Every time a keycode expression is evaluated, the server generates a
  MappingNotify event on every client. This can cause some thrashing.
  All of the changes should be batched together and done at once.
  Clients that receive keyboard input and ignore MappingNotify events
  will not notice any changes made to keyboard mappings.

  Xmodmap should generate "add" and "remove" expressions automatically
  whenever a keycode that is already bound to a modifier is changed.

  There should be a way to have the remove expression accept keycodes as
  well as keysyms for those times when you really mess up your mappings.

Check it out in order to know if it has to do with your problem.

Just for curiosity, Are you using the xmodmap program in the next synopsis?

xmodmap [-options ...] [filename]

If no, go to this link:

XMODMAP Manual Page


I fixed the problem with

sudo apt install python-minimal

as suggested in the warning message. I have decided to install python-minimal rather than python3 since the latter was already working smoothly in the terminal.


Wubi Error "There is no disk in the drive"

There are two issues in your question. The first is the 'no disk' bug already answered. The second is the 'no root file system' message described here.

For Wubi installs this problem is usually caused by:

Minor partition table errors that Ubuntu is more sensitive too than windows
An unsupported fakeraid (e.g. 0 or 1+0)
A mix of GPT and MBR partition tables, usually from reusing a drive from a Mac.

When you get that error, drop to a shell (Ctrl+Alt+F2) and run sudo parted -l - that will tell you if there's a partition table error. sudo fdisk -l tells you about the GPT mix and also shows specifics on the partition table (to identify what errors might be present).


I know this is an old question, but since nobody answer :)

This is the script I use, it will try to connect to a host 3 times, then reconnect the vpn.

#!/bin/bash

TESTIP=<ip to test>
TESTPORT=<port to test>
VPNCONNECT=/usr/sbin/vpnc-connect
LOGFILE=/var/log/vpncreconnect.log

if nc -w2 -z $TESTIP $TESTPORT ; then
    exit
fi
if nc -w3 -z $TESTIP $TESTPORT ; then
    exit
fi
if nc -w4 -z $TESTIP $TESTPORT ; then
    exit
fi
echo "`date`: unable to connect to target, restarting VPN..." >> $LOGFILE
$VPNCONNECT &>> $LOGFILE

Make the script executable and put it in crontab to run every minute

* * * * * /var/my/script/scriptname


Cannot Login after Fresh install of ubuntu 14.04.1

I am not expert yet.

The fastest way to solve the problem is to logging in as root user. The second alternative is by creating a new account and activating the sudo mechanism.

Please take a look further in:
https://help.ubuntu.com/community/RootSudo


CDROM recognized, but cannot mount: no medium found on /dev/sr0

I had the same problem when trying to mount my dvd drive on usb and getting 'no medium found on /dev/sr0'. The solution is trivial: there was no CD in my dvd reader. When I put CD in, it mounted correctly.


On 18.04.4 HWE yet still have one old 4.15 Kernel

After updating, the old kernels still will be there and there's no point to remove them , since you may have problems using the new ones after updating.The older kernels are still accessible in the Advanced options for ... option in the grub2 menu.And from what you've posted it's clear that the default kernel (i.e the default boot option) in your system is 5.3.0-61-generic.
And VBox 6.1 is compatible with linux kernel 4.x too :

It should be possible to use Oracle VM VirtualBox on most systems based on Linux kernel 2.6, 3.x, 4.x or 5.x using either the Oracle VM VirtualBox installer or by doing a manual installation.

Read more about that here.
And if for whatever reason you wanted to remove the old ones , you can delete these packages for the 4.x kernels :
linux-headers-VERSION
linux-hwe-tools-VERSION
linux-image-VERSION
linux-modules-VERSION
linux-modules-extra-VERSION
linux-tools-VERSION


Look at this thread: How to uninstall NetBeans?

If that doesn't work:

Try looking for a readme or a help in the netbeans folder, and look for more information on uninstalling.

You also can run the command gksudo nautilus, which opens your file manager which can delete all files, even those which normally are read only.

Then go to other locations in that file manager, select computer (your hdd) and press ctrl+f and search for netbeans, delete any file that comes up, that you think is related to the program (check the last modified date, if you remember when you installed netbeans, you can easily do this by enabling a last modified column in your file manager)


Steam tries to install some dependencies but fails to find package

This has helped me.
sudo apt purge steam
sudo apt update && sudo apt upgrade
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install steam


How do I get network connection and WiFi working on Dell Inspiron 1520 and Ubuntu 12.04?

I ran

sudo apt-get remove bcmwl-kernel-source

and let it run a few minutes. It locked up the terminal but after I rebooted, the ethernet port worked. Here are the instructions for wireless which I haven't tried yet. https://help.ubuntu.com/community/WifiDocs/Driver/bcm43xx

I used the open source drivers in the section b43 - Internet access. It locked up the computer when I tried the Switching Drivers section, but after rebooting, it worked.


How to Report a Feature Request to GNOME Dock Settings

The dock in Ubuntu 17.10 and later is provided by the gnome-shell-extension-ubuntu-dock package.

You can report bugs here: https://bugs.launchpad.net/ubuntu/+source/gnome-shell-extension-ubuntu-dock (click this).


Adding multiple hard drives to ubuntu server so owncloud can use them

Make sure that the folder's that you like to bind in owncloud is accessible for the user witch run apache2 or your webserver. When you run apache2 then the group and the user is www-data.

When you use the folder only for owncloud:

sudo chown -R www-data:www-data /path/to/your/external/folder

When you use the folders for owncloud and other stuff:

sudo chgrp -R www-data /path/to/your/external/folder
sudo chmod -R g+w /path/to/your/external/folder


Apport reports packages to be outdated when they are up-to-date

This likely happened because Apport detected older packages at the time of the crash, and (as such) is trying to ignore the report as possibly invalid.

You can ignore the "outdated" warning by using the APPORT_IGNORE_OBSOLETE_PACKAGES environment variable.

Simply prepend your command with the following to force Apport to report anyways.

APPORT_IGNORE_OBSOLETE_PACKAGES=1 <your_command>

If that fails to work (as per this bug), stripping out the UnreportableReason section of the report should allow for it to go through.


how to make recoll search or locate folder only not the files

Don't use recoll for that. recoll is for searching based on file content. It builds and index of your files so that you can then run full text searches on the content of your computer.

By definition, this doesn't apply to directories at all. (You can search based on files names with recoll too if you go to: Tools -> Advanced Search -> File name matching. Don't know how to restrict that to directories, though )

What you want to do is use a simpler method, such as find (CLI), locate, (CLI) or the searching utility that's integrated into nautilus (pops up when you press CTRL+F). These do not look inside your files/directiories but only search for files/directiories based on their names.

I don't think you can specify 'directories only' with locate and nautilus's search, but you can certainly do that with find (though it will probably be somewhat slower, as find doesn't build a database for faster searches).

Try (in the command line)
find $STARTING_POINT -name $QUOTED_WILDCARD_EXPRESSION_TO_SEARCH_FOR -type d
(type d means type=directory)

OR use nautilus search and have the results listed by type (so that you can select directories only).

You can start looking for something better if none of these method is fast enough for you (if you want to run searches on a very large set of directories).


Unable to restore Ubuntu after reinstalling windows 7

Your boot-repair output shows that you don't have ANY Linux partition on your hard drive:

=================== fdisk -l:

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xe48393f7

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      409599      203776    7  HPFS/NTFS/exFAT
/dev/sda2          409600   595085311   297337856    7  HPFS/NTFS/exFAT
/dev/sda3       595085312   624928767    14921728    7  HPFS/NTFS/exFAT
/dev/sda4       624928768   625140399      105816    c  W95 FAT32 (LBA)

So there's nothing to restore, sorry.


Check the output of which php and use the absolute path for php (in my case /usr/bin/php5).

*/2 * * * * /usr/bin/php /var/www/test/cron.php

or just

*/2 * * * * php /var/www/test/cron.php

For clarification, the default $PATH for cron is

PATH=/usr/bin:/bin

You can check the $PATH with a test entry (Source):

* * * * * env > /tmp/env.output

Thus, the file

/tmp/env.output

is created.

You'll have to remove the entry * * * * * env > /tmp/env.output afterwards.


How do I disable window shadows in Unity on 12.04?

I'm pretty sure the behavior is by design; there used to be a comment in the Compiz code saying that the Shadow filters only apply to windows that are not decorated. The old Metacity workarounds no longer work (although they may still in Unity 2D, which uses Metacity).

So, disabling Shadows on any window (here, CCSM itself) has no effect as long as it is decorated:

But if you also disable Decoration, the shadows are gone (as are the titlebars ;):

Workaround: to "disable" shadows, just make them transparent:


How do I add a shortcut to refresh current page in firefox and keep the focus on current window?

You can use a xdotool-based shell script for that.

sudo apt-get install xdotool

Then write a simple script like this one:

#!/bin/bash

WID=`xdotool search --name "Mozilla Firefox" | head -1`
xdotool key --window $WID F5

Name it and place it as you wish. Make it executable:

chmod a+x /path/to/script

Now you can simply make a custom keyboard shortcut that will execute the script and you are all set up.


How can I remove the "Deleted Items", "Applications" entries from the netbook launcher?

There doesn't appear to be a way to remove the Deleted Items (the trash can looking thing).

However removing the following two packages will remove the Applications and Files and Folders: sudo apt-get remove unity-place-applications unity-place-files

You will need to log out and back in for that to take effect.


how do I get to/view my files on my home network with Lubuntu

Its looks like your router is sharing the files over Samba. This is a protocol for sharing files over a network, ussually associated with Windows networks.

To obtain support for this in Ubuntu you need to install cifs-utils: sudo apt-get install cifs-utils

You will have to find the server and share names from your Windows computer. Navigate to the network folder in Windows Explorer. Then check the address bar to get the server and share name. It should look like \\. Where  could be a name or an IP address.

Now, from within Ubuntu create a directory in your home directory (the name doesn't matter) mkdir ~/smbShare

To manually mount the file run sudo mount -t cifs //<server>/share /home/username/smbShare

There are additional options for the mount coommand, and you may need to provide a username and password to access the share.


I want to extend my disk patition for ubuntu (dual booted ubuntu and windows)

Make sure that you have a good backup of your important Ubuntu files, as this procedure can corrupt or loose data.
The use of an extended partition (sda3) makes this a little difficult. I'll outline the easiest way first, and we can add more to the procedure if we have to.
Keep these things in mind:

always start the entire procedure with issuing a swapoff on any mounted swap partitions, and end the entire procedure with issuing a swapon on that same swap partition

a move is done by pointing the mouse pointer at the center of a partition and dragging it left/right with the hand cursor

a resize is done by dragging the left/right side of a partition to the left/right with the directional arrow cursor

if any partition can't be moved/resized graphically, you may have to manually enter the specific required numeric data (don't do this unless I instruct you to)

you begin any move/resize by right-clicking on the partition in the lower part of the main window, and selecting the desired action from the popup menu, then finishing that action in the new move/resize window

Do the following...
Note: if the procedure doesn't work exactly as I outline, STOP immediately and DO NOT continue.

boot the a Ubuntu Live DVD/USB
start gparted
right-click on /dev/sda5 in the lower pane and select swapoff
right-click on /dev/sda3 in the lower pane and select move/resize
resize the left side of /dev/sda3 all the way left
right-click on /dev/sda5 in the lower pane and select move/resize
move /dev/sda5 all the way left
right-click on /dev/sda6 in the lower pane and select move/resize
resize the left side of /dev/sda6 all the way left
if it all looks correct, then click the green "Apply" icon to do the work
quit gparted
reboot


Ubuntu 16.04 WiFi dropping on WPA group rekeying

What fixed it for me was going to Edit Connections, choosing the particular connection, going to the IPV6 tab, and setting it to "Ignore".

That looks like IPV6 group rekeying.

Ubuntu has issues with their IPV6 on some systems.   Mine worked great for 5 years.  Then a after a routine update, it would drop consistently every 20 minutes.    Disabled the IPV6, and back in business.


How to run 32bit eclipse (ODeV) on 64 Bit Ubuntu 13.04

For everyone who has the same question, I found a description here. I did not try the solution myself, but it sounds helpful.


You can be pretty sure that your RAM capability is the problem (the lack of this one).

When I run Android Studio plus the ADV with an emulator, the memory used by my system is more than 3Gb, and sometimes (ADT + Firefox) it reaches the 3.7Gb.

I use Ubuntu 13.10 64-bits and I've replaced Eclipse for Android Studio, it runs better. You can try with that, but I still think that you'll need to have more RAM to develop Android applications


Wi-Fi not working on Lenovo Ideapad s130

Run this command in your Terminal & Reboot your PC.

sudo tee /etc/modprobe.d/blacklist-ideapad.conf <<< "blacklist ideapad_laptop"

If you installed any Broadcom driver then uninstall it using the below command:

sudo apt purge bcmwl-kernel-source

Maybe the above commands will help you get Wi-Fi in your PC.


applications getting disappeared after minimizing them in Ubuntu 12.04 LTS

Install compizconfig-settings-manager by running below commands on terminal,

sudo apt-get install compizconfig-settings-manager
sudo apt-get install compiz-plugins

After the installation is completed,press Alt+Tab to see and reopen the minimized applications.


I can answer my question myself :-)

It was indeed disabling SWAP - the old swap partition (which was deleted) was still entered in /etc/fstab.

So if any of you encounter a long boot time, here are my steps:

Press ESC while boot to see the boot log or look at the boot log /var/logs/boot.log. Look for "A start job..." this usually points to some uuid (hard disk or partion) that is not available anymore. Maybe you deleted a partition after installation?
Either comment out the questionable line in /etc/fstab - if you deleted the partion (or in my case: Swap Partition) or correct it if you created a new partition (which has another uuid).

You may find this link helpful: Slow boot - "a start job is running for dev-disk-by..."Slow boot - "a start job is running for dev-disk-by..." - Ask Ubuntu


Installing a repo package on Ubuntu without yum installer package

Sorry, I almost got the full answer, but alas I'm out of time. Yum is for installing Red Hat/CentOS/Fedora software (and a few others). Ubuntu/Debian... uses apt so you just need to add repo based on Ubuntu method, and then sudo apt update so you can do pip install of the program. I've only used the git clone install method so might need some research if pip install doesn't work.

Please click edit and add that vital information to your question so all the facts we need are in the question. Please don't use Add Comment, since that's our channel to you. All facts about your system should go in the Question with edit –


I cannot get Plex server to see any directories

Is it just plex can't find your files or find your directories?

I had a similar issue where plex just wouldn't find any of my files I had in my directories. The issue is likely due to the plex user not having the correct permissions.

Open this config file:

sudo nano /etc/default/plexmediaserver

Find this line:

PLEX_MEDIA_SERVER_USER = plex

Replace plex with your username, and save the file. Once I restarted my computer, Plex was able to access the folders on the external drive.

You may be able to run sudo service plexmediaserver restart instead of rebooting.

Let me know if this works


Ubuntu 16.04 - XBOX360 USB controller detected, but not listed as joystick

Remove the driver

sudo apt-get purge xboxdrv xboxdrv:i386

Use sudo apt-get autoremove to remove non needed packages
Get this one which seems to be working for me:

https://launchpad.net/ubuntu/xenial/i386/xboxdrv/0.8.5-1


Access server's web browser from local machine

If you want to access tomcat, you can connect to the machine using your browser. This depends on what services you have installed with tomcat, as they can set the port they advertise on, but generally 8080 is a good start:

http://:8080

However, I was wondering about the "from a server". If you have ssh'd into the server, you are in command line mode, and you can't run a web browser from there (well, you can use curl or wget).


The trash launcher opens an Internet browser

Trying creating trash.desktop in /usr/share/applications/

The following is your standard .desktop file.

Once the trash.desktop file has been created. Restart Ubuntu and search your previously given "Name=" value from the Unity Launcher.

If you would like the Icon in the Launcher, simply click & drag from your search results icon to your Launcher.


Repeating Error: invalid environment block. Press any key to continue

This should solve it (at least temporarily):

# cd /boot/grub
# rm grubenv
# grub-editenv grubenv create
# grub-editenv grubenv set default=0
# grub-editenv grubenv list
default=0

Source.
Confirmed working for 12.04.


Can't install Discovery Studio Visualizer

This is an interpreter problem, you'll have to change it to a correct one. In fact, there will be more similar problems along the way. Simply follow this procedure, it's very detailed and worked for me on Ubuntu as well. You also might have to install csh and tcsh at some point.


How does one install pygobject from the official repository?

Development libraries usually don't show up very well in the software center. Usually using apt-cache search will help here. So for example:

apt-cache search python gobject

Will show you all the packages related to python and gobject introspection. Here is a snippet of the results:

python-gi - Python 2.x bindings for gobject-introspection libraries
python-gi-cairo - Python Cairo bindings for the GObject library
python-gi-dbg - Python bindings for the GObject library (debug extension)
python-gi-dev - development headers for GObject Python bindings
python-gobject - Python 2.x bindings for GObject - transitional package
python-gobject-2 - deprecated static Python bindings for the GObject library
python-gobject-2-dbg - deprecated static Python bindings for the GObject library (debug extension)
python-gobject-2-dev - development headers for the static GObject Python bindings
python-gobject-dbg - Python 2.x debugging modules for GObject - transitional package
python-gobject-dev - Python 2.x development headers for GObject - transitional package
python-pyudev - Python bindings for libudev
python3-gi - Python 3 bindings for gobject-introspection libraries
python3-gi-cairo - Python 3 Cairo bindings for the GObject library
python3-gi-dbg - Python 3 bindings for gobject-introspection libraries (debug extension)
python3-pyudev - Python3 bindings for libudev

Since you are looking for python 3 I would install python3-gi, that's probably the package you are looking for, so ...

sudo apt-get install python3-gi


Ubuntu 16.04 doesn't load after installation on Acer Aspire One

First of all make a Ubuntu Live CD, and add the output of following command to your Question, it will help us in answering you :

ls -l /dev/disk/by-label/

and

inxi -Fxzc0

Now go ahead and try to mount the partition :

sudo mount /dev/sda1 /mnt

If cat /mnt/etc/lsb-release gives you details of Ubuntu, you have Ubuntu in that partition (namely sda1 in your case)

Now what you gotta do is :

sudo chroot /mnt

grub

find /boot/grub/stage1

Above will give output like : (hd0,*) replace * with number wherever used below in your case it will be 1 I'm sure,

root (hd0,*)

The above line sets the root to be mounted at sda* in your case sda1 the go ahead enter :

setup (hd0)

quit

Optional : search the output of following command for line named set root= it should be having hd0,gpt* in your case hd0,gpt1 now your good to go.

cat /boot/grub/grub.cfg

Done, now restart your Computer after removing LiveCD, your existing Ubuntu at sda1 should boot up fine.


You must not have build-essential installed. Please try this:

sudo apt-get install build-essential


Ubuntu Will not Recognise my Samsung C5220 Phone

Are you sure that you need PC Studio to use that phone as a modem? With Android devices, it is not necessary, and if I remember well, it wasn't with my old Motorola V3x either. Just try to switch on the modem connection on the phone. If nothing happens, connect your phone and look into your connections (using the applet on the top panel which you use also to connect to wifi networks) and check if there is some new entry related to your phone.


How can i make Rhythmbox recognize song titles and album artists written in Arabic?

For a single file, the only option(*) that I could make to work was this:

id3v2 -a "$(mp3info -p "%a" foo.mp3|iconv -f windows-1256 -t utf-8)"\
-A "$(mp3info -p "%l" foo.mp3|iconv -f windows-1256 -t utf-8)"\
-t "$(mp3info -p "%t" foo.mp3|iconv -f windows-1256 -t utf-8)" foo.mp3

for a single file called foo.mp3. It resulted in ID3v1 (or 1.1) tags in windows-1256 being converted v2.3 tags in utf-8. The following caveats apply:

If your tags are not Windows-1256 (for example, they're instead ISO-8859-6 or not arabic at all), the command will irrecoverably mangle them, without warning
I only tested it with one file, that had no album info, so might not work for all cases
It may or may not convert other tags, such as track number, year, genre, etc.
I don't have Windows, so no clue whether the resulting files work there

If it works, put the command in a file, call it "retag.sh", replace foo.mp3 with "$1" (including the quotes). Then make a copy of all relevant mp3s cp -a Music/mp3 Music/retagged-mp3 and replace with abandon: find Music/retagged-mp3 -type f -print0|xargs -0 retag.sh. Once verified that they show ok and play ok and none were lost in conversion, replace the original mp3s with retagged ones.

(*) I tried lltag and id3v2 for reading the tags on command line, but that didn't work. puddletag, exfalso and easytag wouldn't show the tags at all, and tagtool would show them assuming ISO-8859-1 encoding.


Change directory structure from /YEAR/MONTH/DAY/ to /YEAR-MONTH-DAY

The rename utility in Ubuntu can rename directory structures but it won't clean up after itself.

rename 's#(.+)/(.+)/(.+)#$1-$2-$3#' */*/*/

Stick -vn on the end if you just want it to tell you what it's going to do before it renames anything, but here's a little test harness that shows you what's possible:

$ mkdir -p 2014/06/15
$ touch 2014/06/15/photo_{001..003}.jpg
$ tree
.
└── 2014
    └── 06
        └── 15
            ├── photo_001.jpg
            ├── photo_002.jpg
            └── photo_003.jpg

$ rename 's#(.+)/(.+)/(.+)#$1-$2-$3#' */*/*/
$ tree
.
├── 2014
│   └── 06
└── 2014-06-15
    ├── photo_001.jpg
    ├── photo_002.jpg
    └── photo_003.jpg

Simply put it's being fed the third-level directories and renaming is reading the earlier two segments and renaming it, sticking it in the current directory. As you can see there will be a load of year directories. Assuming they're empty you could clean up with something like (and I pray you check they're empty first):

find -maxdepth 1 -type d -regex '\./[0-9][0-9][0-9][0-9]' -exec rm -irf "{}" \;

I'm using the -i option to force it to ask you before deleting every file. Remove that at your own risk.


I had a similar problem with my dell XPS. I had to call tech support. It turn out I had to open my laptop, unplug-replug the WiFi antenna.

It should look like this: http://eduncan911.com/blog/archives/images/WhytheInspironisaKing_13F13/IMG_0008.jpg


ACL - only grant access to reading, *not* to execution

You could do chmod o-x test/script.sh, but this is pointless. The user could just copy the file to their home directory, make it executable and run it from there. It will run with the user's privileges anyway, unless it's setuid. And shell scripts can't be setuid, but  copying a setuid file will remove the setuid bit from the copy anyway.


You can select "nomodeset" parameter from boot options and try to install.


Macbook style touchpad not working correctly (Dell Inspiron 15 7547)

Following this article solved my problems

sudo apt-get install xserver-xorg-input-mtrack

then edit the xorg.conf file

sudo -H gedit /etc/X11/xorg.conf

and add:

Section "InputClass"
    MatchIsTouchpad "on"
    Identifier      "Touchpads"
    Driver          "mtrack"
    Option          "Sensitivity" "0.55"
    Option      "FingerHigh" "12"
    Option      "FingerLow" "1"
    Option          "IgnoreThumb" "true"
    Option          "IgnorePalm" "true"
    Option          "TapButton1" "0"
    Option          "TapButton2" "0"
    Option          "TapButton3" "0"
    Option          "TapButton4" "0"
    Option          "ClickFinger1" "1"
    Option          "ClickFinger2" "3"
    Option          "ClickFinger3" "3"
    Option          "ButtonMoveEmulate" "false"
    Option      "ButtonIntegrated" "true"
    Option          "ClickTime" "25"
    Option          "BottomEdge" "25"
    Option      "SwipeLeftButton" "8"
    Option      "SwipeRightButton" "9"
    Option      "SwipeUpButton" "0"
    Option      "SwipeDownButton" "0"
    Option      "ScrollDistance" "75"
EndSection

The article also says,

  You may have existing configurations for the synaptics touchpad driver. Comment out existing stuff by adding a # to the beginning of each line. Then add the configuration block from above

Save, exit, and reboot or restart lightdm display manager.


Internal microphone not working on Ubuntu 20.10 on a Lenovo yoga slim 7 14are05

Stumbled over the solution to this. The issue is with kernel 5.8.0-44.50. Using an older kernel has solved my microphone problem.