Does canonical+6wind vswitch support vlan transparent?

I made a lab deployment of their solution with Juju and tried both VXLAN and VLAN. Both are supported and were very easy to deploy. I did try OVS-DPDK too, but it was not good enough for my needs. I could even use brctl and tcpdump with 6wind vswitch...

We plan to get it in production soon.


How can I fix these errors during Talend Open Studio installation?

The line

  Caused by: java.lang.UnsupportedClassVersionError:
  org/talend/osgi/configurator/OsgiLoaderActivator : Unsupported
  major.minor version 52.0

is saying this code was compiled with Java 8. Java 7 cannot run code compiled for Java 8. So you need to install Java 8 to run this.


Software center empty and no unistall button in dash

I've solved this problem by reinstallation of software-center something like that:

$ sudo apt-get purge software-center
$ sudo apt-get autoremove -y
$ sudo apt-get clean -y
$ sudo apt-get install software-center


Go into BIOS by clicking F2 right as you start up the computer. Go in and find "boot." Find secure boot, then turn it off. Viola.


problem with ubuntu 14.04 installing, grub rescue

If you actually managed to install other things just fine, then all you have to do is Boot Repair and yes you have to create a live (boot-able) USB drive. Here is a very easy way to create one and for that you'll need:

Ubuntu 14.04 .iso file. If you do not have the .iso file, you can download it from here (either direct download or torrent download, whichever you prefer).
An empty USB drive of size 1.5 GB or more.
A Windows OS with administrative permission
This software Universal USB Installer.

When you have these things:

Just run the Universal USB Installer.
Select "Ubuntu" from the list of Linux Distributions.
Browse to the location of the .iso file and select it.
Select the letter of your USB and click create. Any previously stored data on USB will be lost.

After creating the boot-able USB, just plug it in your computer and turn it on. To make sure your computer boots from USB, you may have to select "Boot Device options" (by either pressing Esc or F12 depending on your computer) and then selecting USB drive from the list.

Once you boot your computer from USB, Just follow the EXACT procedure for Boot-Repair as given on the Ubuntu Wiki.

Hope that helps.


How can I install .deb files that look like a sealed box in the file folder to install on my ubuntu 16.04 lts desktop

The .deb file is an application install package.  The sealed box you see is a visual showing it's a package.

You can install the package by double clicking on it.

When you double click the file, it should bring up the software center and give you a graphical interface with a button to click install.

You can also right click on the icon and choose the install program installer to run.

Alternately you can install a deb package from the commandline with:

$ sudo dpkg -i [packagename.deb]


I installed Ubuntu on my Lenovo Thinkbook 15 IML and experienced exactly the same problem. Lenovo did not provide a solution for this "simple" task. As mentioned in another post, it is not rocket science and solution should have been provided by Lenovo Support Team since it is a basic functionality that should be guaranteed to work on any OS.
Anyway, Ubuntu community and its helpers are pretty amazing. After a few months struggling with the problem, Kai Heng-Feng found a solution and provided a test kernel which solved the issue. Now my touchpad is working.
You can apply the test kernel published in comment #88 in https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1853277
To apply this kernel you should download it and then go to Download folder and write the following sentence on a terminal:
sudo dpkg -i linux-image-5.9.0-rc4+_5.9.0-rc4+-4_amd64.deb
Restart your computer, and enjoy your working touchpad!
P.D: I believe this solution works for a Lenovo Thinkbook IIL series as well. Maybe the permanent solution will be published in a future Ubuntu official kernel.


Open already running program via terminal

As a one- liner

Assuming you have wmctrl installed (run sudo apt-get install wmctrl if not):

The command:

wmctrl -ia "$(wmctrl -lp | grep "$(pgrep gedit)" | tail -1 | awk '{ print $1 }')"

Would raise the last opened gedit window. Replace it by any other application.

Explanation

pgrep gedit

gets the pid of gedit

wmctrl -lp

lists all windows and the pid they belong to

awk '{ print $1 }'

splits off the window- id (the first string in the line)

$(wmctrl -lp | grep "$(pgrep gedit)" | tail -1 | awk '{ print $1 }')

therefore finds the window-id of the last created window of gedit (the output of wmctrl -lp lists the windows in a chronological order of creation, if the application has multiple windows, tail -1 returns the last one).

wmctrl -ia

subsequently raises the window by its window-id

In a small script

...to be run with the application as argument:

#!/bin/bash

wmctrl -ia "$(wmctrl -lp | grep "$(pgrep "$1")" | tail -1 | awk '{ print $1 }')"

Save it into an empty file as switchto.sh
Make it executable
Run it as (e.g.)

/path/to/switchto.sh firefox

Alternatives?

Theoretically the command:

xdotool search --class gedit windowactivate

should do (kind of) the same; it should raise the first found window of gedit in this case.
It seems less robust however. On my system (Unity) it did nothing at all.


If I force brutal shutdown with reboot option, is there any chance Ubuntu re-open apps that were running before shutdown?

Apps will not reopen after reboot. How ever you can make firefox to reopen previous session tabs on startup. To do it mark Restore previous session in firefox preferences.


Kubuntu 12.04 Won't let me search for wireless network

Try to unlock it by typing int the terminal sudo rfkill unblock wlan0.


Yes, though the hand built bindings don't expose it, you'll have to use the GObject Introspected bindings to do it.  Unfortunately, there isn't a tutorial that uses those yet.

