Install Ubuntu 15.10 on Dell XPS 15 2015 9550 with Nvidia 960

When you reboot with "sudo reboot" as the last command there, you have to add Nouveau.modeset=0 to grub again.

See this great guide:
http://ubuntuforums.org/showthread.php?t=2301071

It mentions how to make set nouveau.modeset permanently, once you've installed ubuntu.


Source can be found here.

It does not support Unity:

deDict = {
'cinnamon-sessio': 'Cinnamon',
'gnome-session': 'GNOME',
'mate-session': 'MATE',
'ksmserver': 'KDE',
'xfce4-session': 'Xfce',
'lxsession': 'LXDE'
}

This command:

processes = str(subprocess.check_output(('ps', '-u', getuser(), '-o', 'comm',
'--no-headers')), encoding='utf8').rstrip('\n').split('\n')

evaluates to true for "gnome-session":

$ps -u {user} -o comm | grep gnome-session
gnome-session

What it should do is search for something with "unity" in it ...

$ps -u {user} -o comm | grep unity
unity-settings-
unity-panel-ser
unity-fallback-
unity-scope-hom
unity-scope-loa
unity-files-dae
unity-music-dae

Possible fix to the script on your machine:

deDict = {
'cinnamon-sessio': 'Cinnamon',
'gnome-session': 'GNOME',
'mate-session': 'MATE',
'ksmserver': 'KDE',
'xfce4-session': 'Xfce',
'lxsession': 'LXDE',
'unity-settings-': 'UNITY'
}

Oh and it should be reported here.


sudo apt-get --purge remove nginx

If that says that it not installed, try

 ps -ef |grep www-data

And see if you see any of the workers present. If so, you could try to stop

 sudo service nginx stop

If I had to guess, when you uninstalled the service didn't shut down the way it should have.

You may need to install again

 sudo apt-get install nginx

Then stop it
     sudo service nginx stop

Then purge it

sudo apt-get --purge remove nginx


My Brother DCP 7065DN Printer is "not available"

You must check the configuration file /etc/printcap:
Open a terminal,Press Ctrl+Alt+T
Run it:
sudo nano /etc/printcap

In the open file for Network Connection, replace :lp line to the following 2 lines
:rm=(ip address of your printer)\
:rp=lp\

Example:
DCP7065DN:\
        :mx=0:\
        :sd=/var/spool/lpd/dcp7065dn:\
        :sh:\
        :rm=192.168.3.3\
        :rp=lp\
        :if=/usr/local/Brother/Printer/dcp7065dn/lpd/filterdcp7065dn:

Ctrl + O, save file. Ctrl + X, close nano.
And Configure your printer on the cups web interface:
Open a web browser and go to http://localhost:631/printers.
Click Modify Printer and set following parameters:
LPD/LPR Host or Printer or AppSocket/HP JetDirect   -(For Device)
lpd://(Your printer's IP address)/binary_p1         -(For Device URI)
Brother   -(For Make/Manufacturer Selection)
Your printer's name  -(For Model/Driver Selection)

Example:

Source


I get the same warning on Ubuntu 16.10 with encrypted LVM. I have not found a solution but, for what it's worth, it appears related to the Debian bug reported on 16 Nov 2016.

My server works fine so I'm hoping it's a minor bug that will be fixed in upcoming Ubuntu releases.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=844487

  Dear Maintainer,

  I am using Debian Scratch with encrypted root partition. The last
  kernel version where it worked was 4.6.0. For kernels 4.7.0 and 4.8.0
  it prints on the boot repeatedly and forever following messages:

  WARNING: Failed to connect to lvmetad. Falling back to device
  scanning.   Volume group "martin-vg" not found   Cannot process volume
  group martin-vg

  In 4.6.0 these messages are shown too, but only twice and then it
  prompts for a password:

  Please unlock disk sda5_crypt:


How can I make my flashdrive persistent?

Persistent live system

UNetbootin has a built in persistence option, it uses a file named casper-rw for persistence. Maximum size of UNetbootin's persistence file is 4GB and is size limited by the FAT32 file system.

Mkusb creates an Ubuntu flash drive that boots using grub2. It uses a FAT32 boot partition, a ISO9660 read only OS partition, an ext casper-rw persistence partition, (not limited to 4GB), and a NTFS partition that can be used by Linux or Windows.

Full installed system

You can alternately do a Full install to USB drive.

It is recommended to first unplug the internal HDD, boot the installer drive, insert the USB target drive and install to it.

"Something else" can be used to add a boot partition, a NTFS partition for Windows, a "/home" partition and swap.


How to get mp3 decoding to work with gstreamer 0.10 on ubuntu 16.04?

First I tried to port the application to gstreamer1.0, but that is IMPOSSIBLE...

In the end I got my music working again with the following:

wget http://archive.ubuntu.com/ubuntu/pool/universe/g/gst-plugins-ugly0.10/gst-plugins-ugly0.10_0.10.19-2ubuntu5.dsc
http://archive.ubuntu.com/ubuntu/pool/universe/g/gst-plugins-ugly0.10/gst-plugins-ugly0.10_0.10.19-2ubuntu5.debian.tar.gz
http://archive.ubuntu.com/ubuntu/pool/universe/g/gst-plugins-ugly0.10/gst-plugins-ugly0.10_0.10.19.orig.tar.bz2
sudo apt-get install build-essential fakeroot devscripts debhelper docbook-to-man
sudo apt-get build-dep gst-plugins-ugly1.0
dpkg-source -x gst-plugins-ugly0.10_0.10.19-2ubuntu5.dsc
cd gst-plugins-ugly0.10-0.10.19
vi debian/rules

comment out:

#ifeq (,$(findstring $(DEB_HOST_ARCH),m68k arm))
#DEB_CONFIGURE_EXTRA_FLAGS += --enable-gtk-doc
#endif

because making the docs didn't work.

vi debian/control

Remove the whole gstreamer0.10-plugins-ugly-doc Package: .. Description, otherwise if now fails to create the .deb.

DEB_HOST_MULTIARCH="$(dpkg-architecture -qDEB_HOST_MULTIARCH)" debian/rules -j 8 build-arch
fakeroot debian/rules binary
sudo dpkg -i ../gstreamer0.10-plugins-ugly_0.10.19-2ubuntu5_amd64.deb

Enjoy


Those are formatting (or 'non-printing') characters.

To disable them, go to the View menu, and disable (uncheck) the "Nonprinting characters" option.


battery show percentage (and time if possible)

Right Click...

This is Ubuntu 13.10, with unity 7.1.2, with unity-tweak-tool installed.


As I found out: In Ubuntu systems running MySQL 5.7 (and later versions), the root MySQL user is set to authenticate using the auth_socket plugin by default rather than with a password. This allows for some greater security and usability in many cases, but it can also complicate things when you need to allow an external program — like phpMyAdmin — to access the user.
https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-on-ubuntu-20-04


Which Lubuntu Next LXQt distro is the current one?

You can see from the MD5SUMS that they're in fact the same. Both http://cdimage.ubuntu.com/lubuntu-next/releases/17.10/alpha-2/MD5SUMS and http://cdimage.ubuntu.com/lubuntu-next/releases/artful/alpha-2/MD5SUMS contain:

76f9cebe11b205e865a5f3c838d570b7 *artful-desktop-amd64.iso
0e06c43341501bad8b5f0d73a8ec3524 *artful-desktop-i386.iso

The same goes for the beta-1 MD5SUMS (with different values, of course).

It's convenient to be able to refer to a release by both version and codename. I don't know about LXQT, but the ISO manifest lists the following lxqt packages:

liblxqt-globalkeys-ui0:amd64    0.11.1-2
liblxqt-globalkeys0:amd64   0.11.1-2
liblxqt0:amd64  0.11.1-2
lxqt-about  0.11.1-2
lxqt-admin  0.11.1-2
lxqt-common 0.11.2-2
lxqt-config 0.11.1-4
lxqt-globalkeys 0.11.1-2
lxqt-notificationd  0.11.1-2
lxqt-openssh-askpass    0.11.1-2
lxqt-panel  0.11.1-3
lxqt-policykit  0.11.1-2
lxqt-powermanagement    0.11.1-2
lxqt-qtplugin:amd64 0.11.1-2build1
lxqt-runner 0.11.1-2
lxqt-session    0.11.1-6
lxqt-sudo   0.11.1-2

Make of that what you will.


How can I install a specific version of gcc on ubuntu 18.04

Tested and confirmed using 18.04 on a box using an Intel core i5.

