Command to change the wallpaper in XUbuntu

I think that should do the job

Use the following code to get the connected devices and count them:

connectedOutputs=$(xrandr | grep " connected" | sed -e "s/\([A-Z0-9]\+\) connected.*/\1/")
activeOutput=$(xrandr | grep -e " connected [^(]" | sed -e "s/\([A-Z0-9]\+\) connected.*/\1/")
connected=$(echo $connectedOutputs | wc -w)

then you have to manipulate over them and choose whether to set the value for image-path or last-image

xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path -n -t string -s  ~/Pictures/1.jpeg
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitorLVDS1/workspace0/last-image -n -t string -s  ~/Pictures/1.jpeg

for i in $(xfconf-query -c xfce4-desktop -p /backdrop -l|egrep -e "screen.*/monitor.*image-path$" -e "screen.*/monitor.*/last-image$"); do
    xfconf-query -c xfce4-desktop -p $i -n -t string -s ~/Pictures/2.png
    xfconf-query -c xfce4-desktop -p $i -s ~/Pictures/2.png

done

Assume that 1.jpeg is any file just needed to create the string by default. And 2.png is the wanted picture to be set. I added the first line just to make sure that xfce4-desktop exists.

This script was tested in my machine and it is working well.

Hope that helps my friend

EDIT: A list of port names was found here like so:

  Output port names

  Intel driver - UMS

  VGA - Analog VGA output

  LVDS - Laptop panel

  DP1 - DisplayPort output

  TV - Integrated TV output

  TMDS-1 - First DVI SDVO output

  TMDS-2 - Second DVI SDVO output

  The SDVO and DVO TV outputs are not supported by the driver at this
  time.

  Intel driver - KMS

  LVDS1 - Laptop panel

  VGA1 - Analog VGA output

  DVI1 - Digital video output

  radeon driver

  VGA-0 - Analog VGA output

  LVDS - Laptop panel

  S-video - Integrated TV output

  DVI-0 - DVI output

For further Info check here


How to map a key to work like mouse button including its modifiers?

As nothing is defined for its modifier, when shift+F2 is pressed, nothing happens.

So:

xmodmap -e "keycode 68 = Pointer_Button1 Pointer_Button1"


Installation error from terminal and ubuntu software center

Assuming you are trying to install Sublime Text, it is not in the official Ubuntu repositories. Install Sublime Text 3 using the package from their site.


Upgraded to 14.10 from 14.04 on Lenovo x201 dual-boot, freezes after login

When the grub menu loads (you need to hold shift after the bios screen), I select my kernel image and press 'e' to edit the boot parameters. At the end of the line beginning with "Linux" I append the option "i915.modeset=0". Turns out I can omit the "xforcevesa" option.


In XUbuntu there are black unreadable tabs in GTK applications such as gEdit

The problem only exists on a Ubuntu installation with a later installed xubuntu-desktop. If you use only Xubuntu without the unity-desktop this problem does not exist. However, if I choose the Radiance theme the problem seems to go away.

I have restarted the system to be sure it is permanently.


My issues was that that I wasn't referring to the to and from directories in my script properly.

Since it is being run as root, the home directory is different than my user home directory.


Is there a command-line utility app which can find a specific block of lines in a text file, and replace it?

This simple python script should do the task:

#!/usr/bin/env python

# Syntax: multiline-replace.py input.txt search.txt replacement.txt

import sys

inp = open(sys.argv[1]).read()
needle = open(sys.argv[2]).read()
replacement = open(sys.argv[3]).read()

sys.stdout.write(inp.replace(needle,replacement))

Like most other solutions, it has the disadvantage that the whole file is slurped into memory at once. For small text files, it should work well enough, however.


Why do *some* mp4 files play normally and other show unreadable static patterns on one ubuntu machine

Different codecs were used to encode the video than what your laptop can decode on the unwatchable videos; your desktop has hardware support for the codec, whereas your laptop does not. MP4 is a container which can hold many different formats, i.e., HEVC/MPEG-H Part 2/H.265, MPEG-2 Part 2, MPEG-4 ASP, H.264/MPEG-4 AVC, H.263, VC-1, Dirac, and others.  Anything recorded on the laptop is recorded only with what the laptop supports.

You have already found the solution; re-encoding the video. The other solution is to buy a more powerful laptop, which may not be practical at this time.

Note from OP: I used VLC convert and this did it!

See:


Recursively copy files from one directory to another

Use:

find /media/kalenpw/MyBook/Music/ -name '*.mp3' -exec cp {} /media/kalenpw/HDD/Music \;

The reason for your command not working is that names containing wildcards (*.mp3) are expanded before the command is run, so if you had three files (01.mp3,  02.mp3, 03.mp3) your effective command was:

cp -R /media/kalenpw/MyBook/Music/01.mp3 /media/kalenpw/MyBook/Music/02.mp3 /media/kalenpw/MyBook/Music/03.mp3 /media/kalenpw/HDD/Music

As you can see -R has no effect in this case.


Currently, a bug in Tomboy prevents it from being run with a different flag from command line if it is already started. Because of that, creating a quicklist for Tomboy is not really ideal because it won't work as intended.

I had been trying to create a quicklist for Tomboy some couple of months back and was blocked by this bug. I have since then filed a bug report on GNOME bugzilla and hopefully, the Tomboy developers will fix this shortly.

Here's the bug report:

https://bugzilla.gnome.org/show_bug.cgi?id=674333

You can subscribe to the bug report and follow the progress of the bug.


What's the difference between Ubuntu 16.04 and 16.10?

Canonical, the UK-based company behind the Ubuntu flavor of Linux, releases new versions of the OS twice a year, once in April (the .04) and once in October (the .10), every year. Being November 2017, the most recent version is currently 17.10.

Because of the 6-month window between releases there usually isn't dramatic changes in versions that close together -- you won't notice much difference between 16.04 and 16.10.

It should be compatible with your machine but the official requirements are:

2 GHz dual core processor
2 GiB RAM (system memory)
25 GB of hard-drive space (or USB stick, memory card or external drive but see LiveCD for an alternative approach)
VGA capable of 1024x768 screen resolution
Either a CD/DVD drive or a USB port for the installer media
Internet access is helpful

What you should be asking about is the differences with 17.10, which is radically different than 16.04. After a Hacker News thread overwhelmingly suggested Canonical abandon its own custom desktop, Unity, in favor of the more standard Linux desktop, Gnome, (see this thread to understand the difference), Canonical finally went ahead and made the switch in 17.10.

My personal opinion: if it ain't broke, don't try to break it by upgrading. Unless you're a power user who can debug boot errors it's probably not worth the hassle, unless you just really love Gnome and despise Unity.


How to use equivs-build for creating deb from python app?

Similar to meta packages, follow instruction here: How to create a meta-package that automatically installs other packages? or MySQL 5.6 depends on client 5.5
You need more info to fill in equivs control file, documented in man equivs-build, example: Files: .


Failed upgrade to 16.04 because it failed upgrading a package

It's a known bug. Have a look at this:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1594454


Ubuntu 17.10 Mini iso - Gnome Vanilla doesn't show up after installation

I ended up with the following:
I installed it with no packages, then I logged in and ran sudo apt install gnome-core. After a reboot, it worked fine.


Auto mounting external hard disk using fstab gives all read write permission to it

I have found that a much easier way to auto-mount drives is to put your mount commands in /etc/rc.local .  I had all sorts of headaches with using fstab so that's what I do now.  /etc/rc.local is a bash script that is executed by root at startup.  Just create the folder you want the drive to be mounted in and then add your mount command anywhere above the "exit" line in /etc/rc.local, then reboot.

Here's what mine looks like.

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

#Mounts Storage
mount /dev/sdb1 /mnt/Storage

exit 0


15.04 has reached its end-of-life date and thus is no longer supported. It's probably better to get either 14.04 or 15.10.

Since your computer is pretty low-spec, something like Lubuntu might be better for you. Lubuntu is Ubuntu, but with a different desktop environment. Instead of Unity, you get LXDE. It looks very different, but it's specifically made to run on computers that aren't very modern, or are just very low budget.

If your computer can support 64-bit, don't get 64-bit Ubuntu. It won't perform very well.

The installation process is pretty much the same as normal Ubuntu.

Lubuntu 14.04 (32-bit): http://cdimage.ubuntu.com/lubuntu/releases/14.04.3/release/lubuntu-14.04.3-desktop-amd64.iso

Lubuntu 15.10 (32-bit): http://cdimage.ubuntu.com/lubuntu/releases/15.10/release/lubuntu-15.10-desktop-amd64.iso


Setting up Ushare (Xbox 360 File Sharing)

To define a content directory when starting ushare as a service we have to edit the file /etc/ushare.conf as root (e.g. by running gksu gedit /etc/ushare.conf) and add the media directories separated with a colon like e.g.:

USHARE_DIR=/home/travis/Music,/home/travis/Videos,[...]

Replace travis with the name of your user.

We also need to make sure we use the appropriate network interface the xbox is attached to:

USHARE_IFACE=wlan0 # for wireless network 0, e.g eth0 when connected wired

In case we need to stream to a specific port (see xbox or router manuals for details on how to open ports) we can do so by defining this port:

USHARE_PORT=49200 # or any other port, if empty a random port is chosen

Alternatively we may run ushare from the command line using the following command:

ushare -D --name=<name_of_stream> --content=<path_to_mediafiles>

We can also define the interface, port, and more on the commandline (for all options see manual from GeeXboX).


Unable to detect monitor: "Failed to get size of gamma for output default"

This output means that you're using the VESA drivers, meaning that Ubuntu was unable to load a driver specifically for your graphics card.

You may want to try using "Additional drivers" to see if any are offered for your graphics card.

Also, if you update your question with your graphic card's model, someone may be able to suggest a way to get this working.


HP 2410 printer shared on Winwows XP not visible on Ubuntu's network

Ok, I made it work.

On next link is very good explanation how to setup samba under Ubuntu:

http://www.sitepoint.com/ubuntu-12-04-lts-precise-pangolin-file-sharing-with-samba/

Thing I was missing before is part with configuration of Winbind. When I made it as it is described there, it started to work.


After booting into Ubuntu open the terminal (press Ctrl+Alt+T). Then run the alsamixer command.Press F4 to go to the Capture tab.  From there set input source to Front mic. Press Esc to exit alsamixer. Then run alsactl store in terminal to save settings.


unable to install twilio python module in ubuntu 14.10 ,

Try the following command

sudo easy_install pip==1.5.4

Then, install twilio with

sudo pip install twilio


dwm window manager on VmWare Player - no copy-paste between host and guest

There is /etc/xdg/autostart/vmware-user.desktop that executes /usr/bin/vmware-user. My custom UI does not follow Open Desktop specification so it does not do that. Added this command to my start-up file and all is great. VirtualBox works much worse than VMWare, ironically, clipboard there worked out-of-box with my custom window manager.