To do this you'll need to get your IndicateServer and call set_menu on it.  Which takes as a parameter the Dbusmenu that you'd like to provide.  There are lots of ways to do that, but let me give you some quick pseudo code (as I'm not fluent in Python).  Hopefully someone with edit privs that is can help.

menuserver = Dbusmenu.Server("/my/unique/path")
root = Dbusmenu.Menuitem()
menuserver.set_root(root)

first = Dbusmenu.Menuitem()
first.property_set("label", "First")
first.connect("item-activated", call_me_on_click)
root.child_append(first)

second = Dbusmenu.Menuitem()
second.property_set("label", "Second")
root.append_child(second)

indicateserver.set_menu(menuserver)

There are other properties that can be set on menu items to do just about anything you want.  You can also build them from GTK menus if that is more comfortable to you using the DbusmenuGtk.parse_menu_structure().  There is also API Documentation for DbusMenu.


Now let's analyse the problem with further information:

What package aktivity was on 23rd of Aug.?

A look into /var/log/apt/term.log

Log started: 2016-08-01  22:20:12
nvidia-docker (1.0.0~rc.3-1) wird eingerichtet ...^M
Setting up permissions^M
chown: ungültige Spezifikation: »nvidia-docker:“^M
dpkg: Fehler beim Bearbeiten des Paketes nvidia-docker (--configure):^M
 Unterprozess installiertes post-installation-Skript gab den Fehlerwert 1 zurück^M
Fehler traten auf beim Bearbeiten von:^M
 nvidia-docker^M
Log ended: 2016-08-01  22:20:12

Log started: 2016-08-23  19:46:24
(Reading database ... ^M(Reading database ... 5%^M(Reading database ... 10%^M(Reading database ... 15%^M(Reading database ... 20%^M(Reading database ... 25%^M(Reading database ... 30%^M(Reading database ... 35%^M(Reading database ... 40%^M(Reading database ... 45%^M(Reading database ... 50%^M(Reading database ... 55%^M(Reading database ... 60%^M(Reading database ... 65%^M(Reading database ... 70%^M(Reading database ... 75%^M(Reading database ... 80%^M(Reading database ... 85%^M(Reading database ... 90%^M(Reading database ... 95%^M(Reading database ... 100%^M(Reading database ... 535593 files and directories currently installed.)^M
Preparing to unpack .../nvidia-352_352.99-0ubuntu1_amd64.deb ...^M
Stopping nvidia-persistenced^M
nvidia-persistenced: Kein Prozess gefunden^M
Done.^M
Removing all DKMS Modules^M
Done.^M
Stopping previous nvidia-persistenced^M
nvidia-persistenced: Kein Prozess gefunden^M
Done.^M
Unpacking nvidia-352 (352.99-0ubuntu1) over (352.93-0ubuntu1) ...^M
Preparing to unpack .../nvidia-352-uvm_352.99-0ubuntu1_amd64.deb ...^M
Unpacking nvidia-352-uvm (352.99-0ubuntu1) over (352.93-0ubuntu1) ...^M
Preparing to unpack .../nvidia-352-dev_352.99-0ubuntu1_amd64.deb ...^M
Unpacking nvidia-352-dev (352.99-0ubuntu1) over (352.93-0ubuntu1) ...^M
Preparing to unpack .../nvidia-modprobe_352.99-0ubuntu1_amd64.deb ...^M
Unpacking nvidia-modprobe (352.99-0ubuntu1) over (352.93-0ubuntu1) ...^M
Preparing to unpack .../libxnvctrl0_352.99-0ubuntu1_amd64.deb ...^M
Unpacking libxnvctrl0 (352.99-0ubuntu1) over (352.93-0ubuntu1) ...^M
Preparing to unpack .../nvidia-settings_352.99-0ubuntu1_amd64.deb ...^M
Unpacking nvidia-settings (352.99-0ubuntu1) over (352.93-0ubuntu1) ...^M
Preparing to unpack .../libcuda1-352_352.99-0ubuntu1_amd64.deb ...^M
Unpacking libcuda1-352 (352.99-0ubuntu1) over (352.93-0ubuntu1) ...^M
Preparing to unpack .../nvidia-opencl-icd-352_352.99-0ubuntu1_amd64.deb ...^M
Unpacking nvidia-opencl-icd-352 (352.99-0ubuntu1) over (352.93-0ubuntu1) ...^M
Preparing to unpack .../cuda-drivers_352.99-1_amd64.deb ...^M
Unpacking cuda-drivers (352.99-1) over (352.93-1) ...^M
Processing triggers for man-db (2.7.4-1) ...^M
Processing triggers for ureadahead (0.100.0-19) ...^M
Processing triggers for desktop-file-utils (0.22-1ubuntu3) ...^M
Processing triggers for gnome-menus (3.13.3-6ubuntu1) ...^M
Processing triggers for mime-support (3.58ubuntu1) ...^M
Setting up nvidia-352 (352.99-0ubuntu1) ...^M
update-alternatives: renaming x86_64-linux-gnu_nvidia_app_profile slave link from /usr/share/nvidia/nvidia-application-profiles-352.93-rc to /usr/share/nvidia/nvidia-application-profiles-352.99-rc^M
update-alternatives: renaming x86_64-linux-gnu_nvidia_app_profile_keys slave link from /usr/share/nvidia/nvidia-application-profiles-352.93-key-documentation to /usr/share/nvidia/nvidia-application-profiles-352.99-key-documentation^M
update-alternatives: updating alternative /usr/lib/nvidia-352/ld.so.conf because link group x86_64-linux-gnu_gl_conf has changed slave links^M
update-initramfs: deferring update (trigger activated)^M
^M
A modprobe blacklist file has been created at /etc/modprobe.d to prevent Nouveau from loading. This can be reverted by deleting /etc/modprobe.d/nvidia-graphics-drivers.conf.^M
A new initrd image has also been created. To revert, please replace /boot/initrd-4.2.0-42-lowlatency with /boot/initrd-$(uname -r)-backup.^M
^M
*****************************************************************************^M
*** Reboot your computer and verify that the NVIDIA graphics driver can   ***^M
*** be loaded.                                                            ***^M
*****************************************************************************^M
^M
INFO:Enable nvidia-352^M
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here^M
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad^M
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/dell_latitude^M
Loading new nvidia-352-352.99 DKMS files...^M
Building only for 4.2.0-42-lowlatency^M
Building for architecture x86_64^M
Building initial module for 4.2.0-42-lowlatency^M
Done.^M
^M
nvidia_352:^M
Running module version sanity check.^M
 - Original module^M
   - No original module exists within this kernel^M
 - Installation^M
   - Installing to /lib/modules/4.2.0-42-lowlatency/updates/dkms/^M
^M
nvidia_352_uvm.ko:^M
Running module version sanity check.^M
 - Original module^M
   - No original module exists within this kernel^M
 - Installation^M
   - Installing to /lib/modules/4.2.0-42-lowlatency/updates/dkms/^M
^M
depmod....^M
^M
DKMS: install completed.^M
Setting up nvidia-352-uvm (352.99-0ubuntu1) ...^M
Setting up nvidia-352-dev (352.99-0ubuntu1) ...^M
Setting up nvidia-modprobe (352.99-0ubuntu1) ...^M
Setting up libxnvctrl0 (352.99-0ubuntu1) ...^M
Setting up nvidia-settings (352.99-0ubuntu1) ...^M
Setting up libcuda1-352 (352.99-0ubuntu1) ...^M
Setting up nvidia-opencl-icd-352 (352.99-0ubuntu1) ...^M
Setting up cuda-drivers (352.99-1) ...^M
Processing triggers for initramfs-tools (0.120ubuntu6) ...^M
update-initramfs: Generating /boot/initrd.img-4.2.0-42-lowlatency^M
Processing triggers for libc-bin (2.21-0ubuntu4.3) ...^M
Log ended: 2016-08-23  19:48:25

Is there a problem due:

Stopping nvidia-persistenced^M
nvidia-persistenced: Kein Prozess gefunden^M

As result:

The NVIDIA graphics driver can NOT be loaded.

... due parts of kernel are not updated - old kernel module 352.93 are used.


Network w/ name (onlyoffice) already exists but unable to locate package when I go to uninstall

This is a docker network.
You should remove it by docker network rm onlyoffice, not by apt-get


lshw not showing individual memory bank info

use :

 lshw -class memory

try it without sudo .

or use sudo dmidecode --type 17


How do I install Ubuntu and Windows 7 on different hard drives, so that Win 7 can still hibernate?

Try installing Windows on your computer and then installing Ubuntu to run beside it. You will have the option of choosing either one at startup that way.


How to update linux-image (kernel) on ubuntu

$ uname -r # shows which kernel there is right now.
$ sudo apt update
$ sudo apt-get dist-upgrade
$ sudo reboot # is important; otherwise till then uname -r still keep showing old kernel.
$ uname -r


Not all drivers support mac changes. Try to change the mac with

  sudo ifconfig wlan1 hw ether 00:0a:0b:0c:0d:0e

and then confirm that the mac was changed with ifconfig -a


I had the same issue with some resolution and iconsize values.
Go to Settings -> Appearance -> Look its the slider at the bottom.
Try chaning the size of the icons one step up or down.


How do I hide the hostname in my terminal

If you are using Powerlevel10k, simply run p10k configure.

If you are using the original Powerlevel9k (you'll know it if your prompt is slow), type this:

echo 'POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir vcs)` >>! ~/.zshrc
exec zsh


Ubuntu server 18.04 with two interfaces set default gateway interface

Sorry for the late update I have been have contact to a netplan maintainer here this afternoon and we got it to work with the version there is in Bionic-proposed repo because some of the functions are not backported to Ubuntu 18.04 yet.

Btw this fix is not for everyone exept you are okay by using testing software there could breake any time

Had to install netplan.io 0.96-0ubuntu0.18.04.3 from https://launchpad.net/ubuntu/+source/netplan.io/0.96-0ubuntu0.18.04.1

After that then he guided me to use dhcp4-overrides sections in the config to change the metric of the interfaces and in the end ended I with this configuration https://pastebin.com/jfkuSzZ0

Just because heynnema asked so here is the lshw -C network to show all interfaces including the two hard-wired interfaces ( mac addresses are removed because of else ipv6 could be guessed ) https://pastebin.com/PAqimGK5

and with those changes then it works. The default gateway route is only added for the interface there is for my network and dns settings is also only from my network.

But I have to say its again the backport to get dhcp4-overrides and dhcp6-overrides to work in 18.04 is still only in testing so it could breake at next update so as always use this at own risk


How to add any language[punjabi] in Libre office 3

First you have to add the Punjabi language to the list of keyboard layout languages, so that you can switch back and forth between your system's default language and Punjabi by clicking on the language switcher icon in the system notification area next to the system clock. Click System Settings (in the Launcher) -> Keyboard Layout and you will see the Keyboard Layout window shown below. In 14.04 and later the navigation shown below has been  changed to System Settings -> Text Entry.

Click on the + button in the lower left-hand corner of the Keyboard Layout window to open the Choose a Layout window shown below:

Select your new keyboard layout language from the list and click Add to add Punjabi to your keyboard layout languages.
The part of your question about how to add Punjabi language features to LibreOffice is answered in great detail in the illustrated document LibreOffice Getting Started Guide. This document contains a complete description of everything you need to do to add a language to LibreOffice on page 55, including how to:

Install the required dictionaries
Change some locale and language settings
Choose spelling options


Installed Ubuntu Studio, got standard version

Do you get a "Grub version 2.0" menu when you boot up or do you get the Windows or Other menu? The Grub menu says Grub version 2.0 at the top of the screen. If you get the Grub menu, you can update that menu if it does not show all installed operating systems.
    grub-mkconfig
You may need to run this as sudo.
More help can be found here.
http://www.gnu.org/software/grub/manual/


To reference the eth0 interface as an interface in the bridge, you must also declare that physical interface in your yaml, even if you have no other configuration to attach to it.  I.e.:

network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      dhcp4: false
  bridges:
    br0:
      dhcp4: yes
      interfaces:
        - eth0

The netplan.io example should be updated to reflect this.


How to set the default audio recorder application?

Try this:

Install pavucontrol (Pulse Audio Volume Control) using apt-get
Open it (should be in the Sound and Video category)
Go to the Recording tab
Select the "Applications" drop down menu
Look for the "Record from" menu and select audio-recorder


I can I install a 32 bit version of libsdl1.2debian on a 64 bit machine?

Try this to install 32bit package on 64bit machine

sudo dpkg --add-architecture i386
sudo apt-get update

then install your any 32bit packages:(ex: with package that you want to install it)

sudo apt-get install libsdl1.2debian:i386


Can't change brightness of laptop in ubuntu 14.04 / 15.04

i can recommend you to upgrade to newer kernel, or you can try to create file /usr/share/X11/xorg.conf.d/20-intel.conf with this code in it:

Section "Device"
        Identifier  "card0"
        Driver      "intel"
        Option      "Backlight"  "intel_backlight"
        BusID       "PCI:0:2:0"
EndSection


Why won't Ubuntu Terminal accept "\" character?

One possibility is that the backslash key has become bound to some readline command (readline is the library that allows in-situ editing of shell commands, for example binding Ctrl+h to the backward-delete-char action).

To test if that might be the case, you can try starting a bash subshell with readline editing disabled

bash --noediting

If the backslash key works in that subshell, then the places to look for the rogue keybinding definition would be /etc/inputrc for the global configuration and ~/.inputrc for per-user configuration. You could also try printing out and searching the currently defined keybindings from the command line using

bind -P | grep '\\\\'

The extra backslashes are required because a literal backslash will appear in the readline configuration as \\, each of which needs a further escape in the shell. Obviously you can only do that in the subshell, if the backslash is being bound in the regular shell.

FYI there is a bind command option to remove a binding, but it is not clear how to input the keyseq argument when it is already bound

-r  keyseq         Remove the binding for KEYSEQ.

For further information see help bind in the bash command line


Wireless Power Manager Problems in Ubuntu 15.04

Try to do a clean install and see if your problem persists. It should be solved on a clean install. Backup your data first and then do a fresh Ubuntu 15.04 install.


CR2 Photos compressing from Windows 7 to Ubuntu

The image viewer shows the preview image which is embedded in the RAW file and tells correctly its size. Also, the website is not converting the raw, it just extracts the preview image.

You don't need a webtool to extract the preview, you can do the same yourself with ufraw:

Install:

sudo apt install ufraw

Extract thumbnail:

ufraw --embedded-image FILENAME.CR2

for all files in the current folder:

ufraw-batch --embedded-image *.CR2

Generally speaking, camera raw formats are not made for viewing, thus showing the preview image is the right thing to do for an image viewer.

For "real" converting the raw images in full size, you need a raw converter, e.g. Darktable, Rawtherapee or ufraw.
You can install all of these from Ubuntu Software.

Note that you need a lot of time, experience and practice to get everything out of your Photos. Otherwise you might be unhappy with the results. Maybe you should better tell your camera to save the shots directly in JPEG or get the best of both worlds saving both RAW and JPEG (this is what I am doing).


Make a backport for a 32 bit system using prevu on a 64 bit system

prevu isn't the recommended tool for backports (it's largely unmaintained).

We use the backportpackage tool in ubuntu-dev-tools. You can either do the build in a PPA or on your machine, using pbuilder-dist / pbuilder / sbuild.

For a PPA, it'd look something like this:

$ backportpackage -u ppa:YOURUSERNAME/YOURPPANAME THEPACKGE

Of course, many packages aren't automatically backportable, and will need modifications. But for the ones that are, this will work.


No linux-tools for stable kernel release

You can install linux-tools this way.

sudo apt-get install linux-tools-generic-lts-utopic

But it looks that you never updated your system. Kernel is outdated. Run

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

That will get your kernel and other software up to date. Versions of linux-image and linux-tools will match after reboot.


Be careful when disabling animations with Gnome Tweaks (installed from the Ubuntu Software Center). If abnormal behavior persists try re-enabling animations. This fixed my glitch.


I created an answer so that we can close this topic. As it turned out, some configuration files were missing or were faulty. So the solution was to purge apache2 by runinng sudo apt autoremove --purge apache2 and then install apache2 again with sudo apt install apache2.

Remember that sudo apt purge PACKAGE removes the configuration files. The sudo apt clean command just deletes the downloaded .deb files so that you can gain some disk space.


The reason that you see the copying happening the way you do is that writes to the USB drive are asynchronous.

When you copy a file it actually copies it in to the usb drive's buffer, which is in the RAM of your computer. The first part of the copy is very fast because it is just going in to the buffer. The data is flushed from the buffer to the USB drive at a much slower rate. Once the buffer has filled up it has to wait for some of the data to be flushed to disk before it can place any more in the buffer, so the copy then slows right down, effectively to the speed of the USB drive. Once all the file has been placed into the buffer it appears that the file has been copied. However not all the data has been flushed from the buffer onto the USB disk itself. Some copy programs just return and let that flushing carry on in the background. Some will wait until all the data has been flushed, which is why it will stay on 100% for some time.

You can switch the disk into synchronous mode which means that all data is immediately written to the USB drive without using the buffer. This will give the impression of a smoother transfer of data, but may actually end up with an overall reduction of speed.

If you manually mount the disk from the command line you can add -o sync.

If you mount it using fstab you can add the sync option.

If you rely on Ubuntu mounting it for you when you access it in the GUI you can modify the mount options from the command line once it is mounted:

sudo mount -o remount -o sync /media/yourname/diskname


Requiring IPv4 addressing for wi-fi connection in Bionic?

If you run the nm-connection-editor program, you can enable this setting again.


Is there any way I can see my APM (Actions per Minute) in Ubuntu?

I have one possible solution. I didn't find any app similar to desktopapm on Linux. However, I workaround this lack using Wine to install desktopapm on Linux (mint). If you don't have in your computer, I can download it bi this link:
https://www.playonlinux.com/en/download.html
If you aren't familiar with this tool, check out its home page. Then, you ought to download the .exe file in:
http://www.desktopapm.com/about.php
Run playOnLinux and try to install it using x64 architecture, I used the version 5.0-rc1-staging for the Wine. I think everything is going on well until now. Actually PlayOnWine is a very tricky app, It usually has some trouble. But as its app is very simple, maybe it works.
Have a look of this application running on my Linux:

I don't know if this program is tracking correctly the inputs that you are typing on Linux. Please give feedback if it is working fine there.
I hope to help you.


Pair Bose QuietComfort 35 with Ubuntu over Bluetooth (2)

I have a similar issue with a bluetooth (BT) headset, my solution was:

Open bluetooth (BT) manager (it should show a list with all BT defined)
If yours is not there,
Set the headphones(hp) to 'discover mode' and run a Search on the BT manager
This should discover the hp and they should appear now. They may not connect though, in that case:
Right-click on the hp name and select headset, this may still not produce sound,
Right-click again on the hp name, this time there will be a new option, 'audio profile'
Select High Fidelity Playback (A2DP sink)
Now open your 'Sound Settings' and select your headphones and adjust volume.

Hope this helps.


You can use boot-repair

Insert your Ubuntu live (desktop) CD or flash drive, reboot your computer from CD/Flash drive into a live, desktop session.

Install and run Boot-Repair

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

Click "Recommended repair" -> apply.

For other options, see https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows


How can I make a keyboard shortcut to have the screen turn *and stay* off?

I suspect the screen comes back on is because you've just fired a keyboard event. It works on my computer but that could be explained by event timing, bus types, who knows.

Anyway, try giving it a bit of lead time for any X events to seep away:

sleep 1 && xset dpms force standby


What daemon torrent clients are available on Ubuntu?

Allmost all GNU/Linux torrents have daemons these days. I use Transmission on my server at home (it is also the default torrent client installed on the desktop), but you can also use Deluge, uTorrent and many others.

Transmission

Uses fewer resources than other clients
Native Mac, GTK+ and Qt GUI clients
Daemon ideal for servers, embedded systems, and headless use
All these can be remote controlled by Web and Terminal clients
Local Peer Discovery
Full encryption, DHT, µTP, PEX and Magnet Link support

Deluge server install topic on AU.

  Deluge is a full-featured  BitTorrent client for Linux, OS X, Unix and Windows. It uses  libtorrent in its backend and features multiple user-interfaces including: GTK+, web and console. It has been designed using the client server model with a daemon process that handles all the bittorrent activity. The Deluge daemon is able to run on headless machines with the user-interfaces being able to connect remotely from any platform.

uTorrent server install. Old but should still work and a start up script (if still needed).

You might also be interested in flexget. It can be used with programs that use aw watch-directory (all 3 mentioned above do).

  FlexGet is a multipurpose automation tool for content like torrents, nzbs, podcasts, comics, series, movies, etc. It can use different kinds of sources like RSS-feeds, html pages, csv files, search engines and there are even plugins for sites that do not provide any kind of useful feeds.


Using a secure FTP connection without SSH

I don't know which FTP server you've looked at but there are several available.
For example proftpd is available for Ubuntu and offers SSL.

Apart from don't confuse the various protocols:

FTP: the old file transfer protocol which has different TCP connections for commands and data and which is a pain to use when different networks or firewalls are involved. But, it has easy support for anonymous connections and often also supports users which have nothing to do with the system users.
FTPS: the FTP protocol secured with SSL/TLS. More secure but even more painful to make it work if multiple networks or firewalls are involved.
SFTP: file transfer over the SSH protocol. This is something completely different to FTP and FTPS. It uses only a single TCP connection and is usually easy to tunnel. But, anonymous connections or using user accounts which are not also system accounts are usually not supported by the implementations.


Lsqman isn't in the Ubuntu repositories and never has been.

They do offer downloads and rough instructions on how to get and install it. I'd follow those.


I would use GParted for this, but be careful so you don't click on the wrong drive and format and erase the wrong drive, such as your Ubuntu installation, or some other drive with a bunch of valuable data.  You might want to disconnect any extra drives from your system before you do this.

You can install GParted by typing this in a terminal:

sudo apt install gparted


I'd recommend Lubuntu and Xubuntu, these are the more lightweight versions of Ubuntu.

Link to their websites, where you can download them:

Lubuntu
Xubuntu

And Here you can find a tutorial to install them (just like Ubuntu).


sudo apt-get update subprocess returned an error code

Use update-alternatives to put the default python version back to what it was. I am also running Ubuntu 18.04 my python version is 2.7.15

$ python --version
Python 2.7.15+

Then I would recommend looking into setting up virtual python environments using venv (venv in python3 and virtualenv for python2) for testing or running programs that require python 3.

First, make sure you have pip installed by running sudo apt install python3-pip or ensure that it is up to date by running python3 -m pip install --user --upgrade pip.

Then install venv by running python3 -m pip install --user virtualenv

I hate to link you to an outside webpage but there are clear instructions on doing this on the python.org website. You can find a link to the site at here


Which version of Ubuntu is recommended for Samsung N270 notebook?

According to the requirements listed in the Ubuntu wiki, your build should be more than capable of handling 12.04. I run it myself on a 9 year-old machine with only a single core (and considerably less memory) fine.

Definitely install your graphics driver. Type lspci | grep 'VGA' in at the command line ('terminal' application) to find out your graphics card. Search for the model number to find out which package, if any, you need to install to get the relevant driver.


Toggle terminal between minimized and restore with hotkey

There are 5 steps for this:

Go to Settings > Devices > Keyboard Shortcuts

Create Custom Shortcuts
Name: Tilix
Command: tilix --quake
Shortcut: Ctrl + Space (Anything you prefer)

sudo nano .zshrc

Add following instructions there
 prompt_context() {
   if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then

   fi
 }
 AGNOSTER_PROMPT_SEGMENTS+="prompt_end"

Save and restart terminal


Is it recommended to apply the new said-great 200 line Linux kernel patch?

The famous "200 lines patch" will not improve the performance of your computer. However it may improve your user experience while having your computer heavily loaded : it improves the responsiveness of your desktop.

You could find some information at Phoronix. There are also already compiled kernels available for Ubuntu 10.10 here but I recommend NOT testing this patch unless you fully understand what it does and how it works.

The patch will probably be included in Ubuntu 11.04, see here.

The alternative you present, as far as I know, only apply to processes launched from a terminal.


I have fixed this by using this link

http://www.iasptk.com/ubuntu-fix-broken-package-best-solution/


Your sources for apt-get are stored in /etc/apt/sources.list, so if you really just want to remove a source, you can edit that file and remove the appropriate lines.

However, do you still have virtualbox installed? If you do, you will probably need to put the correct info into sources.list. From virtualbox's website:

Debian-based Linux distributions

Add one of the following lines according to your distribution to your /etc/apt/sources.list:

deb http://download.virtualbox.org/virtualbox/debian trusty contrib
deb http://download.virtualbox.org/virtualbox/debian saucy contrib
deb http://download.virtualbox.org/virtualbox/debian raring contrib
deb http://download.virtualbox.org/virtualbox/debian quantal contrib
deb http://download.virtualbox.org/virtualbox/debian precise contrib
deb http://download.virtualbox.org/virtualbox/debian lucid contrib non-free
deb http://download.virtualbox.org/virtualbox/debian wheezy contrib
deb http://download.virtualbox.org/virtualbox/debian squeeze contrib non-free

So perhaps try changing the virtualbox lines in /etc/apt/sources.list to one of those lines above (choose the lines which matches your version of ubuntu).


Sure. The mechanism of exploitation can work on multiple vectors as highlighted today. You just need something that eats a environment variable, goes on to run bash, and is running as root.

Will I give you an example? No.


You have errors in both Opera's and Intel's PPAs.

wget -qO- https://deb.opera.com/archive.key | sudo apt-key add -
Source
Intel Graphics drivers are already installed and are open-source, updated along the rest of the system whenever deemed necessary. This are drivers, not applications. You're certainly referring to the Intel Graphics for Linux tool you already used and certainly don't need, and not an app. Ubuntu 16.04 comes with fairly recent Intel drivers. There's little, if anything, to gain from the minor revision updates provided at Intel's PPA.

If you want to use it anyway then please follow all the instructions at the download's page. Here's what you should do now, in a nutshell,

wget --no-check-certificate https://download.01.org/gfx/RPM-GPG-KEY-ilg-4 -O - | sudo apt-key add -

sudo apt update && sudo apt full-upgrade

No need to run the installer again. FYI, all it does is opens a GUI (nothing wrong about that), adds the PPA, update && dist-upgrade. This is where it fails when users don't follow the instructions adding the keys as above before running the installer.


unable to install ubuntu 13.04 from external drive

May be this can help you. Just try once..

You have to follow these very simple steps..

Connect your external HDD and start your system. This time boot from your Ubuntu LiveCD/DVD inserted and select 'Try Ubuntu' (not 'Install Ubuntu'). When system starts open ternal (CTRL+ALT+T) and execute following commands:

Installing boot-repair ( a good s/w to fix grub ):

    $ sudo add-apt-repository ppa:yannubuntu/boot-repair
    $ sudo apt-get update
    $ sudo apt-get install boot-repair
    Run boot-repair from your system or type: (boot-repair &) in terminal

When started select Option 'Recommended Repair' from out of two options:

'Recommended Repair' & 'Advanced Options'.

Follow very easy onscreen instruction, it will build/fix your grub..

Restarting your system may list all the Operating Systems installed in your all HDD.

Be sure that you have properly shut down your Windows 8 OS, before starting these steps.


Verifying a large directory after copy from one hard drive to another

You can use md5sum:

cd /path/to/old/data
find . -type f -exec md5sum {} \; > MD5SUMS
mv MD5SUMS /path/to/new/data
cd /path/to/new/data
md5sum -c < MD5SUMS

This would take a long time, considering you have 1.7TB of data, just like every other verification method.


Average of CPU and memory use of ALL process that appear during some time interval

systemd-analyze plot > filename.svg

Borrowed from another relevant answer


Failed to load session "ubuntu" problem (maybe a error with Compiz?)

Press CTRL+F2 for command screen.

sudo apt-get update
sudo apt-get install unity-2d
sudo apt-get install ubuntu-desktop
sudo apt-get install compizconfig-settings-manager
sudo apt-get install compiz-plugins-extra
sudo apt-get update


How difficult is it to "translate", for example, Windows 7 drivers into what is required for Ubuntu?

Difficult. Besides that you are not even allowed to look at the code since it is protected by copyright laws.

  I am looking for drivers for my Epson Stylus CX4300 for Ubuntu 12.04 LTS

In general this is NOT how Linux works. We have -generic- drivers. This means we have a driver that supports a range of printers (and if you printer fits in that range it is supprted though specific options might not be in that driver).

This printer works with the standard printer utility. But you might need to choose a driver for it from the printer installation menu that is close to your printer.
It is not listed on http://gimp-print.sourceforge.net/p_Supported_Printers.php but similiar printers are...

Printer Model   Driver Name Epson
Stylus CX4100   escp2-cx4100 Epson
Stylus CX4200   escp2-cx4200 Epson
Stylus CX4400   escp2-cx4400 Epson
Stylus CX4500   escp2-cx450

So install it as a CX4200 or CX4400 and it will print.

The scanner is another matter. You can use this as a guide: How do I get an Epson Stylus DX4450 - All-In-One Printer/Scanner working?  but you need to get the printer to work 1st.


Can't start LightDM after recent kernel update

For me the analisis of: "cat /var/log/lightdm/x-0-greeter.log" showed that I had to create the lightdm directory. It was missing. After running the following commands I fixed my machine.

mkdir -p /var/lib/lightdm
chown -R lightdm:lightdm /var/lib/lightdm
chmod 0750 /var/lib/lightdm


You can't simply install an apk as you did installed on a real android device (Officially).

you can try this:

1)Go to www.apkpure.com and download your apk

2)Install adb-tools by  running this comment inside the terminal

sudo apt-get install android-tools-adb

3)Run the following command to install your apk

adb install /your_apk_folder_loaction/your_apk.apk


"Authentication required. System policy prevents WiFi scans" in FocalFossa

It would not be recommended to change your network setting while connected through xRDP. If something goes wrong, you will loose your xrdp connection and you will need to logon locally to check your settings.
In practice, yes, you could create a pkla file (under /etc/polkit-1/localauthority/50-local-d)  and populate it with the following info...
[Allow Wifi Scan]
Identity=unix-user:*
Action=org.freedesktop.NetworkManager.wifi.scan;org.freedesktop.NetworkManager.enable-disable-wifi;org.freedesktop.NetworkManager.settings.modify.own;org.freedesktop.NetworkManager.settings.modify.syste>
ResultAny=yes
ResultInactive=yes
ResultActive=yes

As you can see, the pkla file does a little bit more than authorizing Wifi Scans...Please adapt as required
Hope this help
Till next time
See ya


How to enable a printer every 2 min with crontab

cron uses a minimal PATH (only /usr/bin and /bin, by default), so you need to provide it either in the command or as a parameter in cron.

*/2 * * * * /usr/sbin/cupsenable -E myPrinter

===

I would suggest to check the log files in /var/log/ for a log file that gets updated when this happens and check why the printer is getting disabled. You might have a network problem or it might be the printer telling the system it has a problem. That problem is likely logged in /var/log/syslog.


Can I use Xen virtualization/paravirtualization when my processor doesn't support VTX?

Yes you can use Xen.

But you can only use paravirtualization, so that you need a modified guest OS.

Modified Windows guest suitable for paravirtualization are not available, so you can only use Linux guests.


How to get I/O priority to work on Ubuntu?

You have to change your scheduler from deadlineto cfq.

You can do that per blockdevice and non permanent via

sudo echo cfq > /sys/block/<blockdevice>/queue

Or for the whole system, permanent via grub, with adding the elevator=cfqparameter to the grub commandline options.

This is an excellent post explaining how you can do that.

What the drawbacks of such a change are is better covered elsewhere.

The TL;DR is

  According to the test results, each scheduler has different advantages
  over others. CFQ scheduler is suitable for the systems that require
  balanced I/O access and do not need process prioritization. Deadline
  scheduler  has  better  performance  on read-intensive works. Noop is
  for the systems on the cloud or hypervisors. BFQ performs better on
  interactive  use-case  scenarios.  Noop  is  the simplest scheduler
  and it is considered to have the potential for optimized new
  implementations targeting SSD block devices.


Desktop Icons replaced with Home folder contents

Check this setting using the Dconf Editor (dconf-tools):

org > gnome > nautilus > preferences > desktop-is-home-dir

Uncheck it if it's checked.

You may need to reboot so the ~/.config/user-dirs.dirs file can be rewritten and reloaded.


welcome to Askubuntu!
Would this work?
In a terminal, type:
gsettings set org.gnome.desktop.sound event-sounds false


Note: test/debug kernel versions higher than your default kernel, e.g. 3.3, 3.4, 3.5, etc. are only provided via deb files, not via this PPA.

You probably want to add this PPA-- the only active one the kernel team maintains -- containing the latest pre-proposed kernel for each release:

ppa:kernel-ppa/pre-proposed


Can't find ALL wireless networks, just my neighbours

The problem with 11.04 is that some drivers no longer support (2.4 GHz) channels above 11. You may find that you need to change the channel to 11 or less.


How to make Ubuntu kill the problematic process when it goes out of RAM?

By default Linux has an "oomkiller" ("Out-of-memory killer") which will try to guess which process makes most sense to kill and if neccessary kills it. Unfortunately as you already stated it is rather difficult to make the right guess, so result can be somewhat random, including freezing up your system.

The oomkiller ca be influenced by several means. Check this page for some more details on how it works and how to influence it.


This is the result of You executing some command, which produces logging/debugging output (maybe because of a parameter you specified, who knows?). The program is responsible for its output, some of which may be erroneous or binary. How is this a problem? To make ALL (mostly) of the error messages go away, append 2>/dev/null to your command.


To check the checksum of a file (e.g. sshd_config) you could use:

 check file sshd_bin with path /usr/sbin/sshd
   include /etc/monit/templates/rootbin

In /etc/monit/templates/rootbin is defined:

 if changed checksum      then alert

I've not tested it with whole directories but you could give it a try.


How to run multiple terminals on remote ubuntu server through ultravnc?

I think Tmux would be a nice solution to your problem. It is a terminal multiplexer.

  What is a terminal multiplexer? It lets you switch easily between several programs in one terminal, detach them (they keep running in the background) and reattach them to a different terminal.

Screen is another option. This binary ships with Ubuntu by default.

I prefer Tmux above Screen. Tmux can split screens, has a statusbar and support Vi like key bindings which, for as far as I know, Screen does not support.


Installing Different Versions of a Package

That will not work. You are using Ubuntu 12.04 or 14.04. How do you expect the system to know about the 1.4 version from a newer Ubuntu release?

If you want to install the newest version you could install from the personal archive https://launchpad.net/~nick-nickdowell/+archive/ubuntu/amsynth-master-daily Mind though: this will also probably uprade 1.3 to 1.4.

If you really want 1.3 and 1.4 together you need to install one of these from source so you can tell it to install in another directory.

You can pick "raring" as the latest release and version 1.4:

deb http://ppa.launchpad.net/nick-nickdowell/amsynth-master-daily/ubuntu raring main
deb-src http://ppa.launchpad.net/nick-nickdowell/amsynth-master-daily/ubuntu raring main

Signing key:
    1024R/062A9BBC (What is this?)
Fingerprint:
    D0BE1A6EB1A1DE103853721C1583CFE1062A9BBC


How can I make a detailed report of ClamAv scan results (location of infected files)?

I use sudo clamscan / --recursive | tee clamscan.log, so that I can both watch the results go by, and inspect the whole output afterward.


Way to many steps to explain, but here http://www.howtoforge.com/perfect-server-ubuntu-12.04-lts-apache2-bind-dovecot-ispconfig-3

This is the easiest method since you need to know almost nothing to get everything up and running.  Just follow the tutorial.

After you get everything going just setup your DNS and then your sites and users.  I usually use ssh/sftp over ftp since it is encrypted, but either should work once you create an account.  They should also all be in virtual hosts so no need to worry about wrong permissions.  Just make sure you keep them in the "jail" when creating the user account.  This will all make more sense once you play around with ISPConfig


You need:

${APP_NAME}_nginx

This will make bash expanding the variable APP_NAME to its value and adding _nginx to it.

Here is a test:

$ APP_NAME=check
$ echo "$APP_NAME"
check
$ echo "$APP_NAME_var"

$ echo "${APP_NAME}_var"
check_var


nouveau failed to create 0x00 ... after install gtx 1080

The 'new' NVIDIA GTX 1000 graphics adapters have compatibilty issues with the nouveau drivers.
Add the parameter nouveau.modeset=0 at the end of the linux line before booting the system.

Highlight the Ubuntu entry and press the E key to add the parameter, then press F10 to boot.
To make this solution permanent, add the parameter to GRUB configuration in /etc/default/grub.

Open a terminal and execute the following command : sudo nano /etc/default/grub

Add nouveau.modeset=0 to this line : GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
that it reads : GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nouveau.modeset=0"

Press Ctrl + X and confirm the change you've made by pressing Y.
Then execute : sudo update-grub to update the GRUB configuration.


Python application has no icon in Unity launcher

I don't think icon in .desktop file takes full path. I think it takes the name of an icon and searches for that icon in the current icon theme.

Try to put that icon at ~/.icons/google-reader.png and in the .desktop file just put

Icon=google-reader


TeX-live included with Ubuntu is very old (2009 version). You should install the latest 2011 version from here.

That includes a TeX package manager called tlmgr, which makes installing any package from the CTAN library extremely easy. You can then install the package with tlmgr install chemfig.

Note that chemfig uses TikZ as its backend, but tlmgr should also take care of such dependencies for you.


Mouse pointer lag on Ubuntu 16.10 correlated with use of graphics card

I found a solution to my problem. At first I rebooted my computer and entered the BIOS settings using F2 key. Then I changed the Touchpad settings from Advanced to Basic.

Please note that this solution is likely to be hardware-specific - I am using Acer Aspire E 15. You can also check out this thread on Ubuntu Forums where I've found it.


Is it possible to deploy to specific machine with bundle

Yes, you can do machine placement with a bundle, note to to argument:

bundlename:
  services:
    mysql:
      # The only machine id supported is machine 0
      to: 0
    wordpress:
      units: 3
    redis-server:
      units: 3
      to: [lxc:wordpress, wordpress]
    ceph:
      units: 4
      to: [wordpress, wordpress, wordpress, wordpress]
    serenade:
      to: lxc:wordpress=2

I do not think it's possible to deploy to a specific machine # other than 0 (because we probably don't know the number until after deployment), so it might be useful to deploy to other service names instead of unit numbers.

Reference:

http://pythonhosted.org/juju-deployer/config.html#placement

Another option might be to use use machine constraints to ensure you get a certain class of machine.


During installation, do I need an ethernet cord to connect to the internet?

This question is fairly vague, but in brief, the answer is "no" - the Ubuntu installer will allow you to pick a WIFI network for installation. Even then, a connection to the internet is only recommended, not required, to complete Ubuntu installation.


System cannot get past Ubuntu login after update

Reset Unity

unity --reset

Reset Unity Launcher icons

unity --reset-icons

Reset Compiz

gconftool --recursive-unset /apps/compiz-1
gconftool-2 --recursive-unset /apps/compiz-1
unity --reset

log out and log in again


SSH. Too many logins for Username. Why if i have logged only 2nd time and have tmux ssh in other servers tmux?

Someone will likely know more than me for this, but I know it's the case that
every tmux split pane adds one more instance of USER to the list of logged in
users. So if you had 9 tmux panes (perhaps distributed through a number of
sessions and windows) that will show as you being logged on 10 times.


Unable to uninstall GNOME Shell Extension 'Sensors'

I finally found a fix by myself, found that extension file in the location /usr/local/share/gnome-shell/extensions and fixed it by deleting the extension's folder. Hope this helps for anyone having my issue.


install python module for certain python binary

Python module installed from apt are usually named python3-xxx, but for some reason, there is no python3-mapscript.

If you cannot install this module over pip, I can suggest you to try to make your own python deb package, you may find many tutorial on internet to achieve this.


If you are seeing /tmp in the output of  ls -l / command, you can give it proper permission  by typing

sudo chmod 1777 /tmp .


.bachrc $PATH doesn't find my python scripts

In order to start the script from $PATH -- You shouldn't start python scripts as

python scripy.py

This way You'll only run scripts in current directory. Instead start the script with a hashbang:

#!/usr/bin/env python

make it executable

chmod +x script.py

put it somewhere in your $PATH and then You'll be able to run it from Your shell.

script.py

If You'd also like to call it from other programs, such as krusader or what ever -- You'd need to add it to a login shell $PATH -- that is for example to add it's path to ~/.bash_login or ~/.profile.

By the way in windows python scripts are started as

python script.py

because windows shell (command) doesn't support hashbangs.

The reason to use

#!/usr/bin/env python

instead of

#!/usr/bin/python

is that with the first approach You can control which python to run -- if Your site has multiple pythons installed. env will run the first python in Your $PATH. You can get a list of all executables python in Your site with

 which -a python


Strange jdownloader ppa package behavior

As I can see from the current buildlog of the PPA, the script file /usr/bin/jdownloader is not included.

You should notify the maintainer about it: Benjamin Drung bdrung@debian.org

You can also download JDownloader from here:http://jdownloader.org/download/index and choose Other.


Gnome Software - is there a search function?

1: As pointed out in comments, there's a little magnifying glass icon. Click on that to get a search bar:

2: Are you really sure you want to install Konqueror on your Xubuntu system? As pointed out in comments, it may pull in many dependencies because it uses a different toolkit, qt, than applications present normally on Xubuntu which is gtk2/gtk3.

3: Unfortunately, even though Konqueror is available in the universe repository (and the universe repository is enabled on the desktop version of all Ubuntu flavors), gnome-software doesn't seem to find it, both on Xubuntu 18.04 and on Ubuntu 18.04:

Konqueror not found in Xubuntu 18.04

Konqueror not found in Ubuntu 18.04

However, Synaptic Package Manager and the terminal route have no difficulty in finding and offering to install Konqueror.

Synaptic Package Manager finds Konqueror in Xubuntu

Terminal output

dkb@dkb:~$ apt policy konqueror
konqueror:
  Installed: (none)
  Candidate: 4:17.12.3-0ubuntu1
  Version table:
     4:17.12.3-0ubuntu1 500
        500 http://in.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages

The apt policy output tells me that Konqueror isn't currently installed but is available.

Installing Konqueror from the command-line:

All that is needed is for you to run sudo apt install konqueror from the terminal and to provide your password. There'll be a lot of output because Konqueror pulls in many dependencies (and maybe some additional recommended software) on Xubuntu. Anyway, the last few lines of output look like this:

0 upgraded, 134 newly installed, 0 to remove and 0 not upgraded.
Need to get 83.5 MB of archives.
After this operation, 341 MB of additional disk space will be used.
Do you want to continue? [Y/n] n

Some concluding comments:

I don't know why you want to install Konqueror but I suggest thinking twice if you're new to Linux and someone has casually recommended you install it.
I feel "Software Centers" such as gnome software and KDE's Discovery are works in progress and shouldn't be regarded as final authorities on what can or can't be installed.
Synaptic Package Manager is totally worth installing even if you don't need it immediately.

Further reading:

What are dependencies
What are recommends
Toolkits in Linux: here and here


Eclipse theme is stuck as a basic flat theme

Preferences > General > Appearance

You will see three options, swap and pick what fits u

Good luck


Here's my smb.conf file. Whats wrong with it?

There are a couple of things you need to know about the samba configuration file. Well, i'm lying. There is a lot you need to know (I had to spend a couple of days reading through the manual). But to sum everything up it depends on where you are sharing the folder from.

If the folder is inside your home folder, you can simply right click the folder, select sharing and follow the options provided. Easy solution.

If the folder is outside your home folder, for example, in /media/username/movies, the fastest way of sharing the folder is to put in the [global] section in the smb.conf file force user = USERNAME where username is your user or the owner of the shared folder. This has several security implications but is nonetheless, the fastest way of sharing if you are on a LAN and trust the rest of the group.

If you already did the 2 mentioned above for each case, you then need to check if you are actually on the same LAN network (Check IP class), same subnet and same workgroup. For the latter, you can change the workgroup in the smb.conf under the workgroup = variable.

If you already have done all the steps mentioned above then we proceed to see if the permissions are correct:

Does the share folder actually have the username as owner?
Does the share folder have read/write/execute permissions?
Can you access the shared folder from another Ubuntu PC or another version of Windows?

Depending on this answers you can most likely know where the problem is coming from. Most of the time, it is, in my case, a Windows 8 problem. Windows 8 has several options that you need to change in the "Network & Sharing" menu in order to see the LAN correctly (This applies not only to seeing Ubuntu shared resources but also other Windows versions like XP and 7).

There are tools to simplify the sharing of folders outside the home folder like the system-config-samba package, but they help to a degree. You can also check man smb.conf to see a lot of information regarding this file, specially the part about security which I would recommend reading this https://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/ServerType.html#id2559439 which is better for the eye than the man pages. Specially the part about security = user.

Here is an example of a working samba share /media/cyrex/movies working for another Windows 7, Windows 8 and 2 Ubuntu PCs in the same IP range and Workgroup:

[global]
    workgroup = WORKGROUP
    server string = %h server (Samba, Ubuntu)
    dns proxy = no
    force user = cyrex
    log file = /var/log/samba/log.%m
    max log size = 1000
    syslog = 0
    panic action = /usr/share/samba/panic-action %d
    encrypt passwords = true
    obey pam restrictions = yes
    unix password sync = yes
    passwd program = /usr/bin/passwd %u
    passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
    pam password change = yes
    map to guest = bad user
    usershare allow guests = yes

[printers]
    comment = All Printers
    browseable = no
    path = /var/spool/samba
    printable = yes
    create mask = 0700

[print$]
    comment = Printer Drivers
    path = /var/lib/samba/printers

[movies]
    path = /media/cyrex/titan/movies
    browseable = yes
    guest ok = yes

The only lines I added where the force user = cyrex in the [global] section and the section for the [movies] which was made by the system-config-samba app but you can also do it by hand.

After that just sudo service smbd restart and wait a couple of seconds/minutes for the switch/router/network devices to update.


How to implement the MSG_DONTWAIT on a recv call

This is not an error but an expected behavior. The documentation of MSG_DONTWAIT states:

If no data is available, then instead of blocking, return immediately with the error EAGAIN.

Which means that you should wait for and handle such situation.

Check here for the reference and here for a similar discussion.


Fallback Mode on Intel HD 4000 on Ubuntu 12.04.1?

to install gnome3 on ubuntu 12.04 :

sudo add-apt-repository ppa:gnome3-team/gnome3
sudo apt-get update
sudo apt-get install gnome-shell

Now be sure to reboot your computer and when you are prompted with your login screen you have additional options (click on the little Ubuntu icon next to your login name)

install gnome tweak tool:

sudo apt-get install gnome-tweak-tool

**According to what you've mentioned the VESA is the right driver for intel graphics


How to set trackpoint speed for Thinkpad?

create a file called .xessionrc and put these command into it:

#get the device ID for the trackpad. We know it contains the string "TPPS"
ibm_trackpad_id=$(xinput | grep 'TPPS' | cut -d"=" -f2 | cut -f1)
echo $ibm_trackpad_id > ~/temp/ibm_trackpad_id

#set desired params for trackpoint
xinput set-prop $ibm_trackpad_id "Evdev Wheel Emulation" 1
xinput set-prop $ibm_trackpad_id "Evdev Wheel Emulation Button" 2
xinput set-prop $ibm_trackpad_id "Evdev Wheel Emulation Timeout" 200
xinput set-prop $ibm_trackpad_id "Evdev Wheel Emulation Axes" 7 6 5 4
xinput set-prop $ibm_trackpad_id "Device Accel Constant Deceleration" 0.10


Solved.

Looked carefully at the /var/log/syslog (thanks to mikewhatever) and figured out that the kernel might not be the most suitable one (--end trace--- error).

Switched from a 4.10 release to a 4.4 release instead and it's working perfectly now, this solved all the issues mentioned above.


I managed to get the CD slider to show up in alsamixer. This is based on the description found at http://www.spinics.net/linux/fedora/alsa-user/msg11769.html

First, create a file /lib/firmware/hda-init.fw with the following contents:

[codec]
0x10ec0888 0x14627522 0

[pincfg]
0x1c 0x993301f0

These are the values for my mainboard. I am assuming that they are identical for yours if you are also using the Realtek ALC888 codec. You can find these value by using the alsa-info.sh script. Your output should contain something like this:

!!HDA-Intel Codec information
!!---------------------------
--startcollapse--

Codec: Realtek ALC888
Address: 0
AFG Function Id: 0x1 (unsol 1)
Vendor Id: 0x10ec0888
Subsystem Id: 0x14627522

The numbers from Vendor Id and Subsystem Id are the ones that need to go in the file we created above under the [codec] line.

I have no idea what the [pincfg] line actually does and what those numbers are but it seems to work.

Once you have created that file we need to tell ALSA to read it. Open /etc/modprobe.d/alsa-base.conf and add the following line at the end of the file:

options snd-hda-intel patch=hda-init.fw

Now the CD slider should show up after reloading ALSA. However, this did not work for me. Restarting my machine, however, did fix it.

Now you can just use the ALSA mixer to crank up the CD volume and you should hear the sound on your speakers.

Note that at least on my machine the CD slider seems to be muted by default. You will be able to set the CD volume but you will not hear anything unless you unmute it. To do that press M and you should hear the sound.


E: Package 'libpng12-dev' has no installation candidate

The package libpng12-dev was dropped after 16.04. It's been gone a long time.

Try libpng-dev.


How to disable the warning sound when closing firefox

You either have to turn off all sounds for Window notifications or specifically stop Firefox from warning you.

To stop Firefox showing the warning, open the options and navigate to the Tab "Tabs" and uncheck the setting about warning when closing multiple tabs. If you would rather turn off all warning sounds open your indicator-sound in your indicator area in the top right, open the sound preferences and in the tab "sound effects" you can mute the warning sound level.


How can I make ZFS datasets mount automatically on boot?

The correct way to do this is to make sure three unit files are enabled to start on boot:

zfs.target, which is the overarching target for all of ZFS
zfs-import.service, which imports zpools at boot
zfs-mount.service, which mounts all datasets at boot

These units have dependencies set up correctly, so you can simply run:

systemctl enable zfs.target zfs-import.service zfs-mount.service

to ensure they are all turned on. After this, reboot to test; your ZFS datasets should show up.


ATI proprietary drivers not working with an ATI Radeon HD 3400

This is a good solid guide to getting the latest ATI driver installed in ubuntu.
http://wiki.cchtml.com/index.php/Ubuntu_Oneiric_Installation_Guide#Installing_Catalyst_Manually_.28from_AMD.2FATI.27s_site.29

Has some good troubleshooting tips too.


If by “NULL“ you mean the null character (NUL) you can use one of the following commands to print the first field of every line:

awk -F\0 '{print$1}' # replace “1” by “2” for the second field etc.
sed 's/\x0.*//'

If you want to replace every NUL character by space or newline, use tr:

tr '\0' ' '  # replace by space
tr '\0' '\n' # replace by newline


UUID=xxx does not exist. Dropping to a shell

When I tried to use a pendrive Ubuntu to figure out this problem, I finally found out that the hard drive wasn't recognized when Legacy Boot was disabled. This explained why manually choosing UEFI did work.

The problem was that the new motherboard had the default settings, so RAID was enabled. Switching to AHCI solved my problem. This were the steps needed to change it: (borrowed from This answer)

Boot into BIOS (F12 at startup)
Select Bios Setup
Move to System Configuration→SATA Operation and select AHCI


I get the red circle with the white line

Try running these commands in a shell and see what the response is:

apt-get check

apt-get -f install


Basically, in some of the configure scripts the calls to awk are malformed.

Go to the ns-allinone folder and type

find . -name configure

A list of the configure scripts should appear.

For each of these replace any line that looks like this:

system=MP-RAS-`awk ‘{print }’ /etc/.relid’`

with ...

system=MP-RAS-`awk ‘{print }’ /etc/.relid`

Now rerun ./install in the ns-allinone folder.

Source


AWK: why does $(cat) work for stdin, but $* doesn't?

The $(command) syntax will return the output of command. Here, you are using the very simple cat program whose only job is to copy everything from standard input (stdin) into standard output (stdout). Since you are running the awk script inside double quotes, the $(cat) is expanded by the shell before the awk script is run, so it reads the echo output into its stdin and duly copies it to its stdout. This is then passed to the awk script. You can see this in action with set -x:

$ set -x
$ echo '((3+(2^3)) * 34^2 / 9)-75.89' | awk "BEGIN{ print $(cat) }"
+ echo '((3+(2^3)) * 34^2 / 9)-75.89'
++ cat
+ awk 'BEGIN{ print ((3+(2^3)) * 34^2 / 9)-75.89 }'
1337

So, awk is actually running BEGIN{ print ((3+(2^3)) * 34^2 / 9)-75.89 }' which returns 1337.

Now, the $* is a special shell variable that expands to all the positional parameters given to a shell script (see man bash):

   *      Expands to the positional parameters, starting from one.  When the expan‐
          sion  is not within double quotes, each positional parameter expands to a
          separate word.  In contexts where it is performed, those words  are  sub‐
          ject  to  further word splitting and pathname expansion.  When the expan‐
          sion occurs within double quotes, it expands to a single  word  with  the
          value  of each parameter separated by the first character of the IFS spe‐
          cial variable.  That is, "$*" is equivalent to "$1c$2c...",  where  c  is
          the  first  character of the value of the IFS variable.  If IFS is unset,
          the parameters are separated by spaces.  If IFS is null,  the  parameters
          are joined without intervening separators.

However, this variable is empty here. Therefore, the awk script becomes:

$ echo '((3+(2^3)) * 34^2 / 9)-75.89' | awk "BEGIN{ print $* }"
+ awk 'BEGIN{ print  }'
+ echo '((3+(2^3)) * 34^2 / 9)-75.89'

The $* expands to an empty string, and awk is told to print an empty string, and this is why you get no output.

You might want to just use bc instead:

$ echo '((3+(2^3)) * 34^2 / 9)-75.89' | bc
1336.11


Try  /usr/bin/wget instead of wget.

It is because cron does not import your environment and in particular does not know about $PATH.


Open new tab in Krusader from command line

In Settings->Startup make sure that 'Single instance mode' is checked. Than krusader . opens new panel on left side in current working directory.

To use some nice alias add this to ~/bashrc:

krusader_here() {
    yakuake_pid=`pgrep yakuake`

    if [ "s$yakuake_pid" != "s" ]; then
        in_yakuake_pstree=`pstree -p $yakuake_pid | grep $$`
        if [ "s$in_yakuake_pstree" != "s" ]; then
            qdbus org.kde.yakuake /yakuake/window org.kde.yakuake.toggleWindowState
        fi
    fi

    krusader --left=`pwd` &
}

alias k='krusader_here'

I run it quite often from yakuake in 'always on top' mode and this script just disappears it automatically.


How do I get an Epson Stylus DX4450 - All-In-One Printer/Scanner working?

Well, I've got the same type of all-in-one, but I don't use the printer part because it has got problem – so I haven't even tried to print with it, so this part of the question I can't answer. (TwoD has successfully used the printer part.)

HOWEVER, I've had the same problem with the scanner part... I've searched for a solution but none of them worked. Until today, when I've found an extensive guide – but it works! (And then I've started to look for unanswered questions like this... now here I am).

So, what you should do are the following.

Go: http://www.avasys.jp/lx-bin2/linux_e/spc/DL1.do

Scroll down until you reach "Form for download" part. Here choose "Epson Stylus CX4300/CX4400/CX4450/CX5500/CX5600/DX4400/DX4450" (it's the first column second row).

Scroll down to "Questionnare". Select the proper distribution and version (when writing this answer, 12.04 isn't present, choose 11.10).

On the next page scroll down until "Scanner driver". Download the followings:

First, the "deb package", (at the moment it's iscan-data_1.13.0-1_all.deb but version number may change by the time you visit).
Then scroll a bit down, and at "blahblahblah core package" download the two files listed under "deb 32bit package [libltdl7] (for Ubuntu 8.10 or later)" or "deb 64bit package [libltdl7] (for Ubuntu 8.10 or later)", depending on that you use either a 32-bit or a 64-bit system. (If you don't know what I'm talking about, just download the 32-bit version.)
For example, if 32-bit version, the two file names at the moment (they may change) are: iscan_2.28.1-3.ltdl7_i386.deb and iscan-plugin-cx4400_2.1.3-1_i386.deb

Now you've got 3 files. Now you need to install them. In fact, I don't use Ubuntu but Lubuntu, what's more, not in English, so I don't exactly know how is the program called on your system with which you can install them. It must be a "package installer" or such. (The proper program may be assigned to the file format, but if not (e.g. if "Archive manager" or such is assigned), then you will find the proper one under Administration menu.)

You can also do this from a terminal:
Change the working directory to where you downloaded the files with

cd ~/Download

Install all the iscan packages at once with

sudo dpkg -i iscan*.deb

After you've installed these packages, we may need to get a level deeper in system settings.

First see if your scanner has already been detected by going to "Graphics" -> "Image scan! for Linux" or "XSane Image scanning program" on the Applications menu. It will attempt to find the scanner. If it fails, unplug it and plug it back in, then try reopening the program.

If the scanner is still not detected, you may have to manually alter some files to tell the system which driver to use and how to classify the device when it is detected. The packages should have taken care of all this earlier, but it may have failed.

Open a terminal.

Type:

gksu gedit /etc/sane.d/epkowa.conf

(and then type your password – in the following it will often require your password.)
A textfile will appear. Find the line which contains only the word "scsi". Optionally put a # sign in front of "scsi" if you only use USB scanners. Then find the line containing only the word "#usb". Delete the # sign if it's there. Close the file (and save it, of course.) This tells the epkowa backend which bus(es) it needs to check for scanners.

Type:

gksu gedit /etc/sane.d/dll.conf

Find in the list the line containing "epson". Put a # in front of it. Save and close the file. This disables the Epson backend for iscan.

Type:

gksu gedit /etc/sane.d/dll.d/iscan

Make sure the file which was just opened has a line with the single word "epkowa" in it. Add it if neeeded, then save and close the file. This enables the epkowa backend for iscan.

Type:

gksu gedit /etc/udev/rules.d/45-libsane.rules

You may get an empty file (if not, start a new line). Insert the following text (with all characters):

# Epson Stylus CX-4300 CX-4400 CX-4450 CX-5500 CX-5600 DX-4400 DX-4450
SYSFS{idVendor}=="04b8", SYSFS{idProduct}=="083f", MODE="664", GROUP="scanner"

Now you MAY need to reboot the system. Unplugging and plugging the device back in should be enough in most cases.

After that, turn on the all-in-one machine.

Open a terminal, and type:

sane-find-scanner

You will get a long text, but there will be a line among them, similar to this:

found USB scanner (vendor=0x04b8 [Language Error], product=0x083f [Language Error]) at libusb:004:002

You will need the last two numbers, in my case 004 and 002, but you will certainly get different ones.

If you see more than one line, try unplugging other devices which may have scanning capabilities, such as some phones or cameras, and run the command again.

Your user may need to be added to the "scanner" group to have access, or you could [temporarily?] give everyone access to the scanner.

To do that, type the following into the terminal, but replace my 004 and 002 numbers with your ones:

sudo chmod 0755 /proc/bus/usb/004/002

(Password will be necessary again.) It's possible that you get an error message. Check if you've spelled everything correctly, and if you did, ignore that error message and try adding your user to the "scanner" group instead.

And now, WE ARE READY!

In your Applications menu, under Graphics, you'll find "Image scan! for Linux" or "XSane Image scanning program". Start it, and you'll get an interface similar to Epson Scan in Windows.

I hope everything worked. If not, please tell me and I might be able to answer.


Script to Force Desktop Background Load (NFS Location)

Thanks to anyone who assisted me in this, and feel free to comment on this code I wrote, but this got the job done for me.

#!/bin/sh

mediaConnection=0
mediaFile=/media/Wallpaper/test

while [ $mediaConnection -lt 1 ]; do
    if [ ! -f $mediaFile ]; then
        echo "File not found!"
        sleep 10
    else
        echo "File exists. Running script"
        xfdesktop -Q
        xfdesktop -R

        mediaConnection=1
    fi
done
exit

My only issue is that the script never actually ends because xfdesktop -R continually runs and all I can do is SIGINT it out with CTRL+C. But the script, as it runs, doesn't appear to be eating up any resources really, so I'm going to leave it. I'm just happy that this allows me to circulate my large library of wallpapers while not eating up the limited space on my Chromebook.


Conventional place to install additional files needed in my DEB package?

If the data are something you only need to read, you should place them under /usr/share/package_name/, per the Debian Policy Manual (Ubuntu uses similar document, IMHO the same one), which refers to the Filesystem Hierarchy Standard. That would be appropriate for images, help files, 3d models, UI definitions etc.

For things you need to write to, ideal place would be ~/.your_package. That would be for caches, user settings, sometimes even user data.


Try to reinstall the software center

sudo apt-get install --reinstall software-center

or if you're running Gnome

sudo add-apt-repository ppa:ubuntu-desktop/gnome-software
sudo apt-get update
sudo apt-get install  --reinstall gnome-software packagekit

If it's still now working then type

gnome-software

Or

software-center

And update your question with output


configuration of Eclipse (C++ version) for running SQLite?

According to the Eclipse FAQ on adding libraries:

Adding C/C++ External Libraries

How do I add an external library to my C++ project?

Go to Your Project's Properties by right clicking on project's name and selecting
properties. Click on "C/C++ Build". Under Tool Settings Tab, click on Directories.
Click on The Add Button and Select FileSystem. Select the folder with C/C++ libraries.
Apply and then Ok. The new library is included.

The option commented before didn't work when I tried it. I solve it including the
external library I want to add (libwsock32.a in my case) in Project->Properties->Tool
Settings Tab->C++ Linker->Miscellaneous.

14:26, 18 December 2007 (EST): Neither of these worked for me under Linux. I had to open
up the project's properties and go to "C/C++ Build" -> "Settings" and then hit the
"Libraries" item under "GCC C++ Linker" heading in the list on the right. Then, I
entered the libraries as I would in the command line ("pthread" for libpthread, etc...).
(Dustin Oprea)


You should install Kubuntu 16.04 LTS 64-Bit.


Ubuntu 14.04 - Wifi keeps disconnecting on Thinkpad T450S with Realtek wireless adapter

I've had a similar problem on my Lenovo Y50 (rtl8723be), where wifi would disconnect with random intervals (between 5-10 minutes)

I found this thread that matched my problems: http://ubuntuforums.org/showthread.php?t=2262957

where user Pilot6 suggests to update drivers from this repository https://github.com/lwfinger/rtlwifi_new and it looks like it has drivers for your (rtl8192ee) card as well.

this stabilized the wifi connections for me at least

instructions;

#dependencies
sudo apt-get install git build-essential

git clone https://github.com/lwfinger/rtlwifi_new.git /tmp/rtlwifi
cd /tmp/rtlwifi
make
sudo make install
sudo reboot -n


Startup: Unable to load dynamic library '/usr/lib/php/20151012/php_mbstring.dll

Your configuration is wrong.  You (or some software you have installed) have enabled something like:

extension=php_mbstring.dll

in the PHP configuration file, and this is wrong as php_mbstring.dll is an extension compiled for Windows operating system.

The correct way is to install php-mbstring package and let it enable the mbstring extension automatically:

sudo apt-get install php-mbstring

You can then disable/enable the extension by using phpenmod/phpdismod commands:

sudo phpdismod mbstring # disable mbstring extension
sudo phpenmod mbstring # enable mbstring extension again


I can not connect to ubuntu one from my netbook in my office

Are you behind a firewall or proxy in your office?
If so you will be unable to use Ubuntu One there as there is currently a bug that prevents Ubuntu one operating behind a proxy.

Seems a little silly I appreciate but more details are here:

Launchpad bug


Why hasn't Ubuntu packaged a more recent version of GDM?

gdm 3.0 is the latest version included in 12.04/repos because at the time of the UIFreeze/BetaFreeze,  on Feb 23, 2012, no newer version was ready -- "gdm requires a lot of patching to work on Debian/Ubuntu."

See this blog post from Jeremy Bicha, Ubuntu's gnome-desktop maintainer (among other things) for the reasoning behind what bits and pieces of Gnome 3.4 made it into Precise and why (or why not).


How to list all packages installed as dependencies in Terminal, and what installed them?

Closely related to: Generating list of manually installed packages and querying individual packages

Use:

apt-mark showauto

This lists automatically installed packages, as opposed to manually installed packages.


how to change partitions on another computer

There are two practical ways to do what you want.  First is to dismount the hard disk and connect it to another computer, then use the partition management tools on that system to change the partition size.  This shouldn't change the UUIDs, but be aware that if it does, your Mythbuntu system likely won't boot afterward.

The other way is to boot the Mythbuntu machine with a Live USB or DVD and use the Live system's tools to change your partitions.  This is likely slower (Live systems tend to be pretty pokey), but doesn't require you to have another computer that can read your Ubuntu partitions (which most Windows systems, for instance, cannot).


Look carefully:
beekay@beekay-Ubuntu-20:~$ ls -ld /home/felipe/
drwxr-x--- 2 root student 4096 jaan  24 20:50 /home/felipe/
beekay@beekay-Ubuntu-20:~$ ls -ld /home/yogi_v/
drwxr-xr-x 2 root student 4096 jaan  24 20:53 /home/yogi_v/
beekay@beekay-Ubuntu-20:~$ ls -ld /home/beekay/
drwxr-xr-x 17 beekay beekay 4096 jaan  24 02:00 /home/beekay/

The /home/felipe folder has --- for the "other" permissions, whereas both other folders have r-x there. That means that /home/felipe is not readable for "others" (i.e., users not being felipe and not in felipe's group).
If you want to make /home/felipe readable for beekay, felipe should execute this command:
chmod -R o+rx /home/felipe

or equivalently
chmod -R 755 /home/felipe


My suggestion would be to purge any pip installations and install pip again using this guide: https://pip.pypa.io/en/stable/installing/


Can't install gem: Failed to build gem native extension while trying to install Watir

I had to run a few commands to get it to work.

sudo apt-get install ruby-dev

Then, while looking back at the documentation, I realized I also had to install selenium-webdriver

sudo gem install selenium-webdriver

You might also have to run the following command before installing selenium-webdriver

sudo gem update --system


Multitude of strange problems after sudo apt-get upgrade

For issue #1, open Passwords & Keys application from Dash.  Your web and network passwords are stored under the heading named "Login."  You can change the passwords there.  Despite what the name suggests, this section is not for your Ubuntu login, so it is even safe to delete the  items listed.  If you delete these items, when you access your different web or network applications, a new entry will be created with the correct password you enter.

But for your other issues, since you have a partially working system, it might be a good idea to backup your important files (from your /home, or other relevant folders, if any) and do a fresh install.  (Perhaps 14.04 LTS might be a good option).


Any way to get an AMD HD4250 Graphics to work in 13.10 with good performance? Mine gets slower until unusable

Upgrade to 14.04 - the latest kernel enables dynamic power management by default, which means the GPU clock frequency is automatically increased in order to get better performance. Without DPM the clock rate is left at whatever the BIOS originally set it to.


FreeType library not found even if reinstalled

You nead to install 32 bit of libfreetype6
sudo dpkg --add-architecture i386
sudo apt install libfreetype6:i386
https://askubuntu.com/a/1175139/1086290
https://losst.ru/ustanovka-wine-v-ubuntu-18-04 (russian)


can't run ubuntu after installing windows 8

Windows has overwritten your MBR (Master Boot Record). To recover ubuntu:

Using an ubuntu CD or a live usb, boot into a live session
Install Boot-Repair sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update
sudo apt-get install -y boot-repair && (boot-repair &)
Type in terminal boot-repair
Click the "Recommended repair" button
Reboot ubuntu

For more info, check out this page


How can I delete a directory on a smb share?

Regarding the notices: Samba share so I assume it is an NTFS formatted disc. If so... NTFS does not understand Linux permissions. So commands like chmod, chown, chgrp do not work.
When facing permissions you can try to remove the directory with sudo in front of the command. If this shows an error please add it into your question.
Samba permissions are stored in /etc/samba/smb.conf It might be set up wrongly (this will only be a problem if this is the 1st time you are using this disc. Otherwise this file probably is correct)
If all fails you also need to check how the disc was mounted. If is is mounted as read only you can not alter the disc. This can happen if the disc has errors (think chkdsk /f in Windows terms). More info can be found here: Fix corrupt NTFS partition without Windows


Can I make a PDF to expire after a specific date

Is there any command or script for that?

Here is an example of applying extra security checks. You can put in a bit of  extra javascript in your pdf that closes the file when a certain date has passed. Some issues ...

it won't work if javascript is turned off
it does not prevent opening the file when a user chances the systems date
it does not prevent the user making printscreens

So it is seriously flawed. All it takes is 1 person with a bit of knowledge to circumvent your check. See this for more on that.

The link also lists as alternatives for a DRM server: http://www.fileopen.com (3000 usd a year) and http://www.locklizard.com/  (5k for a perpetual license) (...).

You did not list why you wanted this but consider an alternative: google doc with a read only file. And you remove the file when your date has passed.


How to install libnginx-mod-http-passenger on 20.04

The fix, as suggested here, is to run:
echo "deb https://oss-binaries.phusionpassenger.com/apt/passenger focal main" | sudo tee /etc/apt/sources.list.d/passenger.list

Then try installing again. This will fix errors such as:
The following packages have unmet dependencies:
 libnginx-mod-http-passenger : Depends: nginx-common (< 1.14.1) but 1.18.0-0ubuntu1 is to be installed


Is it possible to resize my root partition without reinstalling Ubunutu [dual boot]?

If you have a Ubuntu LiveUSB you can use gparted for this.

Step one is to log in to the existing Ubuntu partition and use something like unetbootin to create your USB install.

Once that is done, reboot the system into the LiveUSB version. From there you can use gparted.

(EDIT: I completely forgot that you can’t affect the system you have mounted and are logged into. You need to switch out of that first; hence the LiveUSB.).

You will find gparted under the system tools or by clicking on the icon at the top. You can also start it by typing “sudo gparted” in the terminal (ctrl-alt-t).
Type in your password when it asks (you won’t see anything happen when you type) and hit enter.

But back up your info just in case BEFORE YOU BEGIN.

Because you are dual-booting, make sure you are working on the correct partition. You don’t want to crash the working one.


USB Keyboard regularly disconnects during use

I know this is not a real answer, sorry. I don't have 50 reputation to be able to comment. Wanted to chime in and say I have the same issue. I have Anne Pro 2.
Using it on MacOS and Windows I got no problem. When using on Archlinux, it stops working. I have 2 machines (laptop with desktop) both dualbooting with Windows. There is no problem when using it on Windows. When using under Linux it stops working after some inactivity. If I keep continually typing on it, it works without any problem. When I stop typing for 5 minutes, it stops working. Reconnecting the keyboard works. I think the issue might be with firmware + linux driver. The problem might be related to powersaving mode (inactivity triggers some logic?)
Edit: I upgraded to latest Alpha firmware using obinskit tool. Now the problem with USB re-connection is gone. There often other bugs related to TAP layer but that's a different story.
Last edit: I switched to the latest firmware and replaced the USB cable. All of my problems are gone. I believe the thing that helped most was replacing the cable.


Allow systemd service to be started or stopped by non sudo user

Absolutely. While sudo is associated with running any command as root, it's a really a flexible system that allows fine-grained control of who has access to run what specific commands.

For example, you can create a group called minecraftstarters and add all your friends to it. Then you can a define a sudo rule which allows anyone in the minecraftstarters group to start or restart Minecraft, but not be able to use sudo for anything else.

Then in /etc/sudoers.d/minecraft, you would add syntax like this:

Cmnd_Alias MINECRAFT_CMDS = /bin/systemctl start minecraft, /bin/systemctl restart minecraft
%minecraftstarters ALL=(ALL) NOPASSWD: MINECRAFT_CMDS

Now you've defined some commands that the minecraftstarters group can run with sudo (and without requiring an additional password prompt).

Tip: Use visudo -f /etc/sudoers.d/minecraft to edit the file. It will check the syntax before it saves it, avoiding the unfortunate state where you break your sudo configuration, so sudo doesn't work at all.


PHP 5.4 has been in the official repositories since Ubuntu 12.10.

https://launchpad.net/ubuntu/+source/php5


That graphics card will not work very well.  NVIDIA no longer maintains working drivers for MX 200/400.  The oldest you could reasonably go to for support is a 6 Series (6xxx) card.

My advice is to install Xubuntu or Lubuntu, or install gnome-panel and run on the classic style interface :)


Netbook Ubuntu installation broke Windows 7

there is not enough info but lets me guess, ubuntu will not harm the windows in any way except if you shrink your windows system partition mostly the c and then install the ubuntu on the new partition. if this is the case i guess there is nothing you can do to fix windows from ubuntu you need windows cd to fix that


Hard-Drives are not detected by Ubuntu LiveCd or Installation

This could be a problem with your fstab, or your partition table. You said you can boot into windows, can Ubuntu not see Windows? If so that is most likely a problem with your fstab file.

If gparted can't see any partitions that is most likely a problem with your partition table as I think gparted bypasses fstab and all that.

Try downloading testdisk from the repos in your live CD and do a scan and see if that is able to see your partitions.


Permission denied: SCP from remote to local

Apparently I can only SSH or do scp operation in the same terminal.
So solution for me is to have two terminals opened - one for SSH and other is for the scp.


Bootloader hangs when USB keyboard plugged in

I've been experiencing the same problem on a 2019 HP Spectre x360 13t, using basically any keyboard (I've tested with two different Logitech wireless keyboards, and a  Steelseries Apex Pro). I found a not-ideal, but at least partial workaround: if during the boot process I hit ESC or F9 to get into the UEFI or boot menu, it is not frozen.  If I then wait a few seconds for the keyboard/firmware to finish whatever it is doing and continue the boot like normal, GRUB starts up perfectly happy.
This makes me think it's really more a problem with the underlying firmware rather than the bootloaders, so I suspect you'll see the same behavior in  rEFInd?  Might be useful to know though.  Either way I guess maybe we should report this to HP as a firmware problem.


lmsensors doesn't detect my fan. How should I control my fanspeed?

The HP 15T Touchsmart notebook with an AMD processor uses the AMD A76 chipset and it does not appearlm-sensors supports this.

Your fan speed is controlled by your UEFI BIOS.

You can set the fan to be permanently on within the BIOS. This option is within system configuration options.

It will be worth installing tlp or laptop-mode-tools to reduce your power consumption and hence cpu tempature.


After upgrade to 20.04 "Use this connection only for resources on its network" doesn't work

The route command is probably trying to do reverse DNS lookups and waiting for timeout. Try with route -n option to suppress that.


How do I prevent skype from starting another instance when it's already running?

So here is what I have done to prevent Skype from starting another instance:

I have renamed the executable:

mv /usr/bin/skype /usr/bin/skype.bin

The original skype executable will be linked to a script that only starts skype if no other instance is running (here a softlink). Here is the small script that I called skype-wrapper.sh. It checks if the user is already running skype:

#!/bin/bash
# Use this instead of the Skype executable in '/usr/bin/skype' to prevent
# Skype from running another instance. Rename the executable to 'skype.bin'
# beforehand.

if [ $# -gt 0 ]; then
    /usr/bin/skype.bin $@
elif [ ! -n "$(lsof /usr/bin/skype.bin | grep $USER)" ]; then
    /usr/bin/skype.bin
fi

You can link it to the original name of the skype executable like this:

ln -s /home/con-f-use/bin/skype-wrapper.sh /usr/bin/skype

That of course has one drawback: After a Skype update one has to redo the renaming of the executable and linking of the script.

Again, open for a better solution or even a fix of Skype itself (looking at you Microsoft :-)

Edit:
As said in the comments, there was a minor problem with the notification icon of skype (a click on it wouldn't toggle hide/display of the Skype window). That is now fixed (and tested with Ubuntu 10.04, 11.04 and 12.04).

Edit2:
With the latest version from www.skype.com (by the time of writing it was 4.0.0.7), as opposed to the one currently in the repositories, the error is fixed. I expect that the fixed version at some point will find it's way into the Ubuntu repositories.


How fix a malformed entry in this apt file

The correct entry for the file should look something like this:

deb http://packages.ros.org/ros/ubuntu zesty main

where zesty should be replaced with the codename of your ubuntu release version.

The $(lsb_release -sc) is supposed to be a shell script command that would be expanded by the shell (e.g. bash) when you type something like this in the terminal:

echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/ros-latest.list

The shell command above are supposed to call the lsb_release command to figure out the correct ubuntu codename (e.g. zesty for 17.04, yakkety for 16.10, xenial for 16.04). The output of lsb_release which should be the ubuntu release codename would then be interpolated into the string between the quotes and then written to the file /etc/apt/sources.list.d/ros-latest.list.

However, you must have put an extra space between $ and ( when typing the command, which causes the $ (lsb_release -sc) to be written literally, instead of having the output of the lsb_release command interpolated into the config file.


Try opening a terminal window (Alt-Ctrl-T) and running sudo apt purge php7.0


"The make utility was not found" - error when installing VirtualBox guest additions on Lubuntu from the CD

I found the solution in the end, instead of installing from the VirtualBox CD, I installed from Lubuntu's repos, using this command:

sudo apt-get install virtualbox-guest-dkms

After that everything worked - resizing, shared clipboard (after I enabled it, it's disabled by default).


Mount the EFI volume on a Sony VIAO Tap 20 running Windows 8.1

The reference to Itanium-based computers is outdated. The first computers to use EFIs were Itaniums, but EFI/UEFI has been used in AMD64/x86-64 computers for several years now. (They became common on new computers in mid-2011. Just about everything to ship with Windows 8 and later uses UEFI.) I'm sure that page, or at least that Itanium comment, dates from the period when only Itanium-based machines used EFIs.

Note that when you mount the ESP via the mountvol command in an Administrator Command Prompt window, the ESP is really only accessible in that same window; you can't get to it via your normal GUI file manager. It's not clear from your question whether you're having problems in the Administrator Command Prompt window or elsewhere. If it's in the Administrator Command Prompt window, then my suspicion is that the filesystem is damaged.


Ubuntu Software (gnome-software) has many errors and won't show updates

Try running sudo apt update and sudo apt upgrade. Here we go


Tox packge error: substitution key 'posargs' not found

I have been reporting this error since I installed tox==3.7.0. You can use

pip show tox

to view your own tox version

It would be nice to reduce the version to 3.6.0.

pip install tox==3.6.0

reboot


Well... since that PC is now un-usable for a while:

Using another PC, download "Boot-Repair-Disk." Burn the ISO image to a CD and boot from it. It should work. (It did for me.)


The final solution was completely remove and reinstall ubuntu. =(


Had the same problem, running Kubuntu 20.04 with 2 users configuration, on 2nd user after running a game I will have a black or frozeen scren after wakeup. On the old days Kubuntu had by default configured a hot key sequence to kill the X server Ctrl+Alt+backspace. I activated the hotkey sequence in system settings and it works for me. Go to System Settings,Hardware, Input Devices, Keyboard, advance, find "key sequence to kill X server" and select Ctrl+Alt+backspace. Hope this work for you too.


Brightness control not working (lenovo + intel tiger lake + ubuntu 20.04)

I did a fresh install of Ubuntu 20.10 and this solved the problem


Super+Tab switcher shortcut Unity Tweak Tool

If you already have ccsm (compiz manager) you can enable ring switch under window manager, by default it uses super+tab to change windows.


MPlayer cache empties playing audio stream

You have asked two questions here so I have answered each in turn:

1. Cache problems...

Your MPlayer cache settings could certainly be improved and I would suggest adjusting or adding the following two or three options:

-cache-min <percentage>: This will allow playback of your stream to commence only when the set percentage of the stream has been cached. I will usually set 80 here.
-cache <kBytes>: For my own MPlayer streams I usually set a reasonably outlandish size for the cache and this works nicely with the -cache-min setting in point 1. I use 16mb here but MPlayer expects kbs: 16384.
-bandwidth 1000000: This setting may help with some streams, I confess that I don't use it myself...

2. Status line mysteries...

As for the numbers on the status line of MPlayer you have inadvertently asked a 'Frequently Asked Question' for which I link the official documentation here.... However to make it all a bit clearer I give a real world example here which you might like to look at. I load the following stream with this command line (using the 2 cache settings I have suggested):

mplayer -cache 16384 -cache-min 80 -playlist \
        http://www.abc.net.au/res/streaming/audio/mp3/classic_fm.pls

The status line of MPlayer then reveals the following:

A:  21.0 (21.0) of 0.0 (unknown)  0.3% 80%

And this signifies:

A:  21.0 (21.0) of 0.0 (unknown): This represents an Audio stream that has now been running for 21 seconds with the bracketed number 21.0 indicating that the stream has been running for a total of 21 seconds. I suspect these 2 numbers will vary if you seek within the stream or if the stream designates a start time that is different from your starting time with the stream. The 0.0 (unknown) indicates that the stream does not give an indication of its total length.
0.3%: This indicates the audio codec CPU usage in percent. Your own number here of 501.8% seems a little odd...
80%: As you have surmised this is the current cache size used.

Documentation of the status line in MPlayer is not great but hopefully this gives you a better understandning of what is happening.


Why does "AMD testing use only" pop up upon login?

This is because you installed the latest beta drivers from ATI instead of the stable ones, it is sometimes necessary to do so to make them work with some graphic cards and you should not worry.

To remove the watermark simply follow this post: How to remove the “AMD Testing use only” watermark?.