[As a guest, I don't have points enough to make active the 15 links that may be helpful.  The first several of them are, therefore, "broken" by design.]

This tells the tale.  To jump to the "bottom line," look for "Here's the Script."

The history of the venture

You've likely seen these,

https: // askubuntu.com/questions/214746/how-to-run-apt-get-install-to-install-all-dependencies

https: // askubuntu.com/questions/140246/how-do-i-resolve-unmet-dependencies-after-adding-a-ppa

Since you want to keep both versions, those approaches don't really apply.  There are additional questions / answers that address forced installation of dependencies, but, again, that'll leave you with "one version" instead of more than one.

It's likely that the dependency issue you have experienced follows from the installation presumption of upgrade ("replacement") rather than parallel or independence ("supplementation").

Installing multiple versions techniques exist, but there may be an issue distinguishing 7.3 from 7.5

If it were possible to "comment," one question would be this:

Have you also tried uninstalling the existing version and reinstalling with the multiple version technique?  E.g., https: // askubuntu.com/questions/923337/installing-an-older-gcc-version3-4-3-on-ubuntu-14-04-currently-4-8-installed (where the package is, packages are, identified with some specificity).  See also, e.g., https: // linuxize.com/post/how-to-install-gcc-compiler-on-ubuntu-18-04/ .

However, one would need to distinguish between 7.3 and 7.5, which is different from distinguishing 7 from 8 from 9, as used on that example.

To try that technique, one would likely need to remove 7.5 so as then to install it in an "alternative" context.

Removal takes us down at least one of the following two paths. (Hint: this led to a brick wall, and maybe that's Ok.)

First, there's just basic, wholesale removal.

https: // www.youtube.com/watch?v=HKtjX_FBAnI (heavy non-English accent -- listen with focus, and it's fine)

It's about 5:07 into the 5:38 video that he gets to the "one liner" about uninstalling.  He uses purge, and there's some more information on that process on various web pages, including here:

https: // vitux.com/how-to-uninstall-programs-from-your-ubuntu-system/

Since there's no use of, thus no "invested" set up for, 7.5, here, i.e., no love loss, it became a topic of experimentation and testing.

Via dpkg --list | more ,

determined that likely packages to remove were/are these:

- g++-7                  7.5.0-3ubuntu1~18.04
- gcc-7                  7.5.0-3ubuntu1~18.04
- gcc-7-base:amd64       7.5.0-3ubuntu1~18.04

But which?

Then doing

sudo apt search gcc-7 | more

got to

gcc-7 (7.5.0-3ubuntu1~18.04 amd64).

Thus,

sudo apt-get remove "gcc-7"

But, before doing anything like pressing "y," notice what all is included in this removal: build-essential, gcc, and g++.  Didn't want to remove them.

Thus, secondly, that brings up the question of whether there is such thing as a partial removal.  (Hint: there is, but it's probably not a good idea.)

https: // askubuntu.com/questions/17745/how-to-remove-a-deb-without-removing-its-dependencies

So,

(after sudo apt-get install aptitude) (it's Ok and even a good idea to get this functionality, but keep reading; this path led to a brick wall)

sudo aptitude unmarkauto build-essential gcc g++  [which didn't really change anything]

Then

sudo aptitude purge gcc-7

This gets us to the "options" list, and there were 6 options for this system.

One at a time, selected 3 (remove 7.5) (then selected/typed "a 3" (without the quotes, of course)), 5 (keep build-essential) (then a 5), and 6 (keep gcc) (then a 6) , then Y, to remove 7.5 and keep build-essential and gcc (for the earlier version just recently re-installed).

And, the system's follow-up was to this effect: "The system is now going to remove them all, anyway, no matter what," which is likely how the system protects the user from "rpm hell," i.e., goes to a long extent to prevent just this very sort of thing, namely partial removal.

Since the option there was to remove everything, I stopped.  Just got finished, after about 5-6 hours, installing the prior version that I needed and don't want to go through that, again.  (That's a foreshadowing of how that prior version now exists and is installed so as even to be subject to this dilemma.)

That's just to say that if there's nothing else there in the way of dependencies that you want to keep, then this is an alternative to the out-and-out "remove" process, either of which of these puts us right back into the same position of removing everything.

That's also to say that I haven't gone back to revisit this to include running sudo ldconfig after adjusting those packages via unmarkauto and trying that partial removal mechanism.  It's sufficient to be aware of "rpm hell" and not rush into it.

That wholesale removal would be followed, then, by a dual or multiple version install technique, for which there are at least the discussions already mentioned, as just examples of the existence of such option. Again, since gcc-7 presently now refers to 7.5, it may be possible, with enough specificity in package identification, to accomplish a dual install of 7.3 and 7.5.  Haven't tried anything like that, yet.  Someone who has will be in a position to make comment on that whole angle of things.  Maybe there truly is a simpler process.

Intro to the shell script

With all that in mind, here's the tested (with 7.4, keeping 7.5 as the "officially installed" version) and confirmed approach to install a prior version while keeping the systemically installed 7.5. It's "the hard way." Since the question has to do with "how to" accomplish such a parallel install, the answer is, "This is a way to accomplish the objective".  That begs the very pregnant question, of course, which is whether what one produces by this process provides a working toolchain once it's all accomplished.  That's something you'll need to confirm, of course, once you get there.  That part involves at least being sure that your IDE (or whatever approach used for compiling, assembling, linking) points to the "right" set of tools and include libraries.  So, as far as "how to," this is "the hard way" to produce a complete and independent installation of a prior version of the toolchain.  Finalizing this may involve setting ln -s links or simply adding alternative paths in an IDE to tell the IDE where to look for the toolchain.

This time around, the installation location was ~/opt , i.e., /home/<username>/opt .  That's the setting in the script, and I left that one "as is".  It's possible, once you try this out and find it produces what you need, to change the script setting for $HOME with something like /opt (and reinstall).  Another location for self-generated code is /user/local.  (You likely already have these "good practice" concepts in mind.)  Personally, once this shakes out and proves itself, /opt is likely the "final destination" for the toolchains built from scratch.  For now, it happens that this particular drive is partitioned with a huge, ginormous (that might not be a word, but it's used, here, just the same) "home" space, and for this very type of situation: space to experiment that isn't directly "in the system file area".

In this context, then, one possible way to "read the silence" in the early stages after your posting of your question is that the answer you need isn't something as simple as what may already exist.  If that's a valid "read" of the timing, here, and I'm new enough to the site not to know, yet, either way, then there's that subtle confirmation that the solution you're looking at is basically compiling from scratch, i.e., "the hard way."

Here's the Script

Now, it's not anything like as hard as it used to be.  This is, in part, thanks to Darren Smith. https://medium.com/@darrenjs/building-gcc-from-source-dcc368a3bb70, and, in particular, https://github.com/darrenjs/howto/blob/master/build_scripts/build_gcc_9.sh , which is his install script (designed for 9.1).  He's written a script that works like scripts are supposed to work.  He wrote it looking forward, to 9.1.  With some suitable adjustments, it works for legacy installations just as cleanly. He did good work on this.

[As for addressing the concept of potentially stale/dead links in the future, if you want to include the edits you've made to the script, presuming it works for you as well as it did for me, I'll let you post it. This contribution is already "long."]

Some thoughts going in.

Look through the script.  Make sure you have wget and autogen installed.  For example, after two hours of the process (which might not have been that long had I remembered to uncomment his line 19 so as to try to use multiple cores), it quit on me first time through.  Why?  I didn't have autogen installed.  (This is a recent re-install of 18.04, and there are some things I just didn't have re-installed, again, yet.)  There was some loss of effort there, and instead of "completing" from that juncture, I needed to delete two directories of compiled/assembled results (the script identifies which two when one restarts the script via the same command as originally used; be sure, after copy/paste of the script and adding in the edits below and saving that file (as a .sh shell script file), to sudo chmod +x <shellScriptName.sh> so as to activate it via ./<shellScriptName.sh> ), and had to run that part again, likely costing at least another hour.  Not the end of the world; just frustrating.  So, look through the script and for each command found, e.g., awk, just  to be sure you've got that command / utility already installed.  Should be, but it's Ok to check, anyway. (I used "whereis".)

Another value in looking through the script is to see that there are five pieces involved:

gcc
gmp
mpfr
mpc  , and
isl

See also, e.g., https://stackoverflow.com/questions/9450394/how-to-install-gcc-piece-by-piece-with-gmp-mpfr-mpc-elf-without-shared-libra

Each has a download step, and each has (at least) one source.

Config matters (yes, there are two intended meanings, here)

For 7.3, did some checking and found helpful information on this page:

https://stackoverflow.com/questions/55084198/which-versions-of-gmp-mpc-and-mpfr-were-used-to-compile-gcc

In one of the answers down the page, there's a compiler output line with versions of each of these that are working in conjunction with 7.3.

GNU C11 (Ubuntu 7.3.0-27ubuntu1~18.04) version 7.3.0 (x86_64-linux-gnu)

compiled by GNU C version 7.3.0,
gmp version 6.1.2,
mpfr version 4.0.1,
mpc version 1.1.0,
isl version isl-0.19-GMP

So, some "edits" to the script for 7.3 are these.

line 14  gcc_version=7.3.0
line 19  Uncomment this if you'd like.

More about using multiple cores

(Someone may want/need this.)

Info from: https://baiweiblog.wordpress.com/2017/10/27/how-many-physical-and-logical-cpu-cores-in-your-computer/

Run this command: lscpu

to get the info needed as to what the value could/should be to use with the -j flag.

That command provides, among other items of information, these items in particular:

CPU(s):   < a number, e.g., total >, a figure determined by multiplying these
                                     additional items
Thread(s) per core:     < a number, e.g., t/c >
Core(s) per socket:     < a number, e.g., c/s >
Socket(s):              < a number, e.g., s >

The -j number < e.g., total > = < t/c > * < c/s > * < s > = CPU(s)

At the identified site, CPU(s) = 32 = < t/c = 2 > * < c/s = 8 > * < s = 2 >

On the box here, CPS(s) = 4 = < t/c of 2 > * < c/s of 2 > * < s of 1 > .
  Thus, on this particular machine, j probably shouldn't be larger than 4.
  That said, some suggest overloading j to make sure it's at its peak. That's
  something left to each developer to determine.

line 22
If there's a question, just check the gcc line in any -verbose compile listing you may have to confirm the processor (architecture) for your machine.

Running gcc -v is another way to try to get the architecture.

Running uname -m may be a little better.  On this box, uname -m came back with "x86[underscore]64". Better syntax, of course, for the -march= option is x86[hyphen]64.

line 25
Long story short about "unknown", it's Ok to leave that as is.
line 33  install_dir
As mentioned, I left this one as $HOME, i.e., ~/.  If there's a change, /opt is a good choice, or /usr/local.  If you already know either of those is preferred, great.  I'm trying this out to shake out any "uniqueness" issues before committing this to a formal $PATH element.
line 34  build_dir
This is set to build in the tmp directory in "system file" area.  That worked just fine.
line 35  source_dir
Left this one as is.
line 36  tarfile_dir
Left this one as is.
line 40  packageversion
Left this one as is.
line 50  gmp_version
Given the compiler info associated with 7.3 mentioned above, left this one as is.
line 54  mpfr_version
Given the compiler info above, changing this to 4.0.1 appears to be Ok.
line 57  mpc_version
Given the compiler info above, changing this to 1.1.0 appears to be Ok.
line 60  isl_version
Given the compiler info above, changing this to 0.19 appears to be Ok.

lines 153, 154, 155 -- the Download source code banner

This is where it'll be good to confirm the URLs.

[you'll need `wget` -- install it if necessary]

line 170  gmp source page
fine as is
line 171  mpfr source page
The page used by the script also has the 4.0.1 version, so it's fine as is.
line 172  mpc source page
That's an http: site; thus, direct access produces an access error. I left it "as is" and there was no issue.  An alternative site is this:  https://ftp.gnu.org/gnu/mpc/ .
line 173  isl source page
The given infrastructure page has 0.18, but not 0.19.  I changed this one to this site:  http://isl.gforge.inria.fr/  (there was a momentary, flash-length only, pause while the connection was made to this overseas site; connection was just fine)
line 174  gcc source page
Change this to this site:  https://ftp.gnu.org/gnu/gcc/gcc-7.3.0/
lines 224, 225
left as is
line 291
There's enough going on that it made sense to uncomment this line to get these checks along the way.

autogen kicks in here "at the end" to produce the documentation.

Without setting -j, and taking advantage of access to a nominal 25 down / 6 up internet connection, this process took a couple of hours.

Confirmation of installation

I set up 7.4, and it's now in the ~/opt directory.  Reinstalling it to /opt (root/opt) may happen once confidence is higher that this is what I need.

That said, this is a "how to" to get 7.3 installed along with the system's "encouragement" to use 7.5.

Summary.

The shell script works to install a parallel version of the toolchain.  Just be sure to have the info it needs put into the right places and to have already installed the utilities (functions, command line commands) used by it.  "As is," it'll install into ~/opt.  This can take "a while." Here, it was a couple of hours.


How to integrate Kdenlive into the Ubuntu Desktop design?

Kdenlive (like all KDE apps) is built on Qt.

Global menu

Installing the appmenu-qt and appmenu-qt5 packages should fix it.

Theme

Qt 4 offered a configuration tool (Ubuntu package: qt4-qtconfig) but the Qt developers removed it for Qt 5.

In addition, Qt 4 seemed to accurately detect what desktop environment it was on and pick style accordingly, but Qt 5 seems not to do it. This is, apparently fixed in Qt 5.5.1. In fact, Qt 5 apps correctly set style to GTK+ on 16.04 Xfce (Qt 5.5.1, no Qt5Ct).

Instead, you will have to use a third-party configuration tool, Qt5Ct.

You would have had to build Qt5Ct from source, but the WebUpd8 PPA packaged it.

sudo add-apt-repository -y ppa:nilarimogard/webupd8
sudo apt update
sudo apt install qt5ct

As in the picture,

Set the Style to GTK+.
In the Icon Theme tab, select the icon theme you use.
Set the font (in the Fonts tab). Ubuntu Unity defaults are General: Ubuntu and Fixed width: Ubuntu Mono

Edit ~/.profile and add

export QT_QPA_PLATFORMTHEME="qt5ct"

To tell Qt apps to use Qt5Ct's configuration.

If that doesn't work, add

QT_QPA_PLATFORMTHEME="qt5ct"

to the /etc/environment file.

Install the kde-runtime and libqt5libqgtk2 packages.

Logout and login again. Kdenlive should be integrated into Unity.


Is there a lightweight photo viewer made with Qt?

qview is very minimalistic, and it also has basic editing capabilities.

.deb packages are available at its downloads page.


Having trouble installing guest additions for a Xubuntu 13.10 guest OS in Virtualbox 4.2.10

I've been running the same problem on Debian Wheezy host, running VirtualBox 4.1.8 (with Kubuntu 13.10 as guest).

After some diggings, it seems that installing guest additions on recent 13.10 derived Linux distributions (such as yours : Xubuntu 13.10) requires at least version 4.3 of VirtualBox run on the host.

To update your VirtualBox version up to 4.3:

Add the official repository to your /etc/apt/sources.list file:

deb http://download.virtualbox.org/virtualbox/debian raring contrib

Add the official Oracle repository key and update your repositories list:

wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
sudo apt-get update

Select any running virtualbox daemons' id:

ps -aux | grep virtualbox

and kill them.

Install the new version of VirtualBox (it will automatically remove the previous version)

sudo apt-get install virtualbox-4.3

Launch your guest from the VirtualBox interface and install the Guest Additions from the 4.3 .iso on your Linux 13.10 guest, the same way as you did (sudo ./VBoxLinuxAdditions.run). The kernel module will find the appropriate linux header for compilation.

Hope this helps.

For information, here's the generic linux distribution installation tutorial for VirtualBox


First of all: These two messages are about the fact that you are not superuser or root when executing commands which require administrative privileges.

All you need is to first switch user to the root.
Enter this in your Terminal:

sudo su

Then enter your root password and then you logged in as root.

After that run the command you want

Second: If your broken files are not personal and related to Ubuntu you can run this command as root for fixing with packet manager:

sudo apt-get update --fix-missing

Note: If you are new to linux do not stay logged in with root. It can cause problems if you make a mistake!


Failed to build byobu from source (no root permissions)

Byobu can be build and installed without any root privileges. It does not need binary or artifact installation outside the --prefix= directory.
Following the steps you described, there is something wrong with the $HOME variable. After extracting and configuring Byobo:
$ tar xf byobu_5.17.orig.tar.gz && cd byobu-5.17 && ./configure --prefix="$HOME/byobu"
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes

...

config.status: creating usr/share/man/man1/Makefile
config.status: creating usr/bin/Makefile

The config.log should contain the prefix:
$ grep ^prefix config.log
prefix='/home/chy/byobu'

I presume, in your case it looks more like this:
$ grep ^prefix config.log
prefix='/usr'

With that --prefix I am able to reproduce your error:
$ make install
Making install in etc/byobu
make[1]: Entering directory '/home/chy/byobu-5.17/etc/byobu'
make[2]: Entering directory '/home/chy/byobu-5.17/etc/byobu'
make[2]: Nothing to be done for 'install-exec-am'.
test -z "/usr/etc/byobu/" || /bin/mkdir -p "/usr/etc/byobu/"
/bin/mkdir: cannot create directory '/usr/etc': Permission denied
Makefile:185: recipe for target 'install-etcDATA' failed
make[2]: *** [install-etcDATA] Error 1
make[2]: Leaving directory '/home/chy/byobu-5.17/etc/byobu'
Makefile:252: recipe for target 'install-am' failed
make[1]: *** [install-am] Error 2
make[1]: Leaving directory '/home/chy/byobu-5.17/etc/byobu'
Makefile:238: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1

Reset the source directory and restart the configuration and use an absolute path for the prefix:
$ cd byobu-5.17/
$ make distclean
$ ./configure --prefix=/home/chy/byobu
$ make && make install
$ export PATH=$PATH:/home/chy/byobu/bin

$ byobu

Byobu will however only work, if the tmux packet is installed.


how to install touchegg on ubuntu 14.10?

Open terminal and run the following commands (Ctrl+Alt+T):

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install touchegg

Note: use upgrade command since you have many not upgraded files.After upgrade command still you have not upgraded files,use this command,

sudo apt-get dist-upgrade

You can also install from Software Centre:


"After I finished the install, it would only boot to windows 10" - this is possibly because you didn't change your BIOS to boot from Ubuntu first.  You need to choose your Ubuntu partition as first priority in your motherboard BIOS so you can get to the GRUB bootloader so you can choose the OS.
Since you've just wiped Windows, you may as well format the whole disk so you can start from scratch.  That will make the installation a lot easier. Here's the path I recommend:

First, prepare bootable installation media for both Windows 10 and Ubuntu.

Then boot from your Ubuntu installation media.  Use the "Try Ubuntu" option, then open the "Disks" application.

In "Disks", select your hard drive and choose "Format...".  Select GPT as the partition scheme.

Create two new "placeholder" partitions on that disk.  The first partition should be the size you want for Windows.  The second partition for Ubuntu should take up the remaining space.  The file system does not matter because we are doing this to reserve space and you will end up deleting these.

You can already go ahead and delete the first partition you just created.  At this point you should have un-partitioned free space at the beginning of your drive, and a placeholder partition where Ubuntu will ultimately be installed.

Install Windows 10 first.  Reboot the computer with your Windows 10 installation media (UEFI mode) and select the unpartitioned free space as the destination for Windows 10.  The Windows installer will create additional partitions, but it should not affect the "placeholder" partition.

Now that Windows 10 is installed, boot again with the Ubuntu installation media (UEFI mode).  "Try Ubuntu" again and open "Disks" again.

Delete the Ubuntu "placeholder" partition.

Now you can "Install Ubuntu" from the desktop, or you can also reboot the installation media and choose "Install Ubuntu" instead of "Try Ubuntu".

If you did everything correctly, the Ubuntu installer will give you an option "Install Ubuntu alongside Windows".  Choose this option and complete the installation.

After Ubuntu is installed, make sure that your BIOS boot priority is set to boot from the partition where you just installed Ubuntu. GRUB will show up on boot and you can select your OS on boot.


vsftpd used for FTP but not user for SFTP

ok, vsftpd not provide sftp access, so I just block using SFTP on my server with commenting line in /etc/ssh/sshd_config

#Subsystem sftp /usr/lib/openssh/sftp-server

as result I can use FTP over TLS with vsftpd (chroot)


The uplaoded image is now gone, so can't verify, but it sounds exactly like the problem I have with radeon proprietary driver (fglrx). Are you by any chance using that? A work-around is to switch to another workspace and back. The free driver (xserver-xorg-video-radeon) does not exhibit this problem at all for me, but it lacks some functionality.


I highly recommend using http://banshee.fm/ It has ipod/iphone support for most Android phones as well and podcast support as well as Amazons MP3 store to buy music from. The only issue is that because it's Apple you will not be able to properly synch your music , If you are using a modern iOS then the iPod uses a proprietary database format that Banshee can't access. They do actually get copied over, it's just that iTunes won't see them. Your really only option is duel booting into windows or mac.


Are configurations still needed for SSD drives in 12.04+

I'm using a SSD drive for half an year now (OCZ Vertex II) and didn't configurated it in any way. It runs just like a charm. I was interested in this topic too and so i did a research back then. The conclusion was:

What ever you do to speed up your SSD, you can't make it noticeable faster.
All these warnings on bad settings wearing out you SSD are negligible on newer SSD's and Operating Systems. More on SSD myths (especially on their endurance) here.

So, if you still have the feeling like somethings wrong with you SSD, use palimpsest disk utiliy. It can check your Harddrive for errors and measures it's speed.


Error fixing grub after resizing partition (grub-install: error: cannot find EFI directory)

Your issue is that the EFI partition was converted from FAT to NTFS.

The possibilities are (in increasing order of complexity)

Restore your last full System Backup
Reinstall from scratch and restore your data backup
Boot an Ubuntu Live USB and:

Mount nvme0n1p1
copy all files off it in a secure location (hell: copy them twice!)
delete nvme0n1p1 using gparted
recreate it with the same size in FAT16 or FAT32 format (gparted again)
give it boot and esp flags. (gparted)
copy all files back from the secure location
reboot


How to play media files with Ubuntu when booted from an USB pen drive?

You have to install the necessary media plugins.

You need an internet connection to achieve this.

To install the media plugins open a terminal and execute these commands :

sudo apt-get update
sudo apt-get install gstreamer1.0-libav gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly

Now you should be able to open and play most of the common media files.

In case you run into problems - make sure that all repositories are enabled :

sudo add-apt-repository main
sudo add-apt-repository universe
sudo add-apt-repository multiverse
sudo add-apt-repository restricted

Note :

These operations have to be performed every time after you booted again  from the USB drive when you did not create the Ubuntu installation media with a persistent storage functionality.


Cannot get the partition table on 2 USB sticks cleared after using DD

Please check with md5sum in linux or Md5summer in Windows, that the iso files was downloaded correctly.

help.ubuntu.com/community/UbuntuHashes
If the md5sum is bad, download again. The torrent method is more likely to succeed than a regular download.
If the md5sum is good, use the dd method again, or do it safer with mkusb, and edit your question to post the output of the dd command line or mkusb,
After that, run

sudo lsblk -f

If it looks good, but fails anyway, please reboot. If it still fails, please try to wipe the drive (overwrite with zeros). You can do it from mkusb's wipe menu.
Reboot. There should be no partition table. If there are still some partitions and file systems, I think the drive is failing, 'grid-locked'.

See also this link (about an SD card, but it is the same kind of memory inside.)

Unable to format SD card


Where can i find the files of exe installation?

There is a hidden directory ".wine" in your home directory.
So do
cd ~/.wine/

and in there is a Windows oriented directory structure.
Of if you want to do this from the file explorer: go to your home dir and do CONTROL H and it will show hidden files then navigate into the .wine directory.
Mind that you should be using the internal browser inside wine if you want to do anything with the EXE. Altering it from Ubuntu can/will corrupt the file.


I was using the tool wrong. The correct way to do it was pactl set-card-profile 0 output:hdmi-audio. You can get a list of avilable profile names by running pacmd list-cards.


No, you cannot simply 'add' insults to a directory and expect them to work.  The only way to add new insults is to recompile sudo so that it includes those insults at compile time.

The link from your question (Where are sudo's insults stored?) explains what those files are:

  The file insults.h contains compiler instructions on which of the above insults to include in the compiled kernel. Indeed, you could create your own insults file, add the name to insults.h and recompile...

But you WILL need to add insults and then recompile to include them.  Doing this, however, will mean you have to recompile sudo if there's security updates, etc. and it's likely this can cause security issues down the road if you don't recompile with security patches included.


There was a vulnerability found in ntp recently as described here, the release number doesn't correspond directly to an Ubuntu ntp package using the same release number, as I found out when I asked this question.

The official Ubuntu security notice that mentions this is here

Something that I noticed is that the guide you've linked to doesn't mention disabling ntpdate, when you run ntp as a daemon (ntpd). Apparently they don't play nicely together

So the short answer is, yes, so long as you keep your ntp package up to date.


Brother scanner not working in Ubuntu 16.04 though driver installed

I was facing the same issue with my MFC-7840W, but I finally was successful.

Here are my notes:

Install brscan3, or another variant of brscan according to your model:

sudo dpkg -i brscan3-0.2.11-5.amd64.deb

Install brscan-skey

sudo dpkg -i brscan-skey-0.2.4-1.amd64.deb

Run brscan-skey

$ brscan-skey
$ brscan-skey -l
MFC-7840W         : brother3:net1;dev0  : 192.168.1.10         Active

Set up scanner

sudo brsaneconfig3 -a name=MFC-7840W model=MFC-7840W ip=192.168.1.10

Confirm it worked, look for this output:

$ brsaneconfig3 -q
Devices on network
  0 MFC-7840W           "MFC-7840W"         I:192.168.1.10

Make missing symbolic links if necessary

sudo mkdir /usr/lib/sane
sudo ln -s /usr/lib64/sane/libsane-brother3.so /usr/lib/sane/libsane-brother3.so
sudo ln -s /usr/lib64/sane/libsane-brother3.so.1 /usr/lib/sane/libsane-brother3.so.1
sudo ln -s /usr/lib64/sane/libsane-brother3.so.1.0.7 /usr/lib/sane/libsane-brother3.so.1.0.7
sudo ln -s /usr/lib64/libbrscandec3.so /usr/lib/libbrscandec3.so
sudo ln -s /usr/lib64/libbrscandec3.so.1 /usr/lib/libbrscandec3.so.1
sudo ln -s /usr/lib64/libbrscandec3.so.1.0.0 /usr/lib/libbrscandec3.so.1.0.0

Confirm scanimage -L works

$ scanimage -L
device `brother3:net1;dev0' is a Brother MFC-7840W MFC-7840W

Install gscan2pdf
Use gscan2pdf to test scanner


First, You have to follow this question and install your needed version of PHP that supports GD version 2.1.0

then you can install your needed GD version accordingly

 sudo apt-get install php5-gd

NOTE: php5.4 isn't compatible with GD>=2.1.0

I got this from this question although it seems he has installed both GDs in the same machine

libgd2-xpm
2.0.36~rc1~dfsg-6ubuntu2                GD Graphics Library version 2 ii  libgd2-xpm:i386
2.0.36~rc1~dfsg-6ubuntu2                GD Graphics Library version 2 ii  libgd3
2.1.0-2~precise+1    GD Graphics Library       php5-gd
5.4.17-4+debphp.org~precise+1           GD module for php5


I can't boot up Windows 7 and WINDOWS drive partition doesn't show up

Where it says "Assessment: SELF-TEST FAILED", this is a good indication that your hard drive is failing S.M.A.R.T. tests which generally means that the drive itself will not last long and parts may already be unreadable.
Windows 7 would have been installed to an NTFS partition.  Ubuntu can read and write to valid NTFS partitions without need for any additional software.  If you had a valid mountable NTFS partition at this location, it would be listed as NTFS and it would be mountable.
However, what I see is that you have "Free Space".
"Free Space" existing where there should be a partition is not a common symptom of drive failure.  "Free Space" means there is no partition at this location.  It's likely that you mistakenly deleted this partition somehow.  So this could be a separate issue from the pending hard drive failures.
Right now, since you are getting the drive failure flags, and you have suggested that you have important data on the drive but have failed to keep appropriate backups, my suggestion is that you stop using the disk immediately and take it to a professional data recovery technician
At the very least you might be able to image (copy) the disk to another disk in case this one fails.
You do have a few limited options to try to find lost data on your own, but you risk further damage to your drive if you're not careful, and the failure of S.M.A.R.T tests adds in an additional unknown factor of continued drive failures.
I will say that trying to recover files after the file system or partition has been deleted is usually not successful.
Here is some further reading if you want to go down the path of trying to recover data from a deleted partition or broken file system:
Unable to mount NTFS external hard drive
Fix corrupt NTFS partition without Windows
And in the future:  Back up.  Back up. Back up.  Hard drives are considered "consumable".  They do not last forever and most hard drives have an advertised lifespan of 3-5 years, even though they often last for longer.


Old bug from 2008 where someone got the PID created after another restart or stop+start: http://bugs.mysql.com/bug.php?id=41067
Normally I see an error when that file is not there ...
But a possible solution (1st shutdown mysql)...

cd /var/run/mysqld/
sudo touch mysqld.pid
sudo chown mysql:mysql mysqld.pid

Unless you want actually have it created by the deamon (but I would consider it a bug).


How to disable automatic brightness adjustment in Ubuntu 14.04?

According to https://ubuntuforums.org/showthread.php?t=2021064 :

Click on system settings,
Click on 'brightness and lock' in the menu,
Uncheck the option ' dim screen to save power'.

If that doesn't work:

Open up your terminal and run:

sudo nano /etc/modprobe.d/blacklist

Then at the very end of the file add:

blacklist video


How can I run Ubuntu installer from a USB ? I am not able to run this normally. My system runs in this strange mode (screenshot)

I just did this...
After you put the USB stick containing the ISO file in, boot your system and get into the BIOS. When you look at your boot options, you should see the USB stick (mine showed Kingston Traveler). Make this the number one boot option, save the settings under Exit tab and reboot.
It should read the ISO file on the stick and boot from there.

-mot


Gzip compressed each files with .gz Extension how to revert back

You can uncompress all files by using

gzip -rd /project1. gz /project1

It's the same command you used for compression but with a added d option fpr decompression.


Unable to execute binary file. Exec format error

No. Not natively. You could try using qemu user mode emulation, and binfmt_misc to make it the interpreter for x86_64 ELF binaries.


How do I change the wallpaper in GNOME 3 via a script?

Gnome3 uses dconf instead of gconf to background and wallpaper issues. The tool to modify dconf is gsettings and it can be done by the following way:

gsettings set org.gnome.desktop.background picture-uri "file:///home/user/background.jpg"


I accidentally deleted the contents of .gnome2 folder in ubuntu 12.04, can I recover?

You can log in as another user (or the Guest Session) and copy the .gnome2 folder into your actual Home Folder (located at /Home/Your_User), although, many program settings or configurations will be reseted until you change them again.

Good Luck!


How to find the boot option to select OS?

If you installed in using wubi, you should get a menu (f8 if it dosen't pop up), if you did a dual boot install, hold she shift key right after turning it on.


Ubuntu 18.04 LTS Dual Monitor Unknown Display

Before buying on Amazon I check the user reviews. The dvi splitter in question only gets 2.6 stars out of 5. In particular this question was asked:

Will this product work with 720p, 1080i, or 1080p signals?

And the responses (from your point of view) are not good:


Bash does have that feature too, but it's not enabled by default. You can bind it to cursor up/down by sticking this into ~/.inputrc:

"\e[A": history-search-backward
"\e[B": history-search-forward

I prefer to bind it to Ctrl+up/down instead:

"\e[1;5A": history-search-backward
"\e[1;5B": history-search-forward

edit: To preserve ctrl+left and ctrl+right for moving back and forward in whole words, also include these lines in ~/.inputrc file:

# mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving
"\e[1;5C": forward-word
"\e[1;5D": backward-word
"\e[5C": forward-word
"\e[5D": backward-word
"\e\e[C": forward-word
"\e\e[D": backward-word


Way to make Shotwell use ffmpegthumbnailer instead of Totem for thumbnails?

Shotwell 0.9.x uses Totem for video thumbnailing, but that was dropped as of Shotwell 0.10 in favor of shotwell-video-thumbnailer.  Chances are, upgrading to a more recent version will solve your problem.

As for ffmpegthumbnailer, you'd have to edit the Shotwell code to add support for it.  The place to look would be in VideoSupport.vala in the thumbnailer() method.  That said, duplicate detection relies on video thumbnails -- something to keep in mind if you have an existing Shotwell database.


Why doesn't Ctrl-C kill the Terminal itself?

Ctrl+C is the interrupt signal. When you type this in a terminal, bash sends SIGINT to the job in the foreground. If there is no job (which is the case when you've just opened a terminal), nothing happens. The terminal emulator program is not a job running in the shell, so, it doesn't get the signal and doesn't close.

If you want to close the terminal with a control key, use Ctrl+D (EOF) which causes bash to exit (and closes the terminal too).

See also: Bash Beginner's Guide on signals and in more depth How signal handling works
note: this answer has been edited since comments were posted


I haven't use this tool. But I think this suites your requirement.
http://sourceforge.net/projects/webdav-sync/


Auto indent and pretty code by notepadqq

Notepadqq doesn't have a auto-formatting code feature like the one in Notepad++. I recommend using SublimeText instead as an alternative. You can download it from their website https://www.sublimetext.com/3

There are plugins for autoformatting. One such plugin is SublimeAStyleFormatter. Install the plugin (Here is a guide how to do that). Once installed, you can autoformat C/C++ code by pressing Ctrl+K, Ctrl,F key combo.


No tilde and no caret on german keyboard

This is the default German keyboard layout: the keys/key combinations you mention are set as "dead keys" ("Akzenttasten"), so you need to enter a space after them to have them displayed (which would also enable you to easily enter e.g. â or ẽ if you enter the character you want to "decorate" instead of space).

If you don't want those keys to be "dead", you need to select a keyboard layout with no (or fewer) dead keys as follows:

Open the control center ("Systemeinstellungen")
Choose keyboard settings ("Tastaturbelegung") (in the first row)
Switch to the layouts ("Belegungen") tab
Click on the little plus sign in the lower left to add a new layout. You might want to select "Deutsch (ohne Akzenttasten)" or something like "Deutsch (nur Grave-(`) und Acute-(')-Akzentzeichen)". Once you've decided for a layout, click on "Add" ("Hinzufügen").
Move that layout to the top of the list using the button with the up arrow (^).

As soon as you have installed more than one keyboard layout, a little keyboard icon will appear in the indicator area which will allow you to switch keyboard layouts quickly. If you're happy with only one layout and want to get rid of it, use the keyboard settings control panel just remove all the other layouts except for the one you want to keep.


I found that you can fix this glitch by simply un-plugging your mouse for 10 seconds, then plugging it back in.

After you do that, it scrolls normally.


Looks like here is a patch . You may try applying it or wait until it is included into the mainline Kernel.


You need to use dconf-editor instead gconf-editor.

The settings for vino are there in org -> gnome-> desktop -> remote-access.


Ubuntu 16.04 LTS wifi not connecting when I am a few distance away from modem

This is most likely due to interference in the signal.  Try reconfiguring your modem to use a different wifi channel (ideally, check for available channels or scan for what channels other networks in your location are using -- and avoid them).


How can I launch Disk Utility after installing it?

The command to run gnome-disk-utility is

gnome-disks


Ubuntu 14.04 on Thinkpad T440S keyboard Issue

Sounds like you have the US keyboard enabled, rather than the UK.

Keyboard layouts are managed from within settings.  When you have the dialogue open, click the button at the bottom which says 'Text Entry' and a list of available keyboard layouts appears.  You can add more if you need to or just select the UK option from the list.

You may also have a link in the taskbar, amongst the other icons.  It shows 'En'.  Click on it and it shows a list of installed keyboard layouts, select English (UK) if it appears.  If not then install it as above.


you can mount the  partitions  and get your data simply by typing :

sudo fdisk -l (it will list all the partitions on your hard disk)
sudo mount /dev/sda(disk number) /mnt(where you will find all your data)

you can create different directorys if you have many partitions for
exp:

mkdir ~/sda(partition number)

then you type :

sudo mount /dev/sda(partition number) ~/sda(partition number)


In Ubuntu, you can list the packages available with the command

apt-cache pkgnames

but its output is huge, so pipe it to grep and search for what you want, (and then pipe to sort doesn't hurt either).

apt-cache pkgnames | grep py | sort

From this, looks like you want the python-pygame package, so install it with:

sudo apt-get install python-pygame


Ubuntu 12.10 runs terribly slow on desktop

The cause of your problem is likely due to slow 3D graphics acceleration. Unity 2D has been removed from Ubuntu 12.10 and the default desktop is now Unity 3D.

You have two options:

Try sudo apt-get install llvm-dev for graphics acceleration on Ubuntu 12.10

This package uses the CPU, as opposed to the GPU for 3D graphics rendering, which may speed up your machine if you have a fast / new processor or PC, but may also add yet another bottleneck to your system if your CPU is slower than your graphics card).
If that doesn't speed up your machine, you have two (further) options:

Downgrade to 12.04 and run it in Unity 2D mode.
Install a low-resource desktop environment, for example LXDE (used in Lubuntu) or XFCE (used in Xubuntu). You can also use MATE - a fork of the old GNOME 2.x project

Here's how you can install these desktop environments:

Lubuntu

sudo apt-get update && sudo apt-get install lubuntu-desktop

Xubuntu

sudo apt-get update && sudo apt-get install xubuntu-desktop

Mate

$ sudo -i # or su -
# add-apt-repository "deb http://packages.mate-desktop.org/repo/ubuntu quantal main"
# apt-get update
# apt-get install mate-archive-keyring
# apt-get update
# apt-get install mate-core
# apt-get install mate-desktop-environment


Ubuntu 18.04 Pairing Apple Magic Keyboard 1, says 'paired' but no input from keyboard

I got the same problem in Feb. 2020,  with Ubuntu 18.04 and Apple Magic Bluetooth Wireless Keyboard.
TL;DR: When Apple Magic Keyboard connected, it automatically activates the Num Lock mode. One needs to press / disable the Num Lock key (although there is no such key on the Magic Wireless Keyboard, and that was the trick in my case).
The output of bluetoothctl seemed fine:
Device MY:IP:AD:DR:ES:
    Name: Apple Wireless Keyboard
    Alias: Apple Wireless Keyboard
    Class: 0x00002540
    Icon: input-keyboard
    Paired: yes
    Trusted: yes
    Blocked: no
    Connected: yes
    LegacyPairing: yes
    UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)
    UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
    Modalias: usb:v05ACp0255d0050
    RSSI: -52

I was not able to type on Apple keyboard, but I noticed that when I typed letters I got digits m > 0, j > 1, k -> 2 and so on. This seems that Numlock or numpad was activated when the keyboard was connected.
Indeed, check it with the Settings > Region & Language > Input Sources and press the Keyboard icon ().
I saw that Num Lock was active:

So, I plugged in another keyboard with a Num Lock key, and pressed the Num Lock on that keyboard. Since then, the Apple Magic Keyboard is working normally.
If anybody knows how to generate a Num Lock key event on the system without pressing the key on another keyboard, the script or command would be helpful.


How can I programmatically block user input for a given time?

So you want to treat yourself like a 16-years old boy, don't you? Ok, this should be a good starting point...

#> cat force-screensaver.sh

#!/bin/bash

secondstowait=$1

if [ "x$1" == "x" ] ; then
    echo
    echo "Please insert the number of seconds you want to wait"
    echo
    exit
fi

hourstowait=$(($secondstowait / 3600))
minstowait=$((($secondstowait / 60) - ($hourstowait * 60)))
secstowait=$(($secondstowait - $minstowait * 60 - $hourstowait * 3600))

starth=`date +"%H"`
startm=`date +"%M"`
starts=`date +"%S"`

ends=0
endm=0
endh=0

ends=$(($ends + $starts + $secstowait))
if [ $ends -gt 59 ] ; then
    ends=$(($ends - 60))
    endm=$(($endm + 1))
fi

endm=$(($endm + $startm + $minstowait))
if [ $endm -gt 59 ] ; then
    endm=$(($endm - 60))
    endh=$(($endh + 1))
fi

endh=$(($endh + $starth + $hourstowait))

echo
echo "Will wait for $hourstowait hours, $minstowait minutes and $secstowait seconds"
echo

printf "Starting at %02d:%02d:%02d - stopping at %02d:%02d:%02d\n" "$starth" "$startm" "$starts" "$endh" "$endm" "$ends"

while (true)
do

    currh=`date +"%H"`
    currm=`date +"%M"`
    currs=`date +"%S"`

    #echo "Running..."
    gnome-screensaver-command -a

    #sleep 5

    if [ $currh -ge $endh ] && [ $currm -ge $endm ] && [ $currs -ge $ends ] ; then
        echo
        echo Exiting...
        echo
        gnome-screensaver-command -d
        exit
    fi
done

You can call it passing it the number of seconds you want to torture yourself (e.g. force-screensaver.sh 60 it's the maximum I've been able to stand). Then you just have to bind it to a keyboard shortcut and you're done.

Have a nice pain :P


Problem to acces shared folder in Ubuntu 14.04 from Yosemite

Not sure about the permissions but I have a mac and have had similar problems connecting to a windows share; after research the version of samba used in OSX is old and has some bugs.  I cannot connect to this share by name although I can see it in finder.

If I connect to the share via (Go -> Connect to Server) in the finder menu bar and enter the direct IP address of the other computer (ie smb://192.168.1.101) it will connect fine.

I could never confirm the exact cause (I couldn't play around with the server settings or the share names) but I remember one possible solution was to shorten the path (to get around a bug from old samba code).


Any of the inputs suggested in Lubuntu fixed it, to solve the problem I had to make a new fresh install of Lubuntu 16.04.1

Make a bucakup of your data and save it
Enter a booteable USB stick and install Lubuntu 16.04.1 (how to install from USB stick (from Ubuntu from Windows)
When it ask for choose keyboard Layout, click on detect keyboard layout and enter the key it ask for detect input.


so I technically came here to find an answer but was surprised there is none.
Nevertheless, it did somehow motivate me to look a bit further and I found out byobu gets its prompt from /usr/share/byobu/profiles/bashrc


Why kde keep asking password when i use chrome even if the password is not saved?

Assuming you're using Chromium, Chromium will use the system's password manager instead of its own password manager. Therefore, it will try to open that password manager and read any passwords for websites.


I'm having the same problem. Did you use Googletalk or Skype by coincidence?

I think our problem is similar to this question: Sound card is switching output (headphones/speakers)

We'll have to configure the sound card. A possible solution is posted here: Sound only comes in headphones doesn't come out of the speakers on a HP Pavilion dv6 1280us


The difference will be if you are trying to alter the environment of your current shell (i.e. set a shell or environment variable). For example

$ cat test.sh
myVariable=foo
$ unset myVariable; source test.sh; echo ${myVariable:-null}
foo
$ unset myVariable; bash -s < test.sh; echo ${myVariable:-null}
null

This is what source is for: evaluate a script in the current shell. When you launch a new bash process, it cannot alter the parent process's environment.


It seems like I need to answer my own question.

I found a way to achieve the above setup although it is achieved with 2 DHCP servers workign in a failover / load balancing scenario. It turns out thet the ISC DHCP server have such options startuing with v3 onwards. It achieves what I wanted, although in a slightly different way.

http://www.madboa.com/geek/dhcp-failover/

http://www.ipamworldwide.com/dhcp-failover-a-load-balancing/dhcp-load-balancing.html

Nevertheless, I would still love to hear opinions about my initial solution so any ideas are welcome.

Cheers!


how do I troubleshoot a ssh:// link that won't do anything?

You will need to write a script to handle the ssh://

Put this in ~/bin/firefox-ssh.sh

#!/bin/bash
address=`echo $1 | cut -d / -f 3`
port=`echo $1 | cut -d / -f 4`
if [ "$port" == "" ]; then
    port=22
fi
ssh ${address} -P ${port}

make it executable

chmod a+x ~/bin/firefox-ssh.sh

Then set with

gconftool-2 -s /desktop/gnome/url-handlers/ssh/command '/home/your_user/bin/firefox-ssh.sh %s' --type String
gconftool-2 -s /desktop/gnome/url-handlers/ssh/enabled --type Boolean true
gconftool-2 -s /desktop/gnome/url-handlers/ssh/needs_terminal --type Boolean true

Modified from this thread on the ubuntu forums.


Is it possible to replace my workspace switcher icon with an icon-sized "expo"?

Open gimp. You can hide the toolbars with the Tab key.
Press the Alt key and start typing "create" and, with the arrow buttons, locate the following line and hit Enter:

  File > Create > Screenshot...

Alternatively, go to the menu File | Create | Screenshot...
In the Screenshot dialog box, select "Capture full screen" and set a delay of 3 to 5 seconds.

Now click on the button "Change" and minimize Gimp if you like. Press and hold Super + S until you see the screenshot appear in the Gimp workspace.

Resize the image (48x48), and follow the instructions given in a previous question in order to change the "workspace launcher item" as this icon is called.


Display a column showing the tags set by Dolphin

I'm using Dolphin 2.1 and I can show tags in the detailed view. Just right click on the column header and select tag.


Had same issue. It was connected with skylake processor architecture. After A LOT OF tries found out that installing ubuntu mate 16.04(not .10) with nvidia-prime solves the issue.


you can run this command man xkeyboard-config or visit this manpage https://manpages.ubuntu.com/manpages/xenial/man7/xkeyboard-config.7.html and see the possibilities.

If nothing found in the manpage, nothing is hidden.

to make Right Alt as Menu key, based on your session x11 or Wayland.
you can find out which session type by running below command.
echo $XDG_SESSION_TYPE

Example:
[admin@ADMIN ~]$ echo $XDG_SESSION_TYPE
x11
[admin@ADMIN ~]$

If its x11 you can use xmodmap config to make Right Alt as Menu key. https://manpages.ubuntu.com/manpages/focal/man1/xmodmap.1.html
if it is Wayland, you need to make a hardware level change https://manpages.ubuntu.com/manpages/focal/man7/hwdb.7.html
There are already answers how to use xmodmap and hwdb if you search in the same AU.
Edit:
for xorg..
First open gnome-tweaks > keyboard and mouse > additional layout options > key to choose 3rd level and untick Right Alt.
create a file with below command.
gedit .xmodmaprc

copy paste below content in the above file.
run xev | grep keycode command and then press right alt to get they keycode and change if it is different from 108.
remove mod1 = Alt_R
keycode 108 = Menu

to apply the above changes immideately, run below command
xmodmap .xmodmaprc

add the command xmodmap .xmodmaprc to startup applications list.
As you mentioned in the Question, if you are not satisfied with the xmodmap, you can go with hwdb https://manpages.ubuntu.com/manpages/focal/man7/hwdb.7.html change which is persistent from boot and dont need anyother scripts or startup commands..


Your problem has nothing to do with Teamviewer. There is no mounting step in their command line installation tutorial :)

It looks like your Ubuntu is trying to mount an USB key that has been unplugged.

What you should do is start a "live" ubuntu session (via an USB key for example), as a mean to repair your Ubuntu installation.

Once that is up, open the disk where you have Ubuntu physically installed, and modify the contents of /etc/fstab.

In there you should find a line about /mnt/usb-ZTE_USB_Storage_FFF1-0:0:

remove it
power off
remove the USB key you used for the live ubuntu session
boot your machine.

That's it.


"/usr/bin/python" missing after installing Python 3.0

You don't run python3 by running python.  You run it by running python3 or python3.2 at this time.

If you removed python2/2.7, then you shouldn't have a /usr/bin/python.  Don't remove python2.  They happily co-exist.

If you want python the command back:

apt-get -f --reinstall install python python-minimal python2.7 python-doc python-tk
alias python to python3
or
softlink python to python3

The preferred method would be to reinstall the python pseudo-package.

note: python doesn't appear to be integrated into update-alternatives... I just checked.


Backports wifi driver wont reload after eboot on ubuntu 14.04

I suggest you recompile backports:

cd ~/Desktop/backports-3.15.1-1   <--or wherever you extracted the package
make clean
make
sudo make install
sudo modprobe ath9k
echo ath9k | sudo tee -a /etc/modules

You should be all set.


How do I fix add-apt-repository command "isn't supported" error in Ubuntu 18.04?

For Wine to work, you need 32-bit capability, and since you are using 18.04, you need to use bionic, not cosmic, so these commands are more appropriate:

sudo dpkg --add-architecture i386
wget -qO - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'
sudo apt-get update
sudo apt-get install --install-recommends winehq-stable


Touchpad tapping stopped working after Kubuntu 19.04 to 19.10 upgrade

Googled a bit and found only one solution - edit Xorg config (you'll need sudo to do it). Maybe someone will suggest better one.

At first open /usr/share/X11/xorg.conf.d/40-libinput.conf and find touchpad section:

Section "InputClass"
        Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Then add two tapping options to the end of section so it will look as follows:

Section "InputClass"
        Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
        Option "Tapping" "True"
        Option "TapButton2" "2"
EndSection

Note: TapButton2 option as I found at https://wiki.archlinux.org/index.php/Touchpad_Synaptics#Frequently_used_options configures "which mouse-button is reported on a non-corner, two finger tap".

Logout&login and touchpad should start work correctly.

As a bonus now GUI tapping options are enabled, see screenshot.


You can edit the interfaces file using something like:

sudo vi /etc/network/interfaces


wi-fi works during the live trial, not after install

Ubuntu may have pulled in proprietary drivers for your card during installation. By chance, these drivers may actually work worse than the open-source ones Ubuntu has built-in. Go to System Settings -> Hardware Drivers and remove any wireless ones, then try again.


My software sources are selected as ubuntu old version 12.something while installing adobe reader

Have you tried to delete the source.list file whit thunar, and use system settings and enter update, and hatch to to first option and reload, and then try to install it again, and it might work fine this way.


When saving files to the desktop, how can I control which side of the screen they default to?

One possible and quite ugly workaround would be to keep creating / copying dummy files or folders in the desktop to saturate all but the "right side" of the screen (maybe leaving out one or two rightmost columns). Then your newly created useful files and folders would start occupying the right side.

Also if those few common files and folders that you  want to access easily are unchanging, then you can simply drag and drop them to the right end of your desktop manually.


Spelling correction which feels like flying

as this feature does not exist at the time of writing, @guettli has opened (under my suggestion) a bug report in the GTK bugtracker


Sharing a USB port from Ubuntu to iOS via Bluetooth

Technically it would be possible to do, but I don't know of any software solution to run on Ubuntu for this (there appear to be software solutions for Windows at least). However, you can just get a cheap adapter such as  the Yamaha MD-BT01, which will add Bluetooth capability to your MIDI gear.


Déjà Dup

Déjà Dup is (from Ubuntu 11.10) installed by default. It is a GNOME tool intended for the casual Desktop user that aims to be a "simple backup tool that hides the complexity of doing backups the Right Way".

It is a front end to duplicity that performs incremental backups, where only changes since the prior backup was made are stored. It has options for encrypted and automated backups. It can backup to local folders, Amazon S3, or any server to which Nautilus can connect.

Integration with Nautilus is superb, allowing for the restoration of files deleted from a directory and for the restoration of an old version of an individual file.

Note that as of February 2016 this project appears to be almost completely ignoring bug reports with only minor triage activity and the last bugfix dates back to 2014, though there are new releases with minor changes.


Want to burn Ubuntu as a disk so that my laptop that lacks an OS can run it from my external hard drive

Simply copying the files to a drive will not work! You need to use an ISO image writing application (Windows 7 has one built in). You'll then have to enter your BIOS and make sure your external HDD is selected as a boot option.

EDIT: This will only work if you're burning to a CD/DVD. If you want to burn to a flash drive, take a look at http://www.pendrivelinux.com/. You'll probably have to do this first, then install onto your external HDD during installation. You can do this when it asks you about partitioning (select "something else" I think).


I had the same problem, fixed by installing the latest Nvidia driver.


How to get help on a specific option of a command

use man pages in ubuntu

in the terminal type

man <command name>

eg: man wget

it will  shows up a detailed description of the command including options.


How do I add new search terms for items to Unity?

You can create a custom shell script and then use the "export" command to save your custom path.

so something like /home/Blub/shellscripts/

and in that folder put your cmd.sh file...You can even make it executable and also you don't need the file extension .sh.

export PATH=/path/to/dir:$PATH

Optionally you can also go to your home folder and type ctrl+h to show hidden files and then open the .profile file.  You can then change the $PATH there.

Once you run it the program should be in your recent files in the dash as well.

You can also just create an alias for bash http://www.howtogeek.com/73768/how-to-use-aliases-to-customize-ubuntu-commands/


Wifi slows down when bluetoth headset is playing sound. Qualcomm Atheros QCA9377

I've had this issue too, but it's fixed in anything running Linux 4.16 or higher.
See: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?h=v4.16.13&id=0a03f98b98c201191e3ba15a0e33f46d8660e1fd
(that's the patch)
And it's already integrated in Bionic Beaver 18.04


can anyone tell me How much it takes to install ubuntu 12.04 from windows installer?

If you have kept the wubi.exe and the iso file in same folder. Then:

Installing the software: max. 5 minutes;
Installing the system: 30 min. approx.

Try to keep hardisk space of at least 10 GB for smooth run


How to trace reason for system crash after reboot?

There is possibly an answer in the syslog file.

Search for 'log' in the dash and 'log file viewer' should come up, I then usually comb over the log for anything that stands out, like look at the log and see what happened just before your computer rebooted, if it's got anything interesting like errors or crashes I usually google the line to see what other people are saying.


You can try installing the version directly from the Racket Team PPA

sudo add-apt-repository ppa:plt/racket && sudo apt-get update

after that install it with

sudo apt-get install racket

That will be version 5.2.0-3 for Ubuntu 11.10 tough.


Will installing Ubuntu wipe my Windows applications off?

Only if you install Ubuntu over your Windows 8 partition. You do not lose programs when installing Ubuntu, but you can lose your operating system if you are not careful.

Make sure you are aware that Windows 8 is more tricky to install Ubuntu.


Accidentally removed gnome from bionic beaver - ubuntu-desktop doesnt install

Well if you don't have a ton of important files I would back up the important ones and do a fresh install.  If you want to try to get the gnome desktop back install this package.  It will pull all the needed dependencies. sudo apt install ubuntu-gnome-desktop good luck. If your looking for unity install this sudo apt install ubuntu-unity-desktop


Virtualbox install 12.04 guest: "pae not present"

On VirtualBox Manager, open your virtual machine configuration then select System on the left side and open the Processor tab. Be sure that Enable PAE/NX is checked.

For commandline

VBoxManage modifyvm <VM_name> --pae on


Amnesia: the dark descent not installing

failed in write on buffer copy for backend dpkg-deb during    `./opt/amnesia/maps/main/ch01/05_wine_cellar.map': No space left on device

This is a clue to what's going on, you're out of disk space.


Why is my default shell from /etc/passwd not started by terminals in a Unity session?

Most terminals (at least gnome-terminal, urxvt, and XTerm, for example) that are started within a desktop environment such as Unity will use the SHELL environment variable to select the shell when they are launched.

SHELL should automatically be set to your default shell listed in /etc/passwd, but the variable can be overwritten when you log in.  Make sure you have not set SHELL=/bin/bash or something similar in a file that will affect your entire desktop session.  Such files include:

~/.profile
~/.pam_environment
/etc/environment
maybe some other files edited by Ubuntu users less often, such as /etc/profile

Additionally if any scripts such as ~/.bashrc or ~/.bash_profile are called by those other startup files and there is an export SHELL=/bin/bash line, that will also affect the entire desktop session.

I know it's acceptable/encouraged, but I still hate answering my own question.  Nevertheless, this may be of some use to someone in the future.  Thanks to @heemayl and @muru for helping me investigate.


I was having the same problem on a Virtualbox guest lubuntu 12.10. I'm using an OSX host, the keyboard is mac. I've been able to get lubuntu to recognise the keyboard by editing:

/etc/default/keyboard

to

XKBMODEL="pc105"
XKBLAYOUT="gb(mac)"
XKBVARIANT=""
XKBOPTIONS=""

Hope this helps anyone similarly stuck.


You can add the -y option i.e. apt-get -y install openjdk-7-jre

from the apt-get manual:

-y, --yes, --assume-yes
           Automatic yes to prompts; assume "yes" as answer to all prompts and run non-interactively. If an undesirable situation, such as changing a held package, trying to install a
           unauthenticated package or removing an essential package occurs then apt-get will abort. Configuration Item: APT::Get::Assume-Yes.

Edit:
To accept the java license, the solution is here:

Installing Java Automatically (With Silent Option)


You can sometimes change the parameters of the client DHCP lease in your wireless router settings. The DHCP lease, by default, is usually about 20 hours and can be set to expire sooner, later, or never. If this option is available, you can certainly set it to expire in one hour.


How to change the terminal title and the prompt path to show only the current working directory’s name?

Open your ~/.bashrc in your preferred text editor and search the PS1 line, by default it says

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

To change your prompt, i.e. the coloured part in front of every command line, to show only the current working directory’s name instead of its path, change \w to \W:

PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\]\$ '

To set the terminal’s (or terminal tab’s) title to the cwd you need to append \[\e]2;\W\a\] to this line, this can be done e.g. at the end directly before the closing ' or – because the line is long enough – on a separate line directly afterwards:

PS1=$PS1'\[\e]2;\W\a\]' # set terminal title to cwd

Related questions

How to change Gnome-Terminal title?
How to change Terminal Title in ubuntu 16.04


Thanks for the reply.I haven't downloaded Cheese, I didn't really understand its function. I just saw it mentioned in connection with the problem. Incidentally, the software that I downloaded from Logitech was intended for a newer webcam than 9000 Pro, which is no longer supported, but it works.
When I run lsusb I see the following line:
 Bus 001 Device 003:ID 046d:0809 Logitech, Inc webcam Pro 0000.That looks promising.

I have to confess that I am not yet very familiar with the operation of Ubuntu/Linux. The CLI commands look very similar to DOS! Do most people use the GUI?


The order of your rules in iptables is critical. If a packet matches an earlier rule, there is no further processing.

You are appending ( -A ) your rules to the end of the OUTPUT chain, so, my guess is the packets are accepted by an earlier rule.

If you put the rule first, with -I OUTPUT 1, it will work.

sudo iptables -I OUTPUT 1 -p all -m owner --uid-owner dev -j DROP

Your user case is more complex as you are using 2 tools, firestarter and iptables, to manage your firewall rules. I suggest you use one or the other, but not both.

If you would like to see your rule set, use

sudo iptables -L -v -n

And if you want to use iptables to manage your firewall see

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


Downgrading gcc/relevant packages on Ubuntu Server 16.04.1

Problem was solved by making my own repository with apt-mirror and syncing against that instead.


software installation problem in ubuntu 12.04

You may check newest version of Wine. Im using Wine 1.5.6.

Installation process. Open terminal (Ctrl+Alt+T) and paste this command:

    sudo add-apt-repository ppa:ubuntu-wine/ppa
    sudo apt-get update
    sudo apt-get install wine1.5
    sudo apt-get install winetricks

Enjoy!


Where is the shared folder of host machine?

As @Gary suggested in his comment to your question, the default for VMware appears to be mounting shared folders in the directory /mnt/hgfs.

You can list the folders in that directory with ls /mnt/hgfs in a terminal window.

If you want to use Nautilus, the default Ubuntu GUI file manager/explorer, then after you open it press ctrl+L and enter the path /mnt/hgfs into the Location box and press enter.


Changing wallpaper and language setting after su command?

For changing wallpaper at login time, you could add this command at the end of /home/$user/.profile:

gsettings set org.gnome.desktop.background picture-uri file:///folder/file

For newer users, it's a good practice to customize home in /etc/skel. Copy your modified .profile to there. See this: How setup new users with skel


gnome-settings-daemon not starting when I login

Sounds like a corrupt configuration.

You can recover without making a new account.

Boot to recovery mode. You will be in a command line interface without a graphical interface. Run the following commands:

cd /home
mv your_user your_user.bak
mkdir your_user
chown your_user:your_user your_user
chmod 770 your_user

change "your_user" to your user name.

Exit the root shell and continue the normal boot process.

You should be able to log in as normal. You can copy your old data from your_user.bak to your home directory as needed.


an alternative...
When dealing with critical data such as passwords I personally prefer keeping the same software and database rather than depending upon some-sort of sync or export/import process.
Fortunately, keepass2 runs very well via Mono - so if you are one of the rare breed who is prepared to host Mono libraries on your computer, then you can install Keepass2 via the Software Center.
keepass2
This will install all the relevant parts of Mono needed to run Keepass2

Linked Question:

How do I run keepass2?


i accidently changed the feature of my left shift key now i cant use it

PART 1

This will reset your keyboard. First of all go to http://pastebin.com/knERsenF chose your language.

Open please the Terminal and type

setxkbmap ch

replace ch with your countrycode from the pastebin.

PART 2

Attention, this will reset all your key bindings!!!!
Open Terminal and type the following commands (i dont remember if you need sudo, try it first without)

gsettings reset-recursively org.gnome.settings-daemon.plugins.media-keys
gsettings reset-recursively org.compiz.integrated
gsettings reset-recursively org.gnome.desktop.wm.keybindings
gsettings reset-recursively org.gnome.shell.keybindings

After this to Part 1 again


Laptop power saving or management in Ubuntu 14.04

Install cpu-freq. It has four options: Conservative, Ondemand,Powersave, Performance.
 (sudo apt-get install indicator-cpufreq)


openshot and qbittorrent quits after after being launched

Update qbittorrent from PPA. or downgrade, if tou use ppa. it's all because of libtorrent-rasterbar6 update. downgrade this package, or upgrade qbittorrent from ppa

The kind of error you experience at qbittorrent usually happens when qbittorrent is built against one version of libtorrent and executed against another. Could you please check you system to make sure you don't have several versions installed ? like for example one in /usr/lib and one in /usr/local/lib?


You should handle these kind of issues with logrotate, it is designed for these tasks specifically.
For example, to enable logrotate to rotate the file /var/mail/root if the size of the file becomes 10 MB, you can add a logrotate configuration file e.g. /etc/logrotate.d/mailroot with the content:
/var/mail/root {
        # Rotate if the size is >=10MB:
        size 10M

        # Keep 5 rotated logs:
        rotate 5

        # Do not rotate if empty:
        notifempty

        # Compresses rotated logs, default:
        compress
}

You can define for the whole directory too using wildcard, *, so that it will be applicable to all files under it:
/var/mail/* {

....

}

As logrotate is run daily by cron (anacron), you do not need to add any cron entry if the configuration is put in /etc/logroate.conf or /etc/logroate.d/*. You can also define your own crontab entry if the configuration file resides elsewhere, you might also need a state file that will contain the current file rotation tatus.
Most importantly, check man logroate and man 5 logroate.conf to get more idea and options.


Trouble displaying RTMP stream on webpage. (Linux Ubuntu, Nginx)

I have the same problem but have got a little further than you !
I am using ffmpeg to decode the rtmp to .m3u8 playlist where it stores the files in .ts parts .

install ffmpeg
sudo apt install ffmpeg

To decode from rtmp, you must switch on hls by editing your nginx.conf like this :

application live {
            live on;
            # Turn on HLS
            hls on;
            hls_path /stream/hls/;
            hls_fragment 3;
            hls_playlist_length 60;
            # disable consuming the stream from nginx as rtmp
            #deny play all;

( make sure you have made a directory /stream/hls ) to store the decrypted files in the directory

The code to decrypt the rtmp to that directory is

ffmpeg -v verbose -i rtmp://127.0.0.1:1935/live/YOUR OBS STREAMKEY HERE -c:v libx264 -c:a aac -ac 1 -strict -2 -crf 18 -profile:v baseline -maxrate 400k -bufsize 1835k -pix_fmt yuv420p -flags -global_header -hls_time 10 -hls_list_size 6 -hls_wrap 10 -start_number 1 /stream/hls/YOUROBSSTREAMKEY / or outputfilenamehere.m3u8

Paste above to putty and click. You will see the stream decoding/encoding in the directory folder if obs is running.

I have got this far ! I see the m3u8 decoding but I am stuck on how to add the m3u8 playlist to the webpage to play the stream live !

If anyone could update that would be great !

edit: I cannot view the m3u8 in vlc aswell


How can I run sites as different users and directory with apache2 and nginx as reverse proxy

Use the default 000-default.conf file as a template.  Copy it to a name for your virtual host and make modifications to your custom file.

You can rename the files using these steps:

$ cd /etc/apache2/sites-available
$ sudo mv 000-default.conf mysite.conf
$ cd /etc/apache2
$ sudo mv apache2.conf apache2.conf.test

Now create your virtual host, "mysite.com".

You can replace the /home/web/mysite to any directory.  In your case you can use /home/{user}/projects/web.

$ cd /etc/apache2/sites-available
$ sudo cp 000-default.conf mysite.conf
$ sudo mkdir -p /home/web/mysite/www
$ sudo mkdir -p /home/web/mysite/log

If the mysite.com host doesn't exist, create it locally with:

$ sudo nano /etc/hosts

Add it to the hosts file:

127.0.0.1  mysite.com

Now edit your mysite.conf file to point to your Document Root choice.

$ sudo nano /etc/apache2/sites-available/mysite.conf

Make the following changes to this file.  This is the difference between the 000-default.conf file and your newly created mysite.conf file.

&ltVirtualHost *:80&gt
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        ServerName mysite.com

        ServerAdmin webmaster@localhost
        DocumentRoot /home/web/mysite/www

        &ltDirectory /&gt
                Options +FollowSymLinks +ExecCGI +Includes
                Require all granted
        &lt/Directory&gt

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog /home/web/mysite/log/error.log
        CustomLog /home/web/mysite//access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
&lt/VirtualHost&gt

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

Now enable the new site with:

$ sudo a2ensite mysite.conf

When making a change to the Apache configuration files restart the service with:

$ sudo systemctl restart apache2

Write Permissions to the directory and files of the VirtualHost:

You can use the commands chown and chgrp to change the owner of the files and folders of /home/web/mysite/www.  If they are owned by your userID, you'll have read and write access to the files and folders.

You can also create a specific group and add users to the specific group so that user's of that group will have read/write access to the files and folders.


Wine won't launch any apps returns error 0009:err:module:__wine_process_init failed to load L"Z:\\path\to\executable", error c000012f

That error code would be returned in at least one scenario: invalid/corrupt executable.

Here, I reproduce it with EICAR — which is invalid Win32 PE; rather, it's a DOS COM file:

$ echo 'X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*' > eicar-standard-antivirus-test-file
$
$ file eicar-standard-antivirus-test-file
eicar-standard-antivirus-test-file: EICAR virus test files
$
$ wine ./eicar-standard-antivirus-test-file
0034:err:module:__wine_process_init L"C:\\windows\\system32\\winemenubuilder.exe" not found
002c:err:wineboot:process_run_key Error running cmd L"C:\\windows\\system32\\winemenubuilder.exe -a -r" (126).
00a4:fixme:ntdll:server_ioctl_file Unsupported ioctl 24000 (device=2 access=1 func=0 method=0)
00ac:fixme:ntdll:server_ioctl_file Unsupported ioctl 24000 (device=2 access=1 func=0 method=0)
00ac:fixme:ntdll:server_ioctl_file Unsupported ioctl 24000 (device=2 access=1 func=0 method=0)
00ac:fixme:ntdll:server_ioctl_file Unsupported ioctl 24000 (device=2 access=1 func=0 method=0)
0024:err:module:__wine_process_init failed to load L"Z:\\home\\ulidtko\\eicar-standard-antivirus-test-file", error c000012f

You can tell Wine to log much more verbosely — read man 1 wine.

With the EICAR example, env WINEDEBUG=warn+all wine ./eicar-standard-antivirus-test-file would output plenty of complaints in header byte mismatches and invalid sizes, ending with invalid ELF header (which I guess was meant to say invalid PE header).

There of course might be (and probably are) other scenarios where error c000012f would be emitted... but this is definitely one of them. Hope it helps.


Create zip files in /var/www/html using crontabs

Joining commands with && means that the command on the right will only run if the one on the left was successful. This means that your crontab will fail the first time it is run since there is no zip file in /var/www/html/ so the rm /var/www/html/my-zip-file*.zip fails and the mv will not be executed.

So, you can either create a file of the right name that can be deleted and keep the same cron command:

touch /var/www/html/my-zip-file.zip

Or, you can use ; instead of &&:

cp /home/myuser/myworkingdir/file.txt /home/myuser/file.txt &&
cd /home/myuser &&
zip my-zip-file-$(date "+%b_%d_%Y_%H.%M.%S").zip file.txt &&
rm file.txt &&
rm /var/www/html/my-zip-file*.zip ;
mv my-zip-file*.zip /var/www/html && cd

You are also making this way more complex than it needs to be. The copying of /home/myuser/myworkingdir/file.txt to /home/myuser/file.txt is unnecessary since you're only using that to zip it and then are deleting it. The cd commands are not needed, you can use the full path. There's also no reason to cd at the end. All you need is one command to remove any zip files from the target directory and one command to zip them:

rm /var/www/html/my-zip-file*.zip &&
 zip /var/www/htmlmy-zip-file-$(date "+%b_%d_%Y_%H.%M.%S").zip /home/myuser/myworkingdir/file.txt


ubuntu package search with multiple terms and logical operators

Reading man apt-cache locally or online gives interesting quote:

apt-cache performs a variety of operations on APT's package cache.
...
search regex...
search performs a full text search on all available package lists
...
Separate arguments can be used to specify multiple search patterns that are and'ed
together.

So you can use the following syntax locally:

simple vnc and server:
apt-cache search vnc server

(on my Ubuntu MATE 18.04 LTS it gives 51 package name)

narrowing the result is possible by adding quotes
apt-cache search "vnc server"

(gives 23 results)

For regex syntax see man 7 regex locally or online.


How can I make permanent permissions for a directory using chmod?

sudo mkdir --mode=define_permissions dir_name
sudo chown user_name dir_name
touch dir_name/file_name

If this does not work for you, try using ACls.


RTL8188EE wireless card not functioning properly

Windows offers automatic switching between Access Points and channels to find the best connection. Ubuntu comes with GNOME Network Manager that does not offer this fuctionality.

This will cause problems if you use your laptop in a congested enviroment.
To solve this you need to get your computer to do the hard work through a script such as getwifi .


How to edit machine hardware detail deployed by Juju?

I believe you will have to redeploy the service on that machine. Even in MAAS, it's usually best to recommission the node if its hardware changed.


My custom .desktop file appears in Dash as a text file

First of all, move the .desktop file to /usr/share/applications/ (global launchers, needs root permission to move file) or to ~/.local/share/applications/ (only for the current user).*
EDIT: When you run desktop-file-install, this is not necessary as it automatically copies the file to /usr/share/applications/

Then, after checking your .desktop file for errors with desktop-file-install filename.desktop (no output means no errors, but even some warnings may not prevent the launcher from working),
you add it to the Unity dash by running sudo desktop-file-install filename.desktop (EDIT: root privileges required to access /usr/share/applications/ where global launchers are stored). Please note that this command might add some lines to the original .desktop file.

I hope this solved your problem. Greetings!
(Source: https://help.ubuntu.com/community/UnityLaunchersAndDesktopFiles)


Try the following solution:

Alter the listening port for nginx server by opening /etc/nginx/sites-available and changing the port or line listen: 80 to whatever port you like.
Reload nginx server:

sudo systemctl restart nginx

Now try re-installing apache again.


How to make windows resist overlapping each other?

First of all, install compizconfig-settings-manager (CCSM)  using this command:

sudo apt-get install compizconfig-settings-manager

Run it and go to the Window Management Plugins:

Choose Snapping Windows, choose Behaviour Tab and then activate Window Edges.

Play with the settings as you like.


Ok, after doing some research, I've found that even if you set the file limit in dosbox or dosemu, this will affect to the number of files you can open per terminal. The number of files you can open from a single process it has to do with the number of available file handles, in this case 20 for msdos systems, 5 for stderr, stdin, stdout, stdaux, sdtprn. As explains this  MS-DOS programmer FAQ.


Ubuntu 16.04 does not show the login screen on booting

Are you greeted with a black screen or terminal prompt?

If only a black screen -> enter the grub menu and highlight the Ubuntu option.
Press the 'e' key and add the text nomodeset before quiet splash. The result should be nomodeset quiet splash, then press ctrl+x to load the OS. If this does fix your problem then at least you know it may be a video driver problem.

If you do get to a prompt (try 'ctrl+alt+F1' or 'ctrl+alt+F2', the GUI is usually on ctrl+alt+F7) you could try and start the login screen with sudo service lightdm start. If this does work you may have a different problem, maybe installing the display manager again will fix any errors. To install it type sudo apt-get install lightdm.

If starting the lightdm does not work you could try a more basic debugging option by typing startx at the prompt, perhaps this will help you shed some light on the problem.


How to auto-replace content of .desktop-file depending on current state of a script

Try overwriting the file instead.

#!/bin/bash

DESKT=/home/user/program.desktop

if [ $(systemctl --user status program | grep -c running) = 0 ]; then
    systemctl --user start program
    icon=active
    name=working
else
    systemctl --user stop program
    icon=inactive
    name=stopped
fi

cat > "$DESKT" <<EOF
[Desktop Entry]
Type=Application
Name=Program $name
Exec=program
Icon=program_$icon
EOF

Explanation:

The cat <<EOF will copy anything until the next EOF by itself, interpreting variables.


Automatically starting a quad-split byobu terminal

Took me a while to figure it out, so if anyone needs a startup script to open up multiple byobu sessions, use and modify as you like:

#Create new session. I named this LeftMonitor for obvious reasons
byobu new-session -d -s LeftMonitor

#Select default pane. Probably an unnecessary line of code
byobu select-pane -t 0

#Split pane 0 into two vertically stacked panes
byobu split-window -v

#Select the newly created pane 1. Again, probably unnecessary as the new pane gets selected after a split
byobu select-pane -t 1

#Split pane 1 horizontally to create two side-by-side panes
byobu split-window -h

#Repeat the selection and splitting process with the top half
byobu select-pane -t 0
byobu split-window -h
#At this point, four equally sized panes have been created.

#Select pane to interact with
byobu select-pane -t 1

#Pass a command to the selected pane. I'm using top as the example here.
#Note that you need to type Enter for byobu to simulate pressing the enter key.
byobu send-keys "top" Enter

#Create a new session. Session name is again chosen for obvious reasons
byobu new-session -d -s RightMonitor

#Repeat the same splitting and command issuing processes from the first session.
byobu select-pane -t 0
byobu split-window -h
byobu select-pane -t 1
byobu send-keys "top" Enter
byobu select-pane -t 0
byobu send-keys "top" Enter

#Finally, to be able to actually see anything, you need to launch a terminal for each session
gnome-terminal --full-screen -- byobu attach -t LeftMonitor
gnome-terminal --full-screen -- byobu attach -t RightMonitor

Save this with your preferred text editor, run sudo chmod +x on the file, and add it to whatever startup list you use.


Can sign in to xfce but not to Ubuntu Desktop environment after update

it looks like you at some point tried to run your xsession as root and this has left some other files owned as root in your home dir.

to list all the files in your home dir owned by root

find ~ -uid 0

have a look at the list and chown anything back to you then try again.

It might also be a good idea to send this to a file for reference later in case you introduce more issues with later changes.

If you are happy that all the files listed by that command should be returned to your ownership then run this command.

find ~ -uid 0 -exec chown $USER:$USER -r {} \;

It would also be worth creating a fresh user account for comparison, try login in with that, if that doesn't work then the issue may not be at user level but could be a system thing.


One thing that helped out is this link:
No audio on Ubuntu 18.04
which says to

$ sudo apt-get install pavucontrol
$ pavucontrol

Also I removed then reinstall the pulse audio as

$ sudo apt-get install pulseaudio

With the steps above at least I see my hardware in the Sound settings (output)
So it is a step forward. Sound is still muted, but I am working on that.


I solve it with sudo apt-get install laptop-mode-tools.

Hope it helps.


The problem is because of your internet connection limitations and there is no practical workaround other than using a vpn or something like that. The main reason is that https://launchpad.net/ is not accessible from your internet connection.


There is graphics driver for AMD radeon r5 series gpu for notebook (laptop) on there site for ubuntu too. But you have to manually find it by choosing your gpu specific and os type.

But after what I experienced by installing Proprietary driver for AMD radeon r5 230 gpu, I suggest you don't install it. After I installed Proprietary driver in my ubuntu 15.10 on lenovo g40-70, my system entered low graphics mode and showed error with black screen. I had to uninstall driver by entering recovery mode to get it fixed.

There is already open source Xorg driver for AMD radeon gpu. It works fine. If you are facing low battery backup, install tlp and always keep it running. It prevents laptop from overheating and also increases battery backup.  To install it:

sudo add-apt-repository ppa:linrunner/tlp
sudo apt-get update
sudo apt-get install tlp tlp-rdw
sudo apt-get install tp-smapi-dkms acpi-call-dkms

To start it type :sudo tlp start

Also make sure, while running on batter screen brightness is low so that you get more battery backup. After I installed tlp, I always keep it running and thus get backup of around 4 hours for normal use.


How can I customize the Unity top panel?

The top panel isn't empty. It is used for applications menus and titlebars, and you can add many indicators which also requires space. I sometimes like to use my screens narrow and tall, and then there would really not be any room for anything more.

You can't add a taskbar to the top panel. Adding a bottom panel with a taskbar is fairly easy, though. You can use Gnome Panel (the panels from earlier versions of Ubuntu -- they are still available), Xfces panel, LXDEs panel or any other panel you like. There will be no conflict with Unity as long as you only use a bottom panel. In the case of Gnome Panel, you'd have to delete the top panel manually, either by pressing alt and right-clicking the top panel, or you could use dconf-editor from the dconf-tools package.

For instance, this is Unity with an xfce4-panel taskbar, with extras. As you can see, there's no conflict. I would probably recommend that you use Gnome Panel if that's what you're used to. Just remember that in Gnome Panel 3, you have to press alt to display the right-click menu on the panel or move applets. Otherwise, it's just the same as in earlier versions.


How to setup a static ip in Ubuntu? Where i need network, broadcast, dns parameters to fill in from my ISP?

Your network is x.x.146.48 and your broadcast x.x.146.63.

Network and broadcast can be derived from ip and netmask. Netmask is used to separate the IP in two different segments (they are called network and host). If you look at your netmask in binary it looks like:

11111111.11111111.11111111.11110000
255     .255     .255     .240

The ones mark the network segment, the zeros the host.
You IP in binary is (I'm not going to translate the 146 as it is fully part of the network address):

x.x.146.0011-0010

From the netmask we know the last four digits is you host address, so your networks is.

x.x.146.0011-0000 or 48

The broadcast address is the same that the network one but with all the host bits at 1.

x.x.146.0011-1111 or 63

You can found much more info about ip routing and subnets in wikipedia.