How Can I Merge Multiple Directories into One keeping the subdirectories

What tool are you using? cp rsync scp
They all have a way to do a "recursive" function
I know with cp you can copy multiple recursive directories pretty easily. With cp you can list 100+ directories or files to copy, and what ever is listed last on your cp command is the destination for all.
cp --help shows
    Usage: cp [OPTION]... [-T] SOURCE DEST
      or:  cp [OPTION]... SOURCE... DIRECTORY
      or:  cp [OPTION]... -t DIRECTORY SOURCE...
    **Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.**
...
-R, -r, --recursive          copy directories recursively

Ex:
cp -rv /path/to/copy1 /path/to/copy2 /path/to/copy3 /dest/dir


The Ubuntu documentation related to bonding modes is available here.

Descriptions of Ethernet bonding modes:

Mode 0

balance-rr

Round-robin policy: Transmit packets in sequential order from the first available slave through the last. This mode provides load balancing and fault tolerance.

Mode 1

active-backup

Active-backup policy: Only one slave in the bond is active. A different slave becomes active if, and only if, the active slave fails. The bond's MAC address is externally visible on only one port (network adapter) to avoid confusing the switch. This mode provides fault tolerance. The primary option affects the behavior of this mode.

Mode 2

balance-xor

XOR policy: Transmit based on [(source MAC address XOR'd with destination MAC address) modulo slave count]. This selects the same slave for each destination MAC address. This mode provides load balancing and fault tolerance.

Mode 3

broadcast

Broadcast policy: transmits everything on all slave interfaces. This mode provides fault tolerance.

Mode 4

802.3ad

IEEE 802.3ad Dynamic link aggregation. Creates aggregation groups that share the same speed and duplex settings. Utilizes all slaves in the active aggregator according to the 802.3ad specification.

Prerequisites:

Ethtool support in the base drivers for retrieving the speed and duplex of each slave.
A switch that supports IEEE 802.3ad Dynamic link aggregation. Most switches will require some type of configuration to enable 802.3ad mode.

Mode 5

balance-tlb

Adaptive transmit load balancing: channel bonding that does not require any special switch support. The outgoing traffic is distributed according to the current load (computed relative to the speed) on each slave. Incoming traffic is received by the current slave. If the receiving slave fails, another slave takes over the MAC address of the failed receiving slave.

Prerequisites:

Ethtool support in the base drivers for retrieving the speed of each slave.

Mode 6

balance-alb

Adaptive load balancing: includes balance-tlb plus receive load balancing (rlb) for IPV4 traffic, and does not require any special switch support. The receive load balancing is achieved by ARP negotiation. The bonding driver intercepts the ARP Replies sent by the local system on their way out and overwrites the source hardware address with the unique hardware address of one of the slaves in the bond such that different peers use different hardware addresses for the server.


Ubuntu 14.04 was installed on wrong drive

Windows doesn't read ext4 filesystem unless you use dedicated software like Ext2fsd.

To delete Ubuntu:

Boot from windows DVD and select repair. Choose your installation.
Select other to open command prompt and type bootsect.exe /fixmbr and bootsect.exe /fixboot
Restart PC. It should boot into Windows
Right click my computer, select manage then go to Disk Management. Format your second drive as NTFS and assign it letter D.


Unmount script running on unmounted device

First attempt with &

#!/bin/sh -xv

#Get  device where I am located
DEV=$(df -k "$0" | tail -1 | awk '{ print $1 }')
echo $DEV

#Create umount script
echo '#!/bin/sh -xv' >/tmp/udisk.tmp
echo "umount $DEV" >>/tmp/udisk.tmp
cat /tmp/udisk.tmp
chmod +x /tmp/udisk.tmp

#Run the script
/tmp/udisk.tmp &


Hi along with changing in Default application list, you need to some more work.You need to install this package to arrange the room in Notification area.

Open your terminal with ctrl+alt+T and type this

sudo apt-get install evolution-indicator

Then Re-login/Restart to apply the changes.

PS:If you don't want to use Thunderbird , then you'd better uninstall it.


Kickstart file is ignored by the installer

You have to use the alternative cd not the live cd:
http://www.ubuntu.com/download/desktop/alternative-downloads

If you follow exactly the tutorial you mentioned it should work.


How to change environmental variable permanently?

I'm not into phython, but it seems that the sys.path variable is just an accessor to the system-wide PYTHONPATH variable. If you modify it, the PYTHONPATH variable won't be changed, only the sys.path python variable.
Type into your command prompt: echo $PYTHONPATH If it shows nothing, PYTHONPATH isn't set at all.
Add that export ... line at the end of the .bashrc file of the concerning user's home directory and restart your shell.


Why do I need to use separate accounts for installing and running a program?

Writing a new user specifically for one application is a really good idea.

If someone was able to hack through the program somehow, will not have administrator privileges (they won't be "root"), only the privileges assigned to that specific user.
You can create a new user in debian/ubuntu consoles by executing this command:

sudo adduser mynewusername

(where you change mynewusername to your liking)

You may also want to assign the user into some groups: cat /etc/group

sudo adduser mynewusername newgroup

(where you change the newgroup and mynewusername. Changes when you logout/login that specific user.)

Also, they won't be able to see other users' files (if file permissions are assigned properly). You can change file permissions using the chmod command.


Root partition size differences among different tools

I just resolved this problem by deleting some backup rescued files in the .Trash-0 hidden folder on the root partition.

Now it reads on Disk Usage Analyzer 95.9 GB Available with a Total of 122.5GB

26.6GB used, 89.6GB free on nautilus

and on running the: df -h command on terminal, I get:

/dev/sda3 --> Total: 115G   Used: 25G   Available: 84G  Use %: 23%


How do I install the 3.2 or the 3.3 kernels in 11.10?

Hardware Support Components Video Cards Poulsbo

Open a terminal and add the repository, run the update, install the support and configure, then reboot.

sudo add-apt-repository ppa:gma500/emgd110
sudo apt-get update
sudo apt-get install emgd-support
sudo emgd-xorg-conf

EMGD Known Workarounds

Known workarounds that address problems such as Plymouth (startup screen), Brightness keys, Hibernate/Suspend, and Mplayer can be found on this page:

https://answers.launchpad.net/emgd/+faq/1450


How to reset visualization in Movie Player to default when it always crashes on launch?

Hit Alt+F2, type gconf-editor and hit Enter.
Navigate to /apps/totem/ and set visual to GOOM: what a GOOM!:


Upgrade from 14.04 to 16.04 failed at startup

open terminal and put following code.

sudo apt-get update

and make sure your update system have no problem.

then enter:

 sudo apt-get install update-manager-core
 sudo do-release-upgrade


You need to make the .run file executable. This can be achieved using chmod.

chmod +x filename.run

The above command gives executable rights to filename.run

In your case - chmod +x eagle-lin-7.2.0.run

Now, you can execute it using either ./eagle-lin-7.2.0.run or sh eagle-lin-7.2.0.run


linuxdcpp is founded in universe repository, so first enable it.

sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"

then run those commands:

sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install linuxdcpp


LibreOffice Calc - Points on XY graph (multiple Y values for one X!)

You'll have to use the X/Y (Scatter) chart type:


How to Prevent Conflict between BTsync and IPython-notebook?

Answer from support of BTsync

Sync has ability to configurate network settings such as port using configuration file. You can find more info regarding it here:

http://help.getsync.com/hc/en-us/articles/204762689

The option you are looking for is located in webui section
"listen" : <IP: port>
For example, 0.0.0.0:4444 will listen to any interface on the LAN at port 4444.

So specify the port to something specific to avoid collisions.


I had the same issue and when I was looking for help I remember seeing your post. Now when I finally got it to work I might as well document it here:

Upgraded linux-image and headers sudo apt-get install linux-image-3.11.0-15-generic linux-headers-3.11.0-15-generic (Perhaps virtual would work just as well as the generic one.):
Installed linux-image-extras with the hyperv-drivers: sudo apt-get install linux-image-extra-virtual
Set video mode (Pretty much what you already did): Set GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video=hyperv_fb:1680x1050" in /etc/default/grub.
Update grub: sudo update-grub
Reboot

I guess the critical part was installing the updated hyperv-drivers with linux-image-extra-virtual. Also make sure they are loaded.


Lost sudo privileges by renaming an essential folder

Run a Live USB or DVD with Ubuntu. From there you can rename it..


Lagging when running VS Code + GitKraken

Your free -h output shows that your swap usage rises significantly. It means the contents of RAM get moved to swap space. Swap is placed on the HDD and it’s much slower than RAM (unless you are using SSD).

You can read about swappiness to learn why swap is used before RAM is physically exhausted. But since your swap usage is higher than the RAM space available, the RAM size does not suffice to hold all the data – and this is needed for the smooth performance.


unable to mount dongle/modem iball airways 21.0MP-58

It's already mounted.sudo umount "/media/arbind/iBall Airway" first.

Check the device to see if it has a hardware write-disable switch.

You can see how it is mounted with mount | grep /dev/sr1.

If, as you say, it's a "dongle/modem iball airways 21.0MP-58", I wonder why you are trying to mount it as a disk.


I have not tried this myself, but I do have an old EasyCap branded usb capture device somewhere. Note that there are a few versions of these devices with different chip-sets. There is a good guide to identifying your device on this site. An easy way to capture video in Ubuntu is VLC Media Player which is available in the Ubuntu repositories.
There are other options for capturing the video from these cards, it depends if you want to use command line or GUI tools.


Yes, it is possible - at least for Firefox.

A new standard has been developed to allow arbitrary program to use the current desktop environment's "default" file dialogs without needing to know about the specific implementation. This is called the xdg-desktop-portal protocol and it was developed for desktop containers, but Firefox has recently added support for it (see below for details).

If you can create a new xdg-desktop-portal implementation for Ranger (there are already implementations for KDE and GTK file dialogs), then you can use these under Firefox.

Chrome has a different mechanism (it chooses correctly KDE or GTK file dialogs depending if running under Plasma or GNOME), but I'm not sure if it can be overriden to support another implementation.

The xdg-desktop-portal specification can be found here: https://github.com/flatpak/xdg-desktop-portal.
The KDE implementation can be found here: https://github.com/KDE/xdg-desktop-portal-kde. It may help you write your own.
Here are instructions on how to enable this feature on Firefox 64 (where it isn't the default yet): https://www.reddit.com/r/kde/comments/a5cxwk/firefox_v64_can_now_use_the_kde_file_selection/


A two-factor authentication app that runs on Ubuntu?

The closest I've found is the Authy Chrome plugin: https://chrome.google.com/webstore/detail/authy/gaedmjdfmmahhbjefcbgaolhhanlaolb?hl=en

I generally use Firefox, but you can install the app and let it create a desktop icon / app menu entry. Then you can launch it like a normal app.


Does a dual boot with Windows make Ubuntu more prone to "breaking"?

Depends what the problem is but very unlikely, as the partitions are separate. I'll assume you installed windows and then installed linux, as it doesn't work so gracefully the other way around with the windows boot loader.


changing a ppa from dev to stable safely

You can use ppa-purge to remove a ppa. Just do:

sudo ppa-purge ppa:ubuntu-mozilla-daily/firefox-aurora

Description from man page:

  ppa-purge - disables a PPA and reverts to official packages.
  This script provides a bash shell script capable of automatically downgrading all packages in a given PPA back to the ubuntu versions.

(You can install ppa-purge by sudo apt-get install ppa-purge).


Try to install via UEFI and then select Install UBUNTU GNOME, and then press 'e' and between quiet and splash insert nomodeset.

For reference, please see this question


If you must use a GUI on your server for testing and learning purposes, i.e. not in production where you shouldn't have X installed at all, try using something lighter like XFCE.

You don't have any of the underlying software needed to run in a desktop environment due to --no-install-recommends

You can either install the full desktop with recomended software for unity/ubuntu-desktop by repeating your step without --no-install-recommends

or

if you want to try XFCE you can

sudo apt-get autoremove ubuntu-desktop

then

sudo apt-get install xfce4 xfce4-goodies


How to install Java 8 in Ubuntu 15.04 64 bit?

sudo apt-get install default-jre
sudo apt-get install default-jdk
or:
sudo apt-get install openjdk-8-jre
sudo apt-get install openjdk-8-jdk


Removing applications from Show Applications without uninstalling

Application launchers shown in Activities or Applications overview are usually located either in /usr/share/applications/ (system-wide applications) or ~/.local/share/applications/ (for current user) as .desktop files.

You can hide an individual launcher from Activities or Applications overview by adding an extra

NoDisplay=true

line to the corresponding .desktop file or by deleting the .desktop file altogether.

It is generally not advisable to edit the .desktop file located in /usr/share/applications/. Instead copy the file to ~/.local/share/applications/ first and make the necessary changes to the copied file.


Use the packaged TL2013
The texlive version that goes along with 14.04 is 2013:
http://packages.ubuntu.com/trusty/texlive-base
As the texlive development progresses, old data is made available using the historic repositories. If you want to stick with TL2013, you need to change the repository to the correct value like this:
tlmgr option repository ftp://tug.org/historic/systems/texlive/2013/tlnet-final
Use the manually installed TL2014
To get a sane environment where things are no longer mixed up, first uninstall TL2013: apt-get purge texlive-base, then re-install TL2014. If questions arise, you can either post them here, or on tex.se


Yes, it will work seemlessly. But if you benchmark the performance in both OS, it will be better on windows. Still, most people can't notice that.


How to view the packages/tools that will be installed by Ubuntu Make?

From the manpage:

* Command 'web': usage: umake web [-h] {visual-studio-code,firefox-dev}
       ...

   positional arguments:
              {visual-studio-code,firefox-dev}

       visual-studio-code
              Visual Studio focused on modern web and cloud

       firefox-dev
              Firefox Developer Edition

It looks like only Visual Studio Code and Firefox Developer Edition are installed by umake web. The other subcommands are also listed in the manpage, for example:

* Command     'android':     usage:     umake     android     [-h]
       {android-ndk,android-sdk,android-studio} ...

   positional arguments:
              {android-ndk,android-sdk,android-studio}

       android-ndk
              Android NDK

       android-sdk
              Android SDK

       android-studio
              Android Studio (default)


Example for your question:

tail -f logfile  | espeak -v en

More Text to Speech (TTS) like espeak programs and if you are looking for making audio .wav file examples can be fount at:

Natural Sounding Text to Speech?
How can I run a simple text to speech command?


Problems with control hardware/drivers on Ubuntu Studio 19.04

I downloaded the package from the Ubuntu packages website and followed the install instructions.

Ubuntu packages website

It seems donwloading the default settings package fixed my problem. Thanks!


Windows boot manager won't recognise Ubuntu if you ran that command. Simplest fix is to run your Ubuntu install disk again - it may recognise the old install, but worst case you may just need to reinstall Ubuntu.


With a working internet connection by ethernet, tethered or whatever means possible, open a terminal and do:

sudo apt-get update
sudo apt-get install rtl8812au-dkms

Reboot.

We will also need to blacklist your internal device. First, let's identify it:

lspci -nnk | grep 0280 -A3

To blacklist the driver for the internal device, open the terminal and do:

sudo -i
echo "blacklist rtl8188ee"  >>  /etc/modprobe.d/blacklist.conf
modprobe -r rtl8188ee
exit

You should be all set.


Strange audio sound of thunder starts over after my laptop starts in ubuntu 12.04

By default the display manager LightDM is called for a graphical login interface. A drum beat sound will indicate that it is ready for input of user credentials to log in.

To disable this see:

How do I disable the drum beat sound on the login screen?


I assume by 'your system' you mean your already installed OS as opposed to the Live CD.

The only way I can think of would be to use full disk encryption with a strong password over the partition(s) that contain your OS. If someone has physical access to your system (ie. can insert a CD or their own hard drives) then this really is the only way to prevent unauthorized access. You can password protect your BIOS so that you need to enter a password to change boot order and boot a CD, but if someone has access they can just flash the CMOS and reset this.

Another alternative to full disk encryption would be to prevent physical access to your system, either with a lock that prevents someone from opening your case, or moving the system to a secure location.

You can read this help page for more help about encryption on ubuntu:

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


I got the same error this morning.

I just uninstalled it:

sudo apt-get remove steam*

Then I went in my home folder and removed the .steam folder,
and then ran

sudo apt-get install steam

then rebooted and opened steam.


Why do I automatically get a period (.) in my MANPATH?

You might have run into a bug in the Fish shell, version 2.6.0, which accidentally changed colon-separated elements of MANPATH (or other environment variables) into periods. This happens even when MANPATH was set in bash before you started fish.


You must write the iso file to a bootable USB (Creez a USB boot). Then do it with the USB boot.

Original post in French: https://askubuntu.com/revisions/363054/1


sendmail - don't send email after update (ubuntu 16)

I've been using send mail for years.  It's soooo much easier than it was in the 90's, lemme tell ya.  Anyway, I'm not using postfix with sendmail, and I don't remember ever having to configure postfix in relation to it.  As a matter of fact, I'm running Ubuntu 16.04 and have no main.cf file.  Is that used for the cli?  The only time I've ever run mail from the command line, I'd used nail.

I'd copy my sendmail.conf, completely remove sendmail and reinstall it.  Then copy your old sendmail.conf back.  Of course, if you'd made any config changes to sendmail.conf, verifying they're still there after copying it back is a good idea.

If you still can't send mail, you would want to look closely at your sendmail.conf.


Problem with the rendering of text, menus, and icons

If you have upgraded to Ubuntu Desktop 20.04 from a previous version, then you may need to "delete" a file or remove some drivers. Let's start with the simpler option:
1 — Remove a .conf file
Sometimes this issue is caused by an old xorg configuration file. We can temporarily rename it to see if the problem is resolved and, if everything works well, delete the unnecessary file later.

Open Terminal (if it's not already open)
Change the name of your 20-intel.conf file to something else:
sudo mv /etc/X11/xorg.conf.d/20-intel.conf /etc/X11/xorg.conf.d/20-intel.old

Reboot

If the problem is resolved, you can delete the 20-intel.old file at your leisure. If something unexpected happens, you can rename the file back to 20-intel.conf to restore previous functionality.
2 — Remove the xserver-xorg-video-intel package
Some people have found that removing the video driver will force Ubuntu to (re)install something that works better. To do this, you need to remove the xserver-xorg-video-intel package.

Open Terminal (if it's not already open)
Remove the video driver:
sudo apt purge xserver-xorg-video-intel

Reboot

If everything is good, then you can enjoy proper visual clarity again. If things stay the same, then the OS re-installed the same browser and the issue is unrelated to the most common symptoms for this problem.
Note: Some people using Dell notebooks have had to do both of these things to resolve their issue. If neither option works in isolation, consider trying both.


Delete files with no permissions only (read, write and execute)

The find command you are looking for is this:
find /path/to/data -type f -perm 000 -delete

Caution: First run the above command without -delete to make sure that it lists the correct files.

-type f lists files only.
-perm 000 lists items without permissions only (000 is "no permissions" in octal mode).
-delete deletes the found items.

See man find for more options.


Cannot create files except in home partition

It might be because you do not have the permissions to use those partitions.

To take ownership of a drive or partition (internal and external), simply run the following command:

sudo chown -R username:username /partition/mount-point

Where username is your actual username, mount-point is the directory in the file system to which the partition will be mounted and not the device name (eg: /dev/sda1).
To determine the mount-point, run mount in the terminal, and locate the line that corresponds to the drive or partition.

If you have not set a label for the partition, it will look something like this:

/dev/sda5 on /media/7e3fbc57-03fe-4742-bb72-756f31852059

If you have set the label with something descriptive, it should look like this:

/dev/sda5 on /media/data

Based on the example, the mount-point will be something like /media/7e3fbc57-03fe-4742-bb72-756f31852059 OR /media/data.

Now, all you need to do now is run the command below with your username and the correct mount-point:

sudo chown -R peachy:peachy /media/7e3fbc57-03fe-4742-bb72-756f31852059

OR

sudo chown -R peachy:peachy /media/data

Note: Your username and mount-point will be different. Also, if you have set a label that contains spaces (e.g. 1TB External or My Files), you will need to enclose the entire mount-point path in single quotes, such as:

sudo chown -R peachy:peachy '/media/My Files'

OR

sudo chown -R peachy:peachy '/media/1TB External'

You are now the owner of the partition and should be able to do whatever you want with the drive or partition.

To change ownership of NTFS partitions, see:

How do I use 'chmod' on an NTFS (or FAT32) partition?
How to 'chown' on an NTFS ( or FAT32 ) partition?


Redshift doesn't work without internet connection because of lacking location info

Look at /usr/share/doc/redshift/example-redshift.conf. Note particularly the bit where lat and lon are assigned manually. Copy this file (or part of it, if you don't like all the settings) to ~/.config/redshift.conf, figure out your latitude and longitude (with google maps?), and edit the manual override appropriately.

Note that you could probably have figured this out by looking at man redshift, info redshift, (which describe setting location manually) and the output of dpkg -L redshift (where you would have seen that it provided example-redshift.conf).


The procedures are detailed in the link that I gave as a reason to close this question - but to paraphrase them:

Make a backup of your data onto an external device (a usb drive?)
You need to create some empty space on your disk.  To do this you will need to shrink the '/dev/sda4' partition, by an amount equal to the space that you want to add to your root partition.
The extra space (from '/dev/sda4') will need to be congruent to (next to) '/dev/sda1', and to do this, you will need to move the remaining partitions ('/dev/sda2' and '/dev/sda3')
The final step will be to expand '/dev/sda1' into the open space.

Although you can move and resize '/dev/sda3' and '/dev/sda4' while you are using your computer, you probably cannot do the same for '/dev/sda1' and '/dev/sda2'.  To accomplish the whole resizing scheme, you should create a liveUSB and run gparted from that device to do the repartitioning.  It bears repeating at this point, that making a backup of your data before you do this is a really good idea.


Thanks https://askubuntu.com/users/658578/toomanypets,
your comment solved it.

I had installed samba on that client. Other had no samba installed and did not have that problem.

I fixed it with:

sudo nano /etc/samba/smb.conf

Search the line (it should about the very first settings in the file) and change from

workgroup = WORKGROUP

to

 workgroup = HOMENET

where I think the case does not matter. Save with Ctrl-o and exit with Ctrl-x. Finally, restart the samba service with

 sudo /etc/init.d/samba restart

Hope it helps


Try installing/reinstalling the package indicator-sound:

sudo apt-get install indicator-sound

Also, make sure that PulseAudio Sound System is ticked in System -> Preferences -> Startup Applications.


Can't enable Canonical Livepatch on Ubuntu 20.04.1 LTS

I had this same problem today and I fixed it by doing the following:

Disable Livepatch either through the GUI or by running canonical-livepatch disable as root
Uninstall Livepatch with snap remove canonical-livepatch as root (optional. Try it first without doing this)
Run the command rm /etc/machine-id as root to remove your current machine ID (if it says the file or directory doesn't exist, you can safely ignore it)
Run the command systemd-machine-id-setup as root to regenerate the ID
Reinstall Livepatch with snap install canonical-livepatch as root (if you removed it earlier)
Either grab your key from https://auth.livepatch.canonical.com and follow the instructions there to re-enable or use the Livepatch GUI

If this works for you, please mark this answer as correct so I can get enough reputation to do stuff.


Just follow the 1st paragraph of the Ubuntu Community Documentation about UEFI:
https://help.ubuntu.com/community/UEFI


You can store all your saved networks in an array. Here is an example:

#!/bin/bash

declare -a networks #the array where we will store all saved networks
n=0
for network in /etc/NetworkManager/system-connections/*; do
    networks[$n]="$(basename "$network")"
    (( n++ ))
done

#list all networks in a line
echo ${networks[*]}

#list networks one by one
for (( i=0; i<${#networks[@]}; i++ )) {
    echo ${networks[$i]}
}

unset networks


The MBR scheme has been used to partition your disk.

This means partitions are limited to 4 primary partitions. To overcome that, the extended partition scheme has been created; inside which one can create other logical partition.

What you see is the extended partition #2 with one logical partition inside (#5).


Unknown folders that are seen on Windows from Ubuntu

No need to worry. This is system names related to current folder and parent folder.
. - current
.. - parent
Its used to go to parent directory: cd ..
Current used to make relative path as example ./somescript.sh (since current folder not in PATH)


You could run your system with the Universal timezone, or use the TZ environment variable env TZ=Universal date .

Otherwise you are faced with configuring each application that 1) You use; and 2) displays the date.


How to protect vps data from datacenter administrator

Impossible.
The data center admin is looking from above the filesystem. If they want they could clone your system, and reset your admin password. All without you ever knowing about it. Not even encrypting the filesystem is going to help you here.
If you have data you do not want someone else to see you do store it somewhere else. On an external media or your own personal system. That way you can encrypt it making sure there is nobody able to see the contents.


apt update ubuntu 18.04 does not have a release file

make sure your repositories are set on the nearest server: go to software and update, there you can select a server (most of the times you should chose your country). check your internet and try sudo apt dist-upgrade


`systemctl reload sendmail` throws `Job type not applicable"

That error typically means that the client program (in this case sendmail) doesn't expose a reload method to systemctl to use. This is the fault of the developers/maintainers, and not systemctl. (Perhaps sendmail can't just plain reload the configs?)

I would recommend just plain restarting sendmail whenever you need to reload the configuration:

sudo systemctl restart sendmail

This will kill sendmail and then start it up again as a fresh daemon instance. As a result, any new config changes will take effect, but you may lose temporary data.


There are two elements here: The repository and the license.

Software is distributed from a repository. Apt gets software from these repositories. Most of your software comes from the Ubuntu repo. Third parties can run their own repos.
A Software's license must permit redistribution and must be compatible with other licenses in order for the software to be included in the Debian and Ubuntu repositories. Software with an incompatible license must be distributed some other way: A non-Ubuntu repository, a standalone deb or snap, a tarball, etc.

Let's look at three examples of commonly-used software:

LibreOffice is has a compatible license. It is distributed through the Ubuntu repositories. Updates come through the same repository via Apt.
Google Chrome has an incompatible license -- Google won't let anybody else distribute their software. Instead, Chrome users add a non-Ubuntu repository. Updates come through the same repository via Apt.
RStudio Server has an incompatible licence, and NO repository at all. Users must manually download a deb from a webpage. Apt cannot handle updates, since there is no repository.

If you are a paying customer, you should complain to RStudio about their poor Debian/Ubuntu support. A non-Ubuntu repository is simpler to set up and maintain than their web page.


How can I set up incremental backups to include my themes and customisation on Ubuntu 18.04?

The reason of the advices to not backup the "/" folder is this: typically, there are many virtual (and, sometimes, physical) filesystems attached to it. A virtual filesystem is like a /proc: it doesn't have physical files on the hard disk, instead listing/reading/writing their file structure manipulates some data structures of the kernel. For example, writing 1 into /sys/bus/pci/rescan doesn't write anything to anywhere on a hard disk, instead it re-scans the PCI bus for new devices.

Backing them up would be meaningless or they might be even harmful.

If your goal is to back up everything, then the best what you can do is that you back up everything. However, backing up / might be problematic because of the problem above.

However, there is a simple trick to solve that. Linux knows the thing so-named bind mount: it means, that you can mount a filesystem multiple times.

For example, a

mount /dev/sda7 /mnt/root

will mount your root filesystem (considering if your root is, for example, sda7) to the directory /mnt/root. You will see everything in it, except any sub-mounts, including the virtual filesystems.

The trick is this: after that, you can safely backup /mnt/root with any tool you wish to, including rsync.

Note also, this is only a recursive file copy. You have no protection for possible file inconsistency issues what happen. Imagine if a database has two files, for example, /var/lib/postgresql/11/main/base/13731 and /var/lib/postgresql/11/main/base/13732 which refer to eachother. If the database engine writes something into the first and to the second, while your backup process runs, then it is possible that the first will be backed up and the second won't. Thus, your database will become crap after a restoration.

This is also a reason, why you will probably find contra-arguments (sometimes quite vehement ones) against backing up your system on this way. However, in practical, user-level use cases, a real problem such this exists only very rarely, maybe the most typical one is when you are playing with a database for some web development task. In a home environment, I simply ignore this problem. In a professional environment, it is practical to use another, different backup for your data which is sensitive for this.


Has anyone been able to install Ubuntu Server 14.10 on IBM E880 Frame (9119-MHE) (POWER8) on EMC san?

Can you test with Ubuntu 15.04?

The ibmvfc module was just recently added to the installer (See LP: #1416001).

You can find 15.04 current ISO builds/netboot images at http://cdimage.ubuntu.com/

ISO: /ubuntu-server/daily/current/
Netboot: /netboot/vivid/

If 15.04 works, please verify that the ibmvfc module is being used.
After the disk detect phase, choose 'Go Back', then 'Execute a shell', and run:

lsmod | grep ibmvfc

the number should be greater than 0.

If so, please add a comment on that bug, requesting it for 14.04/14.10.


Try removing all the content of /var/lib/apt/lists directory, you can use this command:

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

Then execute this command:

sudo apt update

And finally, try to install firefox again:

sudo apt install firefox

If this doesn't work, you can try:

Settings → Software & Updates → Ubuntu Software: Download from: Change Local to Main Server, or any other Server that is close to you.

Hope it helps.


how to remove update repo that always fails

Open a terminal window (ctrl-alt-t) and run

sudo apt-get install ppa-purge

sudo ppa-purge ppa:geod/ppa-geod

That should do the trick, and remove the repository along with installed packages.

Yet another way is sudo add-apt-reposiry -r ppa:geod/ppa-geod.
That will just remove the repositry.

Alternatively, you can run software-properties-gtk, in the window that opens, select the Other Software Tab, find the corresponding lines and delete them.


update to ubuntu17.04 with mysql-server failed with initscripts dependency

This is solved by update with MySQL APT Repository

sudo dpkg -i mysql-apt-config_0.8.7-1_all.deb
sudo apt update

and select 5.7 with OK

backup configure file and databases
sudo rm /etc/alternatives/my.cnf /etc/mysql  -fr
sudo rm  /var/lib/mysql/* -fr
sudo apt remove mysql-server mysql-client mysql-community-client  --purge
sudo mkdir -p  /etc/mysql/conf.d/

  else error with mysql-server (--configure) ==> /etc/mysql/conf.d/ not found in /etc/init.d/mysql restart

sudo apt install mysql-server mysql-client --fix-broken --fix-missing
restore configure_files and databases with the backup files
/etc/init.d/mysql restart

Hope this will save your time! Good Luck!

BTW: Failed to start mysql.service: Unit mysql.service is masked ==> systemctl unmask mysql.service
MARK: dpkg-query -l mysql* to queuy state of package.


What would be a good way to scale and align various scanned images using common points?

You can try scantailor.
I used it for aligning scanned pictures of books and it has great result. I don't know what do you mean by common points but scantailor can guess common size of pictures and align pictures based on it.


I apologize at the outset for just providing a partial answer, but I can at least tell you that I am using Ubuntu 12.04 with an Axiom 49 successfully "out of the box" (no special configuration necessary). The output to lsusb looks the same for me as for you, so I don't think the problem is there.

I'm using python with pygame to read in MIDI events. (if you are interested I could post some sample code, but you'd have to install pygame to use it)

I am guessing the issue is somewhere in JACK or Rosegarden, though I don't use those so I can't help with them. Hopefully constraining the search to those components rather than Ubuntu itself is helpful.


Disable Importing of Documents and Settings during install?

You should be able to run the installer by

gksudo ubiquity --no-migration-assistant


In Windows:
We need to test/repair any Windows/NTFS partitions using chkdsk, and we need to disable fast start and hibernation.

open an administrative command prompt window and type chkdsk /f c: and approve to run this at the next reboot time

type chkdsk /f x: changing the "x" to any other drive letters that exist on your system

disable fast start in the Power control panel
open the Power control panel
select Change what power buttons do
select Change options that are unavailable
uncheck fast start

in the open administrative command prompt window, type powercfg /h off

reboot Windows and let chkdsk test/repair the C: drive

reboot Ubuntu and see if it boots properly


What version of Ubuntu support switchable graphics?

Ubuntu 10.10 and newer.

All of your questions are in this quote (Source):

  How to switch the GPU

  The kernel shipped in Ubuntu 10.10 supports hybrid graphics by means of the vga_switcheroo flag. See vga_switcheroo below.

  Enabling vga_switcheroo

  vga_switcheroo is the kernel mechanism that allows you to switch
  between GPUs if your machine has a hardware mux. Note that this method
  is not supported by all machines and only works if you are using the
  opensource driver (nouveau, radeon) and not the proprietary ones
  (nvidia, fglrx).

  To check whether your kernel is compiled with the proper option you
  can examine the file config-2.6.nn-mm-generic in the /boot directory:

grep -i switcheroo /boot/config-*

  The vga_switcheroo mechanism will only be active when the kernel is
  booted with either the modeset=1 kernel option, and/or the
  nomodeset option being absent.

  To test if vga_switcheroo is enabled, look for the switch file:

ls -l /sys/kernel/debug/vgaswitcheroo/switch


Turns out the problem was bad ethernet cable. I swapped the cable out and now everything works.


How can I disable bluetooth auto connect for specific devices?

User Elder Geek provided a solution here  that looks like it may work:

Install blueman bluetooth manager from the Software Center or with this command:
sudo apt install blueman

Note: Installation requires the universe repository to be enabled in your software sources.

Open Blueman from the Dash.

Select the headset from the list

Click Setup...

A window will open up, on that window, check Do not connect.

Click the Next button.


Why do I get this error when opening Tor Browser

First, I would never use Tor from an installation repository. The very reason to use Tor is anonymity. Uninstall and then:

Download from https://www.torproject.org/download/. You get a file with a name
ending tar.xz.
Right-click on the file to unpack it (see to it that you have xz-utils installed)
In the directory that is the result of unpacking the tar.xz file you have a
directory called Browser and a file called Tor Browser Setup. Double-click on
the setup file and Tor will be properly setup and will start. The Tor Browser Setup
file will change name to Tor Browser, which is the file you double-click in the
future to start Tor.

You can place the directory where ever suits you.


gcolor2 package missing in Ubuntu 18.04?

It is not too difficult to install it manually (from 16.04 LTS xenial repository):

cd ~/Downloads
wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcolor2/gcolor2_0.4-2.1ubuntu1_amd64.deb
sudo apt-get install ./gcolor2_0.4-2.1ubuntu1_amd64.deb

And then use it as before:

Notes:

1. modern alternative - gcolor3 is packaged in very few distributions.
(see at repology.org).
2. on Ubuntu gcolor3 is installable from ppa:evertiro/gcolor3.
3. currently gcolor3 does not have broad list of predefined colors (see above, reported bug 110 to developer).
4. another alternative is KColorChooser, it is installable from repository as kcolorchooser package, but it does not have list of named colors.


For those who are interested, here's how I succeeded to make it working.

I created a script :

#!/usr/bin/sh

while true
do
    if [[ "$(xdotool getwindowfocus getwindowname)" =~ "Chrome" ]]
    then
        xbindkeys 2>/dev/null
    else
        killall xbindkeys 2>/dev/null
    fi
    sleep 0.5
done

I run this script on login, when I switch to a Chrome window xbindkeys runs along with the config file ~/.xbindkeysrc containing the Emacs keys.
It's not very elegant but it works.


Voila... Ubuntu Software Center offers sync between computers. Thus I can sync between my computers exactly as I asked.

PS

For Mint user you've to modify two files as mentioned in this post then you can use Ubuntu Software Center... don't forget to change code name and release version as mentioned in /etc/os-release


You can  do this with udftools

cdrwtool -i -d /dev/sr0 | awk '$1 == "free_blocks" {print $3 * 2048}'

will show the size in bytes.

On an empty DVD I get

4.70037e+09

and it says 4.7Gb on the disc itself.

  If possible i'd also like to find out whether it's dvd or cd.

There are no 4.7Gb cd's. Nor 700Mb dvd's. The size also shows you what kind of medium it is.

There is also

cdrecord -minfo -v

To use it install:

sudo apt install wodim

There is also dvd+rw-mediainfo:

dvd+rw-mediainfo /dev/sr0


Black screen with mouse cursor on bootup

I'm guessing it's a bug with the power manager or screen locker again. However, the fact that your mouse still appears makes me doubt. Nevertheless, my answer on the following link could provide a solution: Laptop screen is black after restart


By the developer:

B-Chat is a Battle.net chat client for Linux. It is currently text based, but plansare in place as of version 0.13 to create a user interface using GTK/Gnome.

http://sourceforge.net/projects/b-chat/


Add &>/dev/null to the command to send stdout and stderr to /dev/null, the nirvana of Linux systems:

jupyter notebook &>/dev/null &

By the way it doesn't matter where you put the redirection, that's also fine:

&>/dev/null jupyter notebook &


How to organize scripts and tools under ~/bin in directories, but have them in $PATH?

Add every subdirectory to $PATH as well. But that means editing ~/.profile everytime I move, download or git-clone new directories.

No need to edit every time, try something like this:

if [ -f ~/bin ]; then
   for i in $( find ~/bin -type d ); do
     PATH=$PATH:$i
   done
fi


My wubi usb installer can"t seem to find installation files

Since Ubuntu 13.04, Wubi was removed. If you want a Wubi install you haveto use Ubuntu 12.04 or 12.10 but they are out of support if I am not wrong.

I do recommend to install Ubuntu 14.04 on a hard drive partition if you want to use Ubuntu. It is not that hard to do and there are tons of tutorials on the web.


So you want to connect using your server's original (non-VPN) IP address?

The problem is that the default gateway gets changed by OpenVPN, and that breaks any connection coming in on the non-VPN interface. Linux will send responses to packets that came in on the real interface out the VPN interface! You need to set up appropriate routes before you start OpenVPN.

What follows works for me. It uses iptables and ip (iproute2). Below, it is assumed that the default gateway interface before OpenVPN is started is "eth0". The idea is to ensure that when a connection to eth0 is made, even if eth0 is not the default gateway interface anymore, response packets for the connection go back on eth0 again.

You could use the same number for the connection mark, firewall mark and routing table. I used distinct numbers to make the diffences between them more apparent.

# set "connection" mark of connection from eth0 when first packet of connection arrives
sudo iptables -t mangle -A PREROUTING -i eth0 -m conntrack --ctstate NEW -j CONNMARK --set-mark 1234

# set "firewall" mark for response packets in connection with our connection mark
sudo iptables -t mangle -A OUTPUT -m connmark --mark 1234 -j MARK --set-mark 4321

# our routing table with eth0 as gateway interface
sudo ip route add default dev eth0 table 3412

# route packets with our firewall mark using our routing table
sudo ip rule add fwmark 4321 table 3412

===

UPDATE:

The above works fine for me on Debian Jessie. But on an older Wheezy system I have just found that I need to add "via" to the routing table entry:

# our routing table with eth0 as gateway interface
sudo ip route add default dev eth0 via 12.345.67.89 table 3412

There "12.345.67.89" must be the original non-VPN gateway.


Java Web option is not available in NetBeans 7.0.1

I also tried to install NetBeans IDE 7.0.1 in Ubuntu 14.04 with OpenJDK Development Kit 7 and had the same problem as you have. I searched for a solution and found a Launchpad bug report: Bug #1360100: NetBeans IDE cannot create a project, so I gave up and installed IntelliJ IDEA Community Edition from the Ubuntu Software Center instead. IntelliJ IDEA Community Edition is a free (it doesn't cost any money) and open source version of IntelliJ IDEA, a premier IDE for Java, Groovy, Scala and Android applications development.
Eclipse has most of the functionality of NetBeans in one form or another. Or you can download the Oracle Java 8 SE bundle of NetBeans IDE from the Oracle website, which contains both Java 8 and NetBeans 8. The instructions for installing the Java 8 SE and NetBeans Cobundle are at this link.
NetBeans has been dropped from the default Ubuntu repositories in Ubuntu 15.04, so you need to download NetBeans in order to install it in Ubuntu 15.04. In Ubuntu 15.10 and later NetBeans 8.0 can be installed directly from the default Ubuntu repositories. NetBeans 8 targets Java 8 as its compatible Java version. In Ubuntu 18.04-20.10 NetBeans 10.0 can be installed directly from the default Ubuntu repositories. In Ubuntu 21.04 NetBeans 12.0 can be installed directly from the default Ubuntu repositories.


Find out if there is a local user logged in when logging in over ssh

Use w

From w man page:

Show who is logged on and what they are doing.

Output example:

$ w
09:15:10 up 43 min,  2 users,  load average: 0.74, 0.38, 0.24

USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU  WHAT

kucing   tty7     :0               08:32   43:15m 57.73s  0.18s x-session-manager
kucing   pts/0    :0.0             08:48    0.00s  0.24s  0.00s w´


How to block internet access for wine applications?

There's a nice tutorial on blocking any given program from accessing the Internet on the Ubuntu forums.

Steps

sudo addgroup no-internet  # Create group "no-internet"
sudo adduser $USER no-internet  # Add current user to no-internet

iptables rule to prevent that group from accessing the network

sudo iptables -I OUTPUT 1 -m owner --gid-owner no-internet -j DROP
sudo ip6tables -I OUTPUT 1 -m owner --gid-owner no-internet -j DROP # To also block IPv6 traffic

Process you don't want to have internet access using sg or sudo -g (execute command as different group ID):

sg no-internet -c "processFullPath args"

It basically involves creating a new group, denying it Internet access, and then running any program you want to restrict as that group ID. So in your case, you would just always run wine using the method described in the tutorial.


Can I upgrade Ubuntu 12.04 (dual boot) to 13.04 from a DVD

Boot with the live CD/DVD of the new version. If this can see the network card it should connect to the internet and give you the upgrade option when you select install.


NVIDIA persistence daemon continuously starting and stopping in syslog

Although this is an old problem, I've still encountered it myself on Kubuntu 18.04 and nvidia driver 390. Namely, the nvidia-persistence daemon spams the screen during boot (sometimes, not always). Thus, my solution circumvents the standard nvidia daemon startup on system boot by using a separate systemd service.

Like stated before, it seems to be a misconfiguration of starting the nvidia-persistence daemon. More precisely, the udev rules seem to be the problem for me. Thus, I modified /lib/udev/rules.d/71-nvidia.rules and commented out the actions under power-off and power-on. Like mentioned in other answers, you may also comment out the lines for loading and unloading.

Now the daemon does not start on power-on. Consequently, we have to schedule the start of the daemon manually. We can achieve that by copying /lib/systemd/system/nvidia-persistenced.service, e.g.

sudo cp /lib/systemd/system/nvidia-persistenced.service /lib/systemd/system/nvidia-persistenced-manual.service

Now modify /lib/systemd/system/nvidia-persistenced-manual.service to look something like this:

[Unit]
Description=NVIDIA Persistence Daemon
Wants=syslog.target
Requires=local-fs.target

[Service]
Type=forking
User=root
Group=root
ExecStart=/usr/bin/nvidia-persistenced
ExecStopPost=/bin/rm -rf /var/run/nvidia-persistenced

[Install]
WantedBy=multi-user.target

To enable the service, execute

sudo systemctl enable nvidia-persistenced-manual.service

and if the old service is still enabled, run

sudo systemctl disable nvidia-persistenced.service

This way, the daemon will start on system startup. Feel free to modify the line ExecStart=/usr/bin/nvidia-persistenced to e.g. include --verbose or  --user [...].

Keep in mind, that in my default way, the daemon is running with root permissions.  If you do not want this, make sure to run the daemon with the --user argument.

Altogether, this is not a perfect solution, but it was able to fix the bug on my system.


UEFI installed 15.10 doesnt boot from /dev/sdb

The Answer is given by oldfred, thank you so much.
It`s the third link you posted, which i looked at first.

Renaming your .efi files worked.

But why doesnt grub or boot-repair do that correctly?
sigh..

anyway it works, thanks!

Can not boot anymore after a boot repair


I tried to boot using HDMI and it fixed everything!

inside BIOS I changed 'boot display' to HDMI

It may solve your problem


Try this

composer create-project laravel/laravel project-name ~4.2.0 --prefer-dist

~4.2.0 means that you will get the latest version with 4.2.*


how to install ubuntu 12.04 on a new laptop

See this The Live CD Help Article Here or this other article that explains how to boot from USB if you already have Windows on a machine you can access.


Did you try using boot-repair tool?
If not, here are steps.

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

sudo -s

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

apt-get update

apt-get install boot-repair

exit

boot-repair
Now follow the on-screen instructions to restore Ubuntu & other OSes to grub.


Can I configure dhclient to execute a bash script after a successful DHCP renewal?

I've found a solution to my problem.  man dhclient states that a script is invoked by dhclient when it gets a lease.  Further reading of man dhclient-script and the actual script itself describes the location of scripts that dhclient executes depending on the phase of the dhcp process.

The hooks are located in /etc/dhcp/dhclient-enter-hooks.d and /etc/dhcp/dhclient-exit-hooks.d directories for before and after dhclient execution.  Since I'm interested in executing a script after a successful renewal, I placed my script inside the ...-enter-hooks.d directory.

Here's the script, checking for the particular phases which signify a new dhcp ip address before executing the dynamic dns script:

case "$reason" in

    BOUND|RENEW|REBIND|REBOOT)
        sh /etc/network/rinker.sh
        ;;

esac

I got rinker.sh from http://www.changeip.com/accounts/downloads.php?action=displaycat&catid=4, which is just a simple wget call to the website's update URL.


MountManager is described as "The program for mounting of storage devices, flash cards, removable disks in Linux". Even if it doesn't solve your problem completely, MountManager will make it easier for you to mount and unmount your SD card manually. MountManager is no longer available from the default Ubuntu repositories for versions of Ubuntu newer than Ubuntu 12.10 and instead you can use the Disks application which is installed by default in Ubuntu.

You can take a look at a screenshot of mountmanager by searching for it in Synaptic Package Manager and clicking on "Get Screenshot", and you can also install it from Synaptic.


Unable to access external hard disk "unknown filesystem type 'exfat'"

As mentioned in the error:

unknown filesystem type 'exfat'

This means that you don't have the exfat file system installed.

To install exfat, do:

sudo apt-get install exfat-fuse exfat-utils

You should now be able to mount your external HDD.

Also, you might need to reboot your PC for the changes to take effect.


Made it work by wrapping the bond in a vlan:

bonds:
    bond0:
        dhcp4: true
        interfaces: [ eth0, wlan0 ]
        nameservers:
            addresses: [ 192.168.1.5, 8.8.8.8, 8.8.4.4 ]
        parameters:
            mode: active-backup
            primary: wlan0
vlans:
    vlan0:
        id: 0
        link: bond0
bridges:
    br0:
        addresses: [ 10.0.1.1/24 ]
        interfaces: [ vlan0 ]

I love how StackExchange punishes you for posting easy questions but never answers the hard ones! It's definitely not what it used to be.


the efi boot order keeps being forgotten

It's possible that this is a Secure Boot problem. Try disabling it from the BIOS UI.


Information taken from the Snapcraft forums.

The /usr/lib/jvm/java-8-openjdk-arm64/jre/lib/security/cacerts/ file is pointing somewhere outside your snap, which is not guaranteed to exist. In this particular case, it will prevent ssl encrypted connections like HTTPS to not work within your snap.

This is described here (with a workaround).

If you install openjdk-8-jre-headless and ca-certificates-java on your system, then when you run snapcraft, it will pull them in.

sudo apt-get install openjdk-8-jre-headless ca-certificates-java

You could also try using the following in the snapcraft.yaml file when using ‘snapcraft cleanbuild’:

build-packages:
- ca-certificates
- ca-certificates-java
- openjdk-8-jre-headless
stage-packages:
- openjdk-8-jre-headless


while running mysql -u root got ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

using password: NO

Provide the password it wants. The line you should be using is
mysql -u root -p

and it will then ask for the password for mysqluser root.


I believe that you want to use Passive FTP. For some reason it's not a command line option anymore. Go to:

Control Panel,
Internet Options,
Advanced,
Browser Options section,
Use passive FTP


You can change the resolution from System Settings > Displays:


Use XSANE to scan and Download and install HPLIP directly from the HP OPEN SOURCE website. http://hplipopensource.com/hplip-web/downloads.html

Click on DOWNLOAD HPLIP. Find the downloaded file and right click on it and select PERMISSIONS. Select MAKE EXECUTABLE. Click OK.

Right click on the file again and select OPEN then EXECUTE. Follow the instuctions.

*Reason it works is mainly because it detects and installs dependencies that the apt-get or software center version won't.

Once you install the driver in this fashion XSANE should pickup your scanner if it's supported.


Unable to load dynamic library PHP after upgrade to 18.04

I don't think problem is in PHP. Problem is module remctl, which cannot be loaded.

If you do not want php-remctl module, I would suggest you just remove the ini file. It is probably in /etc/php/7.2/mods-available/. By removing the ini file PHP will no longer load that module. See what remctl packages you have installed by typing

dpkg -l | grep remctl

and maybe you can remove them by typing

sudo apt remove

After you remove the packages that do not work try

sudo apt install php-remctl

That should install php-remctl package for Ubuntu 18.04.


Failed to open \EFI\ubuntu\grubx64.efi - Not Found (on LUKS encrypted partition)

Followed this and managed to fix the issue ...
Notes:

sudo must be used (outside of chroot)
home_sdb3 is just a tag, can be anything, as long as it matches in cryptsetup luksOpen and cryptsetup luksClose commands
sdb2 is the boot partition usually less than 1Gb
grub-install must be used
the argument to grub-install must be the drive itself (not any partition), which can also be seen in fdisk -l


You have to (re)install single Indicator Sound package by
sudo apt-get install --reinstall indicator-sound

then reboot.


During xmr-stak install (Monero Mining) I get CUDA TOOLKIT ERROR?

sh: 0: Can't open cuda_9.1.85_387.26_linux.run

Because the download from the nVidia website strangely does not include the .run extension. Try replacing the command with:

$ sudo sh cuda_9.1.85_387.26_linux

or rename the file to include the .run extension.


Fail to boot into any kernel after update to 5.4.0-54 on Ubuntu with Threadripper 3xxx

Reinstalling the desktop fixed my problem:
apt install --reinstall ubuntu-gnome-desktop

Here's a bunch of commands I tried before that one that didn't fix the problem on their own, but may have set it up to succeed:
apt update
apt upgrade
apt dist-upgrade
apt install --reinstall linux-image-5.4.0-52-generic
apt install --reinstall libnvidia-compute-435

After I could log in, I noticed my internet wasn't working. Turns out Network Manager stopped managing the connections. The last step of this answer fixed that problem, by clearing the contents of the file /usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf.


How do I resize the partition in which Ubuntu is installed?

The best option is to use live USB and Gparted program following way:

You boot the live USB or CD
Launch Gparted
Using Gparted you extend and move your partition in a desired way.
After applying changes you quit Gparted and reboot your new system (be sure remove live USB).


What's the point of adding extra GB of drive space to the Ubuntu partition beyond what the OS needs?

But how is this 400 GB used?

That is up to you.

Theoretically you could create a 250 Gb swap file and reserve 10 Gb for the OS files and 140 for /home/. Not that I would advice it but it is possible.

For the basic system (ie. Ubuntu itself with kernel etc etc) 10 Gb is more than enough (ie create a 10Gb partition and call it / during installation).. Your personal documents can be stored on a separate partition on those 400 Gb (ie create a 380Gb partition and call it /home during installation). The remainder can be used for swap.


I had the same problem on Ubuntu 18.04 - cracking sound from left speaker that occurs mainly before the playback of video/audio.
This solution from James Kelly works for me:

if your distro uses alsa you should be able to fix the issue directly by modifying the following conf file: /etc/modprobe.d/alsa-base.conf

Open file in console using:

sudo nano /etc/modprobe.d/alsa-base.conf

Add the following line to the end of the file:

options snd-hda-intel power_save=0 power_save_controller=N

Hit Ctrl-S then Ctrl-X

Source: https://www.youtube.com/watch?v=Pdmy8dMWitg&lc=UgwSJTT-VsjsaAzzGk54AaABAg


Not able to Install Android Studio on ubuntu

Try checking what is the current default java version in terminaljava -version
If your not using recommended version type sudo update-alternatives --config java and insert the number that points to java-8-openjdk , java-7-oracle or java-8-oracle.


How to recover data & partition lost during installation of Ubuntu12.04LTS. please help .I have lost my work place data.URGENT

Since your HDD has 500gb and a UBUNTU install just needs a few gigabytes you have good chances that your Data just isn't adressed anymore but may still be existant.
The Comment suggesting you to use TESTDISK is very promising though.

Here you got some more usefull information and tools :
http://www.howtogeek.com/howto/15761/recover-data-like-a-forensics-expert-using-an-ubuntu-live-cd/

Don't Panic (-:


Hold packages back from updates without APT Pin?

The answer is to use dpkg --set-selections. If you run the command dpkg --get-selections you can see what is set already:

$ dpkg --get-selections | head
acct                                            install
adduser                                         install
apparmor                                        install
apparmor-utils                                  install
apt                                             install
apt-transport-https                             install
apt-utils                                       install
aptitude                                        install
at                                              install
auditd                                          install

Consider, in this case, the package dnsutils:

$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  bind9-host dnsutils libbind9-60 libdns64 libisc60 libisccc60 libisccfg60 liblwres60
8 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,257kB of archives.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]? n
Abort.

Now let's change it - put the package on hold:

$ echo dnsutils hold | sudo dpkg --set-selections

Check the results:

$ dpkg --get-selections | grep dnsutils
dnsutils                                        hold

Try the update again:

$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
  bind9-host dnsutils libbind9-60 libdns64 libisc60 libisccfg60 liblwres60
The following packages will be upgraded:
  libisccc60
1 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
Need to get 29.9kB of archives.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]? n
Abort.

Now, dnsutils - and its related packages - are being held back, just as we wished.


Onedrive from Ubuntu creates renamed files

This is most likely 'as designed' behavior by Microsoft with OneDrive: See here. In this case, the only thing you can do is ensure both computers have access to the internet, otherwise the only thing you can do is manually delete and rename the files.

You can always try Dropbox or Google Drive.


Super+Space should work (Super is usually the key with Windows logo).


How to customize the initrd embedded in or coming with the kernel image

man initramfs-tools

and then write a script for hooks/ containing something like

copy_exec /sbin/mdadm /sbin


I'd think you've used this ppa, possibly to install vlc, which installed libavcodec-extra-53 4:0.8.0.1~ppa2  - https://launchpad.net/~n-muench/+archive/vlc

(typically when you see an error like "but blah-blah is to be installed", what that means is 'blah-blah' is already  installed

If the ppa is still enabled, (doubtful),  then run sudo apt-get update

If it's not currently enabled then re-enable or add back, then run above command & you'll be able to install ffmpeg or libav-tools which provides avconv

avconv will be the preferred way to run 'ffmpeg'  as sooner or later the ffmpeg binary will no longer be provided in Debian/Ubuntu

If you decide that using backported ffmpeg shared libs isn't what you want then after enabling the ppa run ppa-purge as suggested. (The ppa isn't proving all packages that depend on the shared ffmpeg libs so some apps or plugins could have issues


Asus N61JQ AMD 5730 graphics drivers black screen

I found this thread randomly and saw that no one answered regarding the black screen (that I saw, apologies if I'm being blind). I think I know the problem because I have the same laptop and, failing many times in trying to update the graphics driver, found that anything past CCC 13.4 (I think) for me turned the backlight off of the laptop display. Considering you can hear Ubuntu in the background, it sounds like everything is loading up fine... You just can't see it. Not very helpful.

Anyway, I know this is an old thread but thought I would share my insights in case it helps anyone else :)

Oh and I got in touch with ASUS to see whether they could offer any help as to which driver is best suited, they simply directed me to their woefully out of date driver page for the laptop.

Cheers


Unable to create directory in ubuntu 10.04

remove this line 'alias mkdir=cd'
from ~/.bashrc or /etc/bash.bashrc


Where's the best place to share files from?

Often configurations are done that allow every user to have a public folder in their home directory. This way every user has control over their public files and no system files will ever be accessible there.


Solaris Guest VM on Ubuntu 14.04 KVM Setup, unable to get DHCP IP nor able to reach network

Few findings from my side:

Booted Plain Opensolaris VM, found same issue!
Checked with qemu's site on supported OSes, Solaris 11 Express 2010.11 is supported but with few issues.
Then found this bug: https://bugs.launchpad.net/qemu/+bug/1395217

Solution: https://bugzilla.redhat.com/show_bug.cgi?id=1040500


Desktop icons in Ubuntu 20.04 are provided by a Gnome Shell extension. Some sizes can be set using the preferences.
To access these preferences, install "Tweaks" ("Gnome Tweaks"). On the Extensions tab, find "Desktop Icons" on the Extensions tab, and click the button with a cog wheel to access the settings.


You are not actually pausing to read user input anywhere.

echo "You must type 'soff' to end this script."
while [ -f .running ]
do
   if read -t 10 -p "I'm still running, type 'soff' to stop me :)... " ans
   then
      if [[ $ans == "soff" ]]; then
         break
      fi
   fi
done

signoff   # shouldn't this be "soff" ?

read -t returns a failure condition if the timeout value expires, so the if block will not enter and you get to the next while loop iteration.

Also, you don't need to dynamically create a script file: use a shell function

signoff () {
    rm .running
    # do other stuff
}

echo "You must type 'soff' to end this script."
while ...
done

signoff   # this calls the function

To block multiple invocations, check the existence of the .running file as the first thing your script does.

#!/bin/bash

if [[ -f .running ]]; then
    echo "I'm already running (on pid $(<.running))"
    exit
fi

# put the current pid in the running file
echo $$ > .running

Note, there is a race condition there. I think that directory creation is atomic, so you can do this instead:

#!/bin/bash

if mkdir .running
then
    # nobody else is running this script
    # store the pid
    echo $$ > .running/pid
else
    echo "I'm already running (on pid $(<.running/pid))
    exit
fi
signoff() {
    rm .running/pid
    rmdir .running
}
# ...

Putting it all together:

#!/bin/bash

if mkdir .running
then
    # nobody else is running this script
    # store the pid
    echo $$ > .running/pid
else
    echo "I'm already running (on pid $(<.running/pid))
    exit
fi

signoff() {
    rm .running/pid
    rmdir .running
}

read -p "What are your words of wisdom Grasshopper?: " words

cat <<WISDOM >>log.dat

        -----------------------------------------------
        Signon:     $(date)
          Now hear this: $words

WISDOM

while [[ -d .running ]]
do
   if read -t 10 -p "I'm still running, type 'soff' to stop me :)... " ans
   then
      [[ $ans == "soff" ]] && break
   fi
done

signoff


What about using

sudo ip addr flush dev eth0

would that force the interface to pick up a new address?


The PNG is a bitmap export and does not contain any "vector" information about layers, paths, nodes, etc. There is no way whatsoever to get this kind of information back from the PNG.

If your laptop stopped working altogether, probably Inkscape has not been able to do an Emergency save (since it didn't crash strictly speaking, your system as a whole went down).

Concerning Auto Save and Emergency save:

  1) When Inkscape crashes, it tries to save the current state in an
  emergency save file and notifies the user in a popup dialog about its
  file name and location if it succeeds. There might be occasions
  (getting rarer with more recent versions of Inkscape) where due to the
  nature of the crash the emergency save fails.

  The location and file name of the emergency-saved file depends on
  whether the file has been saved earlier, and to some extend on the OS:

  For unsaved files, the base name of the emergency file is 'New Document' (or the localized version of it). At the end of this base
  name, a date and time stamp is added, as well as the suffix ".svg".
  The location for emergency saves of unsaved files is $HOME on Linux
  and OS X, and %UserProfile% on Windows (actual location varies
  depending on Windows version and system configuration).
  For files which have already been saved earlier, a date and time stamp is added to the original file name, and - if permissions allow -
  the emergency save file is created in the same directory as the
  original one which was currently edited.
  If permissions prevent saving either in the current directory or in $HOME (or %UserProfile%), inkscape tries to save it in $TMPDIR.

  See also:
  http://thread.gmane.org/gmane.comp.graphics.inkscape.devel/34122/focus=34141

  2) In addition to the emergency save mechanism, Inkscape has an
  auto-save feature:
  http://wiki.inkscape.org/wiki/index.php/Release_notes/0.47#Autosave
  Note that this feature needs to be enabled and configured by the user
  first (it is not enabled by default), and the directory specified in
  the preferences dialog needs to exist (Inkscape does not create it
  itself if missing).

(source: https://bugs.launchpad.net/inkscape/+bug/1177695)


Cannot Restore GRUB (Ubuntu 11.04 + Win 7)

Try to install Boot-repair. It's a very useful utility, because you can repair GRUB easily, according to your problem.


EDIT: If you have successfully installed openjdk-10-jdk package, than You just need to switch default jdk version using 'update-java-alternatives' command (as described here).

You could manually install openjdk (instead of using apt).

For example, openjdk 10 is available to download at jdk.java.net or adoptopenjdk.net.

Installation instructions are available at docs.oracle.com.


Compiz Window Previews stay for too long after my mouse has long moved away. (Gnome Classic and Xubuntu) Fix?

Compiz requires good hardware acceleration to work well, which generally means that you'll have to have a relatively recent graphics card. If your graphics card is an old Intel's accelerator, a VIA, or even an old Nvidia 4000/5000, consider either staying away from Compiz or upgrading to more modern hardware.

If you have a decent card, then something is probably misconfigured.


How can you broadcast a network share (ftp/sftp/webdav) so that it shows up in nautilus for other users

You can announce services by using the avahi service. To announce a service, you have to add a service description file in the /etc/avahi/services directory. For example, to announce an sftp share, create a file sftp.service with:

<service-group>
  <name replace-wildcards="yes">SFTP on %h</name>
  <service>
    <type>_sftp-ssh._tcp</type>
    <port>22</port>
  </service>
</service-group>

For FTP you have to change the type to _ftp._tcp and the port to 21, for an NFS share you have the change the type to _nfs._tcp and the port to 2049, and you also have to include something like:

<txt-record>path=/path/to/someshare</txt-record>

The avahi.service man page has all the information on the format of these files.


restore shutdown button on taskbar? How do you restore desktop taskbar in Lubuntu?

Copy the default config

sudo cp /usr/share/lxpanel/profile/Lubuntu/panels/panel ~/.config/lxpanel/Lubuntu/panels

Change owner:group to the local account from root.

sudo chown owner:group  ~/.config/lxpanel/Lubuntu/panels/panel

now restart the panel

lxpanelctl restart

source


"check that virtualenvwrapper has been installed for VIRTUALENVWRAPPER_PYTHON" when opening the terminal

OP solved it.

Just needed to run the following:

pip3 install virtualenvwrapper


Issue to download Libreoffice Base bibliography tool

I found the answer adapting thanks to saji89's one on how to install untrusted package

sudo apt-get clean

Based on the errors you pasted in the comments section of my previous answer, I have another possible solution:

sudo apt-get clean
sudo apt-get update

I don't know why it worked but I was then able to install the tool!


Run GUI program in bash without opening the window


Try installing a newer version using the official PPA: https://quodlibet.readthedocs.io/en/latest/downloads.html#ubuntu


How can I install Ubuntu on a hard disk portable?

You cannot install operating system on a portable disk. More info you can find on the web, but the only thing you should know that you really cannot install any OS on a portable disk.


I don't have a volume taskbar icon&keyboard shortcuts not doing anything

Did you recently upgrade your Ubuntu? Try this it might help. Use Alt+F2 to open the Run Application app, paste gnome-volume-control-applet into the text field, and click the Run button (you can also enter the command into a terminal, but the button will disappear if you close the terminal). To get it to start automatically from the next reboot, go to System > Preferences > Startup Applications and add it as a new entry with a name like Volume Button.


How to make bootable Ubuntu 14.04 LTS on USB in Debian 8.1?

For absolute newbies:

Insert USB drive in your laptop running any linux distro.
Its recommended to unmount the drive before writing, in case your file-manager has auto-mounted it.
run fdisk -l as superuser and know the alias of your usb drive (sdb, sdc, etc.)
run the command: dd if=/path/to/downloaded/iso of=/dev/sdx as superuser (replace sdx with your own device alias).
Boot with the new usb drive.

Be careful with the dd command! Many people have lost their data with that one.


In addition  to the gsettings key in the post, check if

gsettings get org.gtk.Settings.FileChooser show-hidden

is false.

If it is false, run

gsettings set org.gtk.Settings.FileChooser show-hidden true


In GParted:

Right click on sda3, choose Resize/Move and slide it completely to the right.
Right click on sda1, choose Resize/Move and resize it fitting the unallocated space.


Listen to the computer and check if fans are working.
If so, open the case and try to clean them (and clean all the rest if possible).
Good luck!


How to install wlan driver mt7601u ? file(mt7601Usta.ko) is missing while doing it

There's a PPA with this driver. At least it worked for me. Connect via ethernet and run:

sudo apt-add-repository ppa:thopiekar/mt7601
sudo apt-get-update
sudo apt-get install mt7601-sta-dkms

The driver for this adapter was included in kernel 4.2. If you upgrade to Ubuntu 15.10 you just have to download a firmware file:

sudo wget -O /lib/firmware/mt7601u.bin https://github.com/porjo/mt7601/raw/master/src/mcu/bin/MT7601.bin

If you're using Ubuntu 16.04 or later there's no need to install or download anything.


I recommend using btrfs with raid6. You do not need anything else.
So if for example you have sda,b,c,d,e,f and each have one partition:

mkfs.btrfs /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1
mkfs.btrfs -f -d raid6 -m raid6 -L 'writeyourlable' /dev/sd[a,b,c,d,e,f]1
mount -L 'writeyourlable' /whereever/you/want

Documentation is a bit sparse but that will give exactly 16TB with 2 drives fault tolerance.

Also, btrfs has other usefull features like snapshots and subvolumes that you might need with a 16 TB virtual drive.


How to Download UBUNTU 12.04 LTS on windows xp for writting on a CD?

Well, I guess you should download the Ubuntu 12.04 iso, burn it to a CD, place it in your laptop and reboot it. Maybe you will need to have some fun in the BIOS (like setting up the boot order), but other than that, this should be all you should do it.


How to add the unallocated space to root partition?

The solution to this is quite straightforward. You will need:

A backup of any data you cannot afford to loose.
The means to boot into a live environment. The Ubuntu install media is perfect.

The steps are as follows

Boot into Windows and use the disk management tool to move the approximately 76GB VOLUME to the start of the disk. This will move the unallocated space next to your approximately 49GB Ubuntu root partition
Boot into the live environment (Try Ubuntu not install Ubuntu if you are using the Ubuntu install media)
Using GParted resize the approximately 49GB partition making use of the 100GB of unallocated space.

That’s it reboot into your enlarged Ubuntu install.
Good luck!


Ubuntu PPC version liveDVD not booting on powerbook G4 15"... What to do?

Try Lubuntu 13.04 powerpc instead of Ubuntu.

I have been trying to get a working Linux installation on a PowerBook G4 (2005). Started with Debian Wheezy (7.1) and got it installed but I was having ongoing random crashes and abandoned it to try one of the powerpc variants of Ubuntu.

I also had many problems with configuring the framebuffer when using an Ubuntu 13.04 powerpc ISO installer.  Never did get a usable window manager display.  Tried many of the same yaboot parameters discussed by the OP (and others).

I have just installed using the Lubuntu 13.04 powerpc ISO available at:

http://cdimage.ubuntu.com/lubuntu/releases/13.04/release/

The notes at the following link were useful:

http://powerpcliberation.blogspot.ca/2012/10/lubuntu-install-guide.html

In particular, I needed to use video parameters to yaboot similar to those suggested in step 2 of those instructions.  In my case, the yaboot line was:

live video=radeonfb:1280x854-32@60

Even though the information for my display suggested that "1280x854-24@75" would make sense, that did not seem to work. The OP also shows a Mobility Radeon 9600 graphics controller, the same as mine, so this may work in that case as well.

With the above yaboot line, the display worked properly, installation has gone smoothly, and I'm now rebooted, running in LXDE, and downloading updates.


Error connecting to update server 18.01.04.LTS

I had a similar problem and I fixed it in this way:

I deleted the file /etc/netplan/50-cloud-init^_copy.yaml. It was, as if by magic, in the netplan folder. It will also have been the "troublemaker". This was always listed in the error message mentioned.
Then I tested sudo netplan --debug apply and got a System-Debug-Configuration für the correct network settings.

Here is myn:

network:
  bonds: {}
  bridges: {}
  ethernets:
    enp3s0f0:
      addresses:
      - 192.168.178.122/24
      dhcp4: false
      dhcp6: true
      gateway4: 192.168.178.1
      nameservers:
        addresses:
        - 192.168.178.33
        - 192.168.178.1
      optional: true
    enp3s0f1:
      addresses:
      - 192.168.178.123/24
      dhcp4: false
      dhcp6: true
      gateway4: 192.168.178.1
      nameservers:
        addresses:
        - 192.168.178.33
        - 192.168.178.1
      optional: true
    enp4s0f0:
      addresses:
      - 192.168.178.124/24
      dhcp4: false
      dhcp6: true
      gateway4: 192.168.178.33
      nameservers:
        addresses:
        - 192.168.178.33
        - 192.168.178.1
      optional: true
    enp4s0f1:
      addresses:
      - 192.168.178.125/24
      dhcp4: false
      dhcp6: true
      gateway4: 192.168.178.33
      nameservers:
        addresses:
        - 192.168.178.33
        - 192.168.178.1
      optional: true
  vlans: {}
  wifis: {}

This configuration I dropped into the original 50-cloud-init-yaml, and saved to it.
With sudo netplan apply I restarted netplan. sudo ifconfig showed me the correct configuration and I get internet connection to apt and so on.


Fix text editor colors:

Help > Eclipse Marketplace > Search for "Eclipse Color Theme" and install it.

Then go to:
Windows > Preferences > General > Appearance > Color Theme

Fix text boxes colors:

Open a terminal and run

export SWT_GTK3=0

Then start Eclipse :

eclipse

The user interface should be fixed. If this worked for you edit the eclipse launch script for more convenience:

sudo gedit /usr/bin/eclipse

Add

export SWT_GTK3=0

Before:

ECLIPSE=/usr/lib/eclipse/eclipse

Source:
https://github.com/guari/eclipse-ui-theme/issues/73


Install pip and virtualenv on Ubuntu 16.04 Boot Disk

To setup a Python Programming Environment:
Install the things you need :
sudo apt-get install python-virtualenv
sudo pip install flask

Prepare the envirement:
mkdir py3project
cd py3project
virtualenv -p python3 venv
ls

To use/activate the environment:
source venv/bin/activate

To install pip use:
sudo apt-get install python-pip

Search with pip :
For example you want to look for a package redis.
You do:
pip search jupyter

To install with pip, for example jupyter notebook:
You do :
pip3 install jupyter

Line is the same for python2 pip installs, pip3 use python3
To see your project tree :
tree myprogram

Checkout this link for more information : how-to-install-python-3-and-set-up-a-local-programming-environment-on-ubuntu-16-04


I'm not really sure how it will work but I think the use of private/public keys will give you that uniqueness and therefore security layer. Somehow only your grub usb having the private key that will match the public one on the pc will keep others from booting the pc. I know you can put secure encrypted password to grub, so yeah something like that.


I accidently locked some packages in synaptic, how can I undo these?

Search through Status>Pinned as following in Synaptic:

And remove check-mark from Package>Lock Version as following:


What is the best way to add some configuration to bashrc?

You can do one of two things.

Add the commands to the end of .bashrc.
Create a new file (I create one in a folder ~/.bin, which is automatically added to your path when you login). Source the file at the end of your .bashrc. For example, if your file is called bashextras, add the line:
. ${HOME}/bin/bashextras

/etc/profile and /etc/profile.d affect every user on the system, not just you. So, unless you specifically want every user to be affected, it is best to use only your own .bashrc (affects only your terminal sessions) or .profile (run at login and affects your entire session).


Disable the window moving feature in Xorg and use Tiling instead

The solution described in another post enables moving only window frame:

  Open Settings Manager
  Select Window Manager
  Go to the Advanced tab
  Check the Hide content of windows when moving checkbox
  (Also here you can check the Hide content of windows when resizing checkbox)


Can't isntall PySensors. "sudo pip install PySensors" generates "ValueError: /usr/bin/python: undefined symbol: libsensors_version"

In my case LMSensor was missing. Running sudo apt-get install lm-sensorsthensudo pip install pysensors worked for me.


Why isn't CompizConfigSettings Manager installed along side Unity?

As said by Mark Shuttleworth in the Bug Report that I filed asking the exact same thing,

  No, ccsm should not be installed by default. There are no options in Unity
  through CCSM which are encouraged for
  end-user experimentation. Anything
  there can and will be altered and
  removed. It's there to help us explore
  options and gather testing feedback.
  So please do not install ccsm by
  default.

(From the Bug Report)


cannot remount /dev/sda2 read-write, is write-protected

From the comments...

You don't need to install smartmontools to check SMART status. Just start the Disks application, select the disk, select SMART Data & Tests.

@heynnema I selected Smart Data & Tests and I try the tests

in the Overall Assessment I have Disk is OK, 5776 bad sectors

Because of the number of bad sectors, your hard disk may be defective.

Be prepared to backup your data, if possible.

However, lets try the following test.

To check the file system on your Ubuntu partition...

boot to the GRUB menu
choose Advanced Options
choose Recovery mode
choose Root access
at the # prompt, type sudo fsck -f /
repeat the fsck command if there were errors
type reboot

If for some reason you can't do the above...

boot to a Ubuntu Live DVD/USB
start gparted and determine which /dev/sdaX is your Ubuntu EXT4 partition
quit gparted
open a terminal window
type sudo fsck -f /dev/sdaX # replacing X with the number you found earlier
repeat the fsck command if there were errors
type reboot


No PPA needed. There's gcc-snapshot package in universe. That include libstdc++ and everything else, but all installed under /usr/lib/gcc-snapshot.

Of course, it's only 4.7 until 4.8 development starts in a few months time, at which point I'd expect there to be a gcc-4.7 package, although I don't know for sure.


BSNL 3G Data Card is installed in Ubuntu 12.04, but not opening

I had similar issue with MTNL 3G Jadoo data card (Teracom LW272) and resolved it as described here:
Using "MTNL 3G Jadoo" data card on Ubuntu.
Might help you too.


Okay, so I got it working! I've been closely going over the /etc/init.d/deluged apparently the daemon mode of deluged is disabled by default (WTF deluge, what else is the point of installing a daemon) and you're supposed to enable it manually (they also forgot to mention this in the user guides).

Anyways, to enable it, open /etc/default/deluged in your favorite editor:

$ sudo vi /etc/default/deluged

and change ENABLE_DELUGED=0 to ENABLE_DELUGED=1


How to know the names of Gnome shell components?

You may wish to download the source of the gnome-shell package with the below command
apt-get source gnome-shell

Then navigate to the widgets directory.. for example:
../gnome-shell_3.36.3.orig/gnome-shell-3.36.3/data/theme/gnome-shell-sass/widgets/