Is there a way to quickly browse multiple pdfs in a directory?

I like @Glutanimate answer since it uses a real pdf viewer. I have an alternative that allows viewing any list of files (including pdf) as a presentation, on fullscreen if needed:

impressive

Install it

  sudo apt-get install impressive

Then, from a terminal in the directory containing your pdfs:

  impressive -T0 -w *.pdf

It will display a presentation of your pdf files.
the -T0 option removes transitions (or, equivalently, -t None), and the -w wraps the presentation (you can return to 1st slide from the last one).

You may want to use the -f switch to avoid starting in fullscreen mode (anyway you can toggle to fullscreen hitting the "f" key).

For zooming, position your mouse where you want to zoom in, and hit "z".

Otherwise I am just discovering the Zathura pdf reader, it's highly customizable, I suspect there might be a way to write a plugin and bind keys to switch to the next pdf.


Try:

sudo add-apt-repository ppa:doctormo/xorg-wizardpen
sudo apt-get update
sudo apt-get install xserver-xorg-input-wizardpen

Reboot, and it should work

Otherwise other instructions (although for archinux), http://kokizzu.blogspot.com/2015/02/how-to-setup-genius-mousepen-i608x-in.html

Other drivers to try DIGImend


How well does Ubuntu handle real time audio?

You can install the low latency kernel package with the Software Center, or using APT:

sudo apt-get install linux-image-lowlatency

If using the low latency kernel doesn't work for you, you have a different issue.

If you want to make it permanent, see How do I pin the lowlatency kernels so apt doesn't update with a newer generic kernel?


How do I set Deluge as default Torrent client?

You don't need to install any additional software to change the default program to open a specific archive type. Just open the file manager Nautilus and right click the file. Open Properties and go to the Open with tab. There you choose the default program.


How do I automatically create links to directories?

You could write use below mentioned shell script to create links for those directories for existing users and could use skel so that links are automatically created when new users are added.

#!/bin/bash

# GENERATES ALL THE USER HOMES
USERSHOMES="$(cat /etc/passwd | grep home | grep -v /bin/false | cut -d: -f6)"

# THIS IS THE LINK NAME
LINK="music-dir"

# LINK DIRECTORY TO ALL HOMES
for h in $USERSHOMES
do

   # WHERE YOU WANT TO COPY TO
   _dir="${h}/Desktop"
   if [ -d "$_dir" ]
   then
      ln -s "/media/music" "$_dir/$LINK"
   fi
done

Tested on my system.


If your intension is to reinstall windows7 then you can directly do that so that automatically this ubuntu will also be removed while installing a fresh copy of windows7.

But if at all you want to remove ubuntu before you remove windows7, you can do that by simply doing the following steps.
1. Open your system in windows7.
2. Know in which drive you installed Ubuntu
3. Go to that drive and delete all the data related to Ubuntu including Ubuntu installation files completely (shift+delete).
4. Then restart your system and now you would not have two OS' only Windows7 will be present.
5. If you want to use that drive (where you had Ubuntu earlier) to some other purpose us can use it as it is or u can merge it with any other drive (except the drive where you have Windows7) using disk manager which is present in Control Panel > Administrative Tools > Hardware Management >  Disk Management.
6. Be very cautious while merging the drives, otherwise you can end up with data loss.


How to create bootable ISO from an installed OS?

You have many tools that are available for Ubuntu 12.04(some of them are not used anymore for newer versions. but still works for ubuntu 12.04).

relinux
remastersys
Ubuntu Builder
System Imager

And much more.

I personally advise you to use Relinux.

Download this version from launchpad and not the last version to use the following tutorial on it

Here is a great tutorial how to use.


Cannot reboot or even shutdown my ubuntu

I found that someone had logged in to the guest account. Unity won't shut down when someone else is logged and it doesn't give you any indication that someone else is logged in. Logging the other user out solved my problem.


rxvt-unicode doesn't display unicode characters

The screenshot is virtually unreadable due to lack of color contrast, but it seems that the reason for the problem is simply that the font being used does not contain glyphs for the characters ☁ or ☂. A little box is typically the way programs indicate the presence of a character that has been recognized but cannot be displayed due to lack of a glyph.

This explanation sounds problematic, because xrvt FAQ says: “When rxvt-unicode sees a character, it will first look at the base font. If the base font does not contain the character, it will go to the next font, and so on.” So it should find a glyph if any available font contains it. But presumably this process goes wrong, e.g. because character repertoire information in some font is faulty (a font may say it supports a character but lacks a glyph for it). Testing with different base font settings may help to identify the problem.


Why I can not scroll by my thinkpad usb keyboard's trackpoint after I upgrade Ubuntu from 15.04 to 15.10

The same thing happened to me. It seems installing the libinput input driver for X fixed my problem:

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

Restart X (logout/login) after installing.


Adapta theme nautilus menu in wrong language

I managed to find a solution:

  sudo apt-get install --reinstall nautilus-data

followed by

  sudo apt-get install --reinstall nautilus

thanks to ravery comments.

I also had to edit ~/.config/user_dirs.locale to only contain "en_US" as well as double checking the ~/.config/user_dirs.dirs

To apply the changes I had to do nautilus -q to kill the nautilus process and then open it again via unity, nothing else applied the changes.


In fact what you posted there is called a fork bomb, because it does exactly that it is a bash function which calls itself twice and so on. You can replace the : with a name if you want so it becomes more obvious:

fu{
    fu | fu &
}; fu

So fucalls itself piping its output through itself again and this way fills up your processor with requests.

It is not harmful, beside the fact that you may have to reboot your computer the hard way because it becomes unresponsive.


How to update grub after windows 10 install?

Boot to Ubuntu and mount the Windows drive (if you're using UEFI, mount the EFI partition too as root.)
Use the command:
sudo os-prober

and try updating the GRUB config using the command:
sudo update-grub

It will automatically detect the changes and you can try booting again.
Also, don't update GRUB manually from grub.cfg. There could be unintended side effects. Next time if you want to edit the config, use:
sudo apt install grub-customizer

GRUB Customizer can help rename, add, delete and edit your entries. It's a good tool and you can use it on Ubuntu.


Actually. I dug a bit more into this and found a solution. It can be found here. This uses built in functionality so wmctrl is not needed. It does use a GUId configuration editor but I actually find this tool to be quite handy. Just be careful not to edit things that you are not sure what they do. It could be fatal to some applications or your system.

Just in case the link ever breaks or future readers do not wish to follow the link:

Install dconf-editor with sudo apt install dconf-editor
Run dconf-editor to open the settings editor.
Navigate to: /org/gnome/desktop/wm/keybindings
Select toggle-above, note there is also an option for always-on-top this did not work for me
Toggle of Use default value
Set custom value. Must be an array containing a string. I set mine to ['<Shift><Alt>a']
Save by clicking the check mark in the bottom left


Takes a long time to upload to Cloud on Ubuntu One

im not entirely sure myself, as i had the same problem.

oddly enough i found that uploading one file at a time works at a decent rate, but i could never get a second to upload unless i closed and restarted the program.

also, if you upload from your android via 4g connection it shows as uploading much faster (why they included a progress bar on the phone app and not on the desktop app is beyond me)


I don't think your parsing the info from dmidecode in the way it was intended. What I see here is that your Kingston modules are error correcting while your Corsair modules are not.

To the best of my knowledge, The Error Information Handle is a handle, not an error.

I haven't reviewed the specs on your ASUS V-PRO Z77 but as a rule of thumb, I would never mix ECC and non-ECC modules in the same build. AFAIK, it's not usually a supported configuration. Furthermore, don't blindly trust the output of dmidecode as it does not scan your hardware, it only reports what the BIOS told it to.

Sources:

http://www.nongnu.org/dmidecode/

https://www.amazon.com/Corsair-CMZ8GX3M2A1600C9-240-pin-1600mhz-non-ECC/dp/B00FZ5V18K

https://www.kingston.com/dataSheets/KVR1333D3E9S_4GHC.pdf


Unity configuration does not apply when I use ccsm

I just ran into this problem, try logging out and back in and see if the settings take.


Fixed! After a lot trials I managed it to work. I reinstalled xserver and nouveau. Though I had also updated Unity to 8 before thinking that it might have corrupted. :P So if anyone is having same issues can do this ;)


Unabe to install windows on a ubuntu only machine

This tool should fix most common problems - though if Ubuntu install failed, I would try to install it over the same partition it is on, again.


Could not obtain c# compiler error when using monodevelop

you can also install the compiler for the versions

sudo apt-get install mono-gmcs


How do I get "ruby" to do what "ruby1.9.1" does?

Well to start with, you wouldn't need to write a C application - a simple bash ditty would do you fine.

I think the cleanest possible solution would involve the update-alternatives system. This is how, for example, Ubuntu manages to keep various Java virtual machines separated while installed alongside each other. The problem is you need to set it up yourself.

I just came across a mailing-list post that does seem to do most of the heavy lifting for you. You might need to change the version numbers slightly but other than that, you should get the idea.

For posterity (in case Google nixes the URL or the thread), I'll copy in the business end now but I take no credit for writing it.

If any of you are using Ubuntu this is a pretty nice way to manage multiple
ruby interpreters.

It has the advantage of managing the manpages, ri, and irb as "slaves", so
they change when a new interpreter is selected.

here's the code:

# become root
su

# make sure the packages are installed for 1.8 & 1.9
aptitude install -s  ~n^ruby1.[89]$ ~n^irb1.[89]$ ~n^ri1.[89]

# install ruby1.8 & friends with priority 500
# so this will be the default "auto" choice
update-alternatives --install /usr/bin/ruby ruby /usr/bin/ruby1.8 500 \
                    --slave   /usr/share/man/man1/ruby.1.gz ruby.1.gz \
                                  /usr/share/man/man1/ruby.1.8.gz \
                    --slave   /usr/bin/ri ri /usr/bin/ri1.8 \
                    --slave   /usr/bin/irb irb /usr/bin/irb1.8

# install ruby1.9 & friends with priority 400
update-alternatives --install /usr/bin/ruby ruby /usr/bin/ruby1.9 400 \
                    --slave   /usr/share/man/man1/ruby.1.gz ruby.1.gz \
                                   /usr/share/man/man1/ruby.1.9.gz \
                    --slave   /usr/bin/ri ri /usr/bin/ri1.9 \
                    --slave   /usr/bin/irb irb /usr/bin/irb1.9

# choose your interpreter
# changes symlinks for /usr/bin/ruby ,
# /usr/bin/irb, /usr/bin/ri and man (1) ruby
update-alternatives --config ruby

for those with additional interpreters in say /usr/local/bin, other Debian
variants, or managing other tools, vary as required.

% man update-alternatives

hope wrapping didn't mangle it too much, and that someone finds this useful
...
--
cheers,
David Lee


Same problem in the Ubuntu 14.

This is due to the fact that Oracle has moved from 201 to 211 version, removing 201 from its resource. And webupd8team did not have correct the links.

Check this solution:

mkdir -p /opt/jdk
wget https://download.oracle.com/otn/java/jdk/8u211-b12/478a62b7d4e34b78b671c754eaaf38ab/jdk-8u211-linux-x64.tar.gz?AuthParam=1555549457_a97b02ea0e2d39aeaf0e2a1d180a6b7e

Manual download from here, we need jdk-8u211-linux-x64.tar.gz or jdk-8uXXX-linux-x64.tar.gz

tar -zxf jdk-8u211-linux-x64.tar.gz -C /opt/jdk/

update-alternatives --install /usr/bin/java java /opt/jdk/jdk1.8.0_211/bin/java 100
update-alternatives --install /usr/bin/javac javac /opt/jdk/jdk1.8.0_211/bin/javac 100

update-alternatives --display java
update-alternatives --display javac

java -version

For cancel installation in every time when apt-get update will be running:

apt-get remove oracle-java8-installer
apt-get purge oracle-java8-installer
apt-mark hold oracle-java8-installer


Ok .. found it ..

dconf>org>gnome>desktop>interface>can-change-accels

Im welcome.


unable to connect or detect internet single from our router

Well Ubuntu does not come ready or able to install most wireless NIC cards like you would on any other UNIX or WIN operating system. What HP is it? If you know your model you might be able to find someone that has either found a downloadable pckg driver or a work around. Shoot me an email if I can be of further help.


How do I set mount point and label for a LUKS encrypted ext. HDD?

Those random alphanumeric strings are UUIDs for your partitions.

In your case the partition gets mounted in
/media/user/string1,
where string1 is the UUID of the encrypted partition.

Then you have a decrypted partition, with UUID string2. You can see it mounted in /dev/mapper/string2 when the partition is mounted and decrypted.

You need to give this latter partition a label.

IF your partition is ext2/3/4 you can label it via:

e2label /dev/mapper/string2 Label

Of course the encrypted partition must be mounted and decrypted, otherwise you don't see it in /dev/mapper.

(e2label is part of e2fsprogs, so you need to install it)


After going through an Ubuntu software update, system fails to boot

OK. Its fixed now by boot-repair.  Not sure what I did to fix it but I killed the one that was hung and tried this:

How to restore a system after accidentally removing all kernels?

Rebooted.  No help.

Then I tried reinstalling grub (sorry, lost the link but it was a vanilla sudo apt-get ... command).

Rebooted.  No help.

After those two attempts, I rebooted from the 14.04 install CD (try ubuntu option), then ran boot-repair again and it completed with a happy message saying that it was fixed and I could reboot.  Maybe it would have just worked the second time through without my other gyrations.

Rebooted.  Profit!

Good luck to those who come along later on.


Purging nginx didnt delete the configuration files


How to sync the progress reading of ebooks from android?

Try Calibre. You can install it using apt-get

sudo apt-get install calibre


Ubuntu 12.10 + Gnome 3 = Keyboard Layout Indicator is not working!

It's bug dude and not solved until now.

Please read this: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1045914/


Record audio output of one single application window only

I found a solution for this myself. It requires pavucontrol (PulseAudio Volume Control) to assign the input and output audio streams to specific applications and an audio recording tool which ideally can select its input device manually, including virtual devices. I chose Audio Recorder for that. You will also need to create virtual audio sinks using the command-line tool pactl to be able to separate the audio output streams and record one application independently.
Preparation
First you need to set up a virtual audio sink. It acts as a virtual audio device or virtual audio cable, however you want to call it. You can set it as output device for one application and let the other application record it as input device.
This can be done with pactl on a system using PulseAudio like this:
pactl load-module module-virtual-sink sink_name=sink1

sink1 here is just an arbitrary name for the virtual device.
Set up the audio source application
Second we start the application that is going to play back audio which we want to record.

If the source application allows to select the sink1 device we created earlier as audio output device, you can simply do that and skip to the recording section.

If the source application doesn't give you an option to select the audio output device, you have to install (if necessary: sudo apt install pavucontrol) and start Pavucontrol.
Then launch the source application and let it play any audio. While it is making noise, it will appear in the Playback tab of Pavucontrol. Locate its playback on [...] drop-down menu and select Virtual Sink sink1 as target device. You will still hear it because the virtual sink is also connected to your standard output device, but that is okay.
You can also pause the playback again now and mute the source application, Pavucontrol will remember the configured playback device for a while.

Set up the recorder application
Now launch your recording software (I recommend Audio Recorder from the ppa:audio-recorder/ppa PPA, installation instructions here, for this task).

If it allows you to select your virtual sink (or a monitor of the virtual sink) as input device to record, do that.

If you can not select the input device (or if only hardware input devices are listed, try to set it to something like "system default"), you have to use Pavucontrol again.
Let the tool start recording anything. While it is listening, it will appear in Pavucontrol's Recording tab. Locate its from [...] drop-down menu and select something like Monitor of Virtual Sink sink1 as input device.
You can also pause the recording again now, Pavucontrol again will remember the configured input device for a while.

Record
Now that the source application has our custom virtual sink configured as output device and our recording application is using that same sink (or its monitor) as input device, you can finally start recording.
The recorder will only hear the sounds produced by the source application (actually by all applications outputting their audio to our virtual sink, but it should only be that single one) in this setup. You can have any number of other applications playing back audio to a real audio output device or a different virtual sink at the same time without disturbing your recording.


try this (careful the force command is very powerful and as such it is advised the user fully understand what it does):

sudo dpkg -i --force-all [deb file path]

apt-get update and apt-get upgrade then try everything (including what you tried) again...

Similar problem: How to delete broken packages in ubuntu . The solutions might help u if this doesn't work.


Reset owner password on Ubuntu 18.04 single-boot Dell laptop

The steps I had to take to reset my password differ somewhat from all the answers linked in the original post. I start out the same but never see a Recovery Menu screen, never enter "/usr/sbin/usermod -p '!' root", etc. I make changes at the command line but the behavior of my CLI is not predicted in any of the other how-tos I tried.

These steps were taken on a single-boot Dell running only Ubuntu 18.04:

Turn on computer.
Press and hold Esc key when Dell screen appears to enter GRUB (right
Shift key didn't work for me; didn't try left Shift key).
Select "Advanced options for Ubuntu".
Press Enter.
Select "Ubuntu ... (recovery mode)". I had four kernels and chose
the latest one.
Press "e" for edit.
Navigate to the line that starts with "linux /boot/vmliuz-...". For
me that line ends with "ro recovery nomodeset".
Remove the last part of line, "ro recovery nomodeset", and replace it with "rw init=/bin/bash". (Thanks to faqforge website for making this step clear.)
Press F10 to reboot the machine.

Here's where I will switch to narrating my experience in the first person rather than prescribing what others should do. I'm not sure why I never see the Recovery Menu at this stage that most answers indicate, or why my command line looks and behaves as it does, but in the end this worked for me where other checklists didn't. Maybe it will work for you too.

After a few seconds the boot process stops and displays this prompt:

root@(none):/#

I start typing "mount -o remount,rw /" but can only type part of the command before the system takes control and outputs this:

The cursor is dangling there, not yet back to a prompt, so I finish typing the command and hit Enter. The output looks unpromising --- it's got the word "errors" in it --- but I am returned to the prompt.

I try again and this time am able to complete the command, "mount -o remount,rw /". I press Enter and see the same output.

But I'm at a new prompt so I figure what the heck, let's try "passwd".

I enter "passwd my_user_name" and press Enter.

And lo and behold, I am prompted for my new password. I enter it, reenter it, and joy of joys, there's a message of success.

Back at a new "(none)" prompt, I type exit and hit Enter. From some checklists I tried, this is supposed to take me back to the Recovery Menu, but since I didn't see that screen on the way in it's probably asking too much to be taken "back" to it now :)

The boot process picks up for a few seconds, then gets hung up here:

After waiting a while, with no options I do a hard power down, figuring it's 50/50 if my new password survives.

On restart I let boot go thru the normal process. It takes longer than usual, but eventually gets to the gui log in screen. I enter my new password and ...

This immovable modal pops up: "Enter password to unlock your login keyring. The password you use to log in to your computer no longer matches ...."

Have I gotten this far only to be denied? I try my new password but of course it is not correct. I try a few more but of course they fail as well, b/c I don't know my old password! Now what?

And then I see it. A Cancel button, right there in the dialog box. I press it and voila, I'm in! Later I'll look into what the "login keyring" is, but for now I'll consider that the password issue is fixed. Hope this helps someone else out there!


Sound and sound applet disappeared and won't come back

Ok, I manage to solve it. I just installed the libido package and now the indicator-sound package installed with no errors. Maybe the system needed a reboot with the package uninstalled or something. If someone's having this problem, you can try:

sudo apt-get remove libido-0.1-0
sudo apt-get remove indicator-sound

Restart your computer (this is the part that seems to have solved it). And then reinstall both packages.

sudo apt-get install libido-0.1-0
sudo apt-get install indicator-sound

It's worth mentioning that, even after the reboot, the terminal kept reporting error messages when I tried to install  indicator-sound. But after I reinstalled libido manually, the indicator-sound installed without issues.


Why combine commands on a single line in a Bash script?

mkdir build && cd build && touch blank.txt

In Bash (and some other shells) && is a logical and, which means - if the previous command returns true the next command will be executed. There is also logical or ||. For example you can combine these two options in one statement:

mkdir /tmp/abc/123 && echo 'the dir is created' || echo "the dir isn't created"

Note, the construction cmd_1 && cmd_2 || comd_3 is not a substitute of the if; then; else statement, because no matter which of the preceding commands return false, the cmd_3 will be executed. So you must be careful about the circumstances in which you are using it. Here is an example:

$ true && false || echo success
success
$ false && true || echo success
success
$ false && false || echo success
success

As a rule rule of thumb, usually, when I'm using the cd command within a script, I'm putting a test whether the directory change is successful: cd somewhere/ || exit. More proper test is proposed by @dessert: if ! cd dir; then exit 1; fi. But in all cases as protection of script's failure it is better to use the set -e option as it is shown in the @mrks' answer.

mkdir build; cd build; touch blank.txt

; is a line delimiter and it is used when few separated commands are written in one line.

Note when ; or && and || are in use it is not mandatory to write the commands at on line - this is illustrated within the @allo's answer.

At all, IMO, there is not any special technical advantage/difference between writing the commands at one or at separate lines.

COMMAND="mkdir build && cd build && touch blank.txt"
eval ${COMMAND}

Here one or more commands (and their arguments) are grouped as value of a variable, and then this variable (argument) is converted to a command by the help of eval. Thus you will be able to change the command that will be executed multiple times within some script by changing it at only one place.

Let's say you need to change the way in which the file blank.txt is created, for example, you can change the relevant line in a way as this:

COMMAND="mkdir build && cd build && echo 'test' > blank.txt"

The actual eval's advantage over the usage of alias is when there re-directions, pipes, logical operators, etc. are in use.

In most cases you can use functions instead of eval when alias is not applicable. Also in case the variable contains only a single command, i.e. CMD="cat", we do not need eval, because Bash world-split will expand "$CMD" "$file1" "$file2" correctly.

Here is one example where eval was the simplest way to do some command automation: Tail the “in the last hour written lines from a log file” is it possible?
The previous version of this section, discussed within the comments is available here.


About dbus-daemon's activation parameter

You can use one or the other.

Read more about Upstart
Read more about Systemd

  Upstart is an event-based replacement for the /sbin/init daemon which
  handles starting of tasks and services during boot, stopping them
  during shutdown and supervising them while the system is running.   It
  was originally developed for the Ubuntu distribution, but is intended
  to be suitable for deployment in all Linux distributions as a
  replacement for the venerable System-V init.

With --activation=upstart your dbus-daemon will be activated with Upstart timings.
Otherwise your systemd (systemd is alternate boot manager) will calculate timings for your dbus-daemon.

Ubuntu uses Upstart years and years ago.
Systemd is default for these distributions: Fedora, Debian, openSUSE, Mageia, Gentoo.


I copied your list and compared it with the programms I have installed (Ubuntu 19.04). Then I removed every package that was makred "automatically" at my system. They will be installed on your system, too but marked as "automatically" too.

sudo apt install asymptote feynmf fragmaster inkscape latex-cjk-all latex-cjk-thai lyx lyx-common prerex python-all python python-bs4 python-chardet python-crypto python-cycler python-dbus python-gi python-html5lib python-idna python-keyring python-lxml python-matplotlib python-pil python-pkg-resources python-pyparsing python-secretstorage python-six python-subprocess32 python-tz python-xdg qbittorrent texlive-extra-utils texlive-formats-extra texlive-full texlive-lang-other texlive-music texlive-pstricks texlive-science texlive-xetex vprerex

That are all the programms you have to install. The "automatically" marked programms will follow. If you want to verify if the rest is installed you may run

apt list python-all-dev python-asn1crypto python-backports.functools-lru-cache python-cffi-backend python-cryptography python-dateutil python-dev python-enum34 python-ipaddress python-keyrings.alt python-numpy python-olefile python-pip python-scour python-setuptools python-tk python-webencodings python-wheel texlive-latex-extra texlive-pictures

and check if the rest was installed. If not, install each of the missing as "manually".


I've had the same issue, 3.5.1 is super buggy. I fixed the problem by getting 4.2.1 from the Qt Online Installer.


Reasons why not to update an Ubuntu version to a newer/older kernel version

I get your point but also share your friends preference to have a more recent kernel. Personally, I'm running a mainline kernel on Ubuntu 11.10 (built using the sources from kernel.org). This means that I'm responsible for security updates and that I won't have support from Ubuntu because I'm not running the stock kernel.

Usually, when the question whether to upgrade a kernel or not is raised, the answer would be "improvements to stability / security / hardware support". Now, your question seems to be about whole kernel series. Risks of using older kernel versions are pretty clear: unfixed security issues, less hardware support and other bugs that may affect stability or features.

When using an older kernel series than the Ubuntu version was created for (say 2.6.32 where Oneiric ships with 3.0) has other implications:

userspace programs that expect features that are only available in newer kernel versions. For example, solid-state disks support a TRIM parameter. Even if the mount program supports mounting programs with the discard option to enable TRIM, if the kernel has no support for it, it won't work. Now, this would then print an error about the unsupported kernel, but there could be another feature that is more important and assumed to exist by Ubuntu. The graphics stack, Xorg, depends strongly on features provided by the kernel. If the kernel is very ancient, the Xorg stack may not be able to fully utilize its features.

Newer kernel series can be gathered in various ways: user-maintained PPAs, kernel.ubuntu.com or directly from ubuntu+1's repositories on packages.ubuntu.com. A possible effect is that APIs have been changed, or otherwise, "default" behavior of certain parts. This could not be that disastrous, but programs that make strong assumptions about defaults may not work as expected. Example: relatime replacing noatime as default. More serious issues would be regressions that break hardware (wireless is a common nightmare). The stock Ubuntu kernels have been tested for hardware and when released, it's supposed to be the best kernel for most Ubuntu users.

New support for some features / hardware is not always good either. If a program or script expects that support for (...) is broken and therefore introduces a workaround for it, it may be incompatible with each other and break both. For example, Bumblebee+bbswitch currently disable the nvidia card. If a newer kernel version suddenly has excellent support for this hybrid graphics hardware, it may cause crashes.

I started with installing a newer kernel after the one from xorg-edgers broke my wireless and did not fully support my nvidia card with the nouveau kernel module. Wireless worked again and nouveau support was better, but a later upgrade made wireless unreliable again. And another later version solved it again. Well if you wish to live on the edge you have to live with that.


How to block a user from installing/uninstalling applications?

Don't give the user administrator rights. You need those to install or uninstall a program.


To  initiate the flask-api Yeoman generator run the command yo flask-api as regular user, not as root user.


remove unsuccessfully installed ubuntu 12.04

Boot into LiveCD of Ubuntu
Install gparted

sudo apt-get install gparted

Run gparted
Select the HDD containing your Ubuntu installation
Be very careful to select the partition containing your Ubuntu installation.
Check again that this is not your Windows partition
Delete said partition (there may be more than one, depending on your setup)
Begin installation of Ubuntu on newly available freespace.


How to create a non-nat access point with nmcli?

Your command is not correct.
Try this

nmcli c add type wifi ifname wlan0 con-name test autoconnect no ssid test
nmcli connection modify sentinel 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared
nmcli connection up test


How do I download vlc media player? E: Unable to acquire the dpkg frontend lock

dpkg is used by the automatic updates, use the following command to interrupt the process:
sudo pkill apt
sudo pkill dpkg
sudo dpkg --configure -a


As can be seen from the output of dpkg --print-foreign-architectures, you have a bunch of invalid architectures added, for some reason. Remove them:

sudo dpkg --remove-architecture x8664
sudo dpkg --remove-architecture x8-64
sudo dpkg --remove-architecture x864

In future, do check what you're adding.


getent group not returning domain groups

You need to apt-get install libnss-winbind libpam-winbind. Its make some links in you system to force getent through winbind. worked for me ubuntu 16 samba 4.3.11


Configure your editor with -w option, also add -s to run a new instance of gedit on each call:

git config --global core.editor "gedit -w -s"

or (because of this bug in gedit) use a call with  long arguments:

git config --global core.editor "gedit --wait --new-window"


Increasing the filesystem and partition size - vgdisplay "no volume groups found"

You have not installed ubuntu using LVM partitioning.
If you had used LVM then df command should return something like

$ df -h
Filesystem                  Size  Used Avail Use% Mounted on
/dev/mapper/localhost--vg-root  7.0G  1.7G  5.0G  25% /
none                        4.0K     0  4.0K   0% /sys/fs/cgroup
udev                        232M  4.0K  232M   1% /dev
tmpfs                        50M  356K   49M   1% /run
none                        5.0M     0  5.0M   0% /run/lock
none                        246M  4.0K  246M   1% /run/shm
/dev/vda1                   236M   75M  149M  34% /boot

Unfortunately there is no easy way to increase main partition. You could:

Boot from some live-cd to redefine your partitions (Be careful of your data)
Reinstall using LVM partitioning


tomcat7 server - can't install into Eclipse Kepler?

It's a common bug in Eclipse. To resolve it:

Close eclipse
In {workspace-directory}/.metadata/.plugins/org.eclipse.core.runtime/.settings, delete:
org.eclipse.wst.server.core.prefs and org.eclipse.jst.server.tomcat.core.prefs files
Restart Eclipse

That's all. You can check this source which refers to this other source.


How to extract audio from video ?? (Not converting video into audio file ???)

You can use avidemux.

Install it command line with:

sudo apt-get install avidemux

You can rip the audio from the video file.

In the toolbar, click on the top left folder icon and load the video file from your computer.

Click on the Audio option on the left side panel and choose the audio codec you want to use

Now, click on the “Audio” option in the menu bar and select “Save” to save the audio

If you prefer a CLI give ffmpeg a try

ffmpeg -i input_file -vn -acodec CODEC output_file

CODEC= libmp3lame if output .mp3

CODEC= libvorbis if output .ogg

example:

ffmpeg -i ~/Desktop/video.mp4 -vn -acodec libmp3lame audio.mp3

In case you don't have ffmpeg installed:

sudo apt-get install ffmpeg


Ubuntu 16.04 keeps asking screen password after installation of Radeon graphics driver

Ajay,

I experienced exactly the same but wasn't able to fix it properly so I went back to the original situation. I have a Firepro v4900 card.
I used the linux-image-4.4.0-45 to boot from;

My solution thus far was to reboot using the older kernel (43) at Grub boot screen. I uninstalled the 45 image (and thereby the amd driver) using apt-get remove or synaptic. Run a grub update.
Reboot and it should by default boot back in 43.
Now reinstall the 45 image. Don't touch the amd package.... when I retried I reproduced what I saw before.... trouble!

My 2ct

Alex


Just click on forbidden Icon on top bar, select "Show updates" and follow screen instructions:

by right-click on it, this error message written in it:

  An error occurred, please run Package Manager from the right-click
  menu or apt-get in a teminal to see what is wrong. The error message
  was :'Error:BrokenCount>0'. This usually means that your installed
  packages have unment dependences

Also you can use command instead: sudo apt-get install --fix-broken


The coreutils is marked Essential: yes, so it's always included in an installation, and dpkg will warn you in a rather non-ignorable way if you try to remove it. Packages do not have to declare dependencies on essential packages, unless they need a particular version (for example, dpkg (another essential package) depends on coreutils (>= 5.93-1) in Ubuntu 10.04).


Make message in syslog message if a program is opened

On my phone now but you can use the logger command:

logger "message to display including $variables`


How To Safely Remove Hardware From USB Ports?

Ubuntu's default file manager, Nautilus, shows an eject button on removable devices.

Below you see a screenshot section of Nemo's sidebar when I have my Sony E-reader plugged in. Note the eject button right next to "READER".

You can also eject a drive by right-clicking on its icon in the launcher, and click "Eject", as in the image below. E-readers have a Flash Drive icon most of the time.


How to configure bitcoin-core and start it from the console?

Well, I clicked "prune":

and clicking "edit configuration file" brings up gedit with file and path:
nicholas@mordor:~$
nicholas@mordor:~$ cat snap/bitcoin-core/common/.bitcoin/bitcoin.conf
#test
nicholas@mordor:~$

not sure how that helps me run bitcoin-core from the console, however.


Booting Ubuntu from USB not keeping time setting or user info

I have never used RUFUS, but it is my understanding is it creates a bootable Live USB not a full Ubuntu system.

If this is the case, the USB is to be used for trying out Ubuntu on your computer to find out if your computer and Ubuntu would work together. The USB can also be used to install Ubuntu in your hard disk. Think of this USB like the Windows 10 installation DVD. Like the DVD, any changes you make will be lost when you turn the computer off or reboot.

There are two ways to get around this:

Persistence

A live USB with persistence has a virtual file system in a file that stores the personal information or documents you save.

See https://www.howtogeek.com/howto/14912/create-a-persistent-bootable-ubuntu-usb-flash-drive/ for more information

Full install

A full install of Ubuntu in an USB involves using two USB drives, one to install from and another to install to. The process is similar to installing to the internal drive.

See How do I install Ubuntu to a USB key? (without using Startup Disk Creator) for how to do this.

You may also find What would be the differences between a persistent USB Live Session and a installed Ubuntu in a USB drive? useful.


Can I choose what language or software to install with the 12.04 DVD?

The default Setup CDs use the language you select in the setup dialog. After installation you can add or remove whatever you need (including language packs).
If you use an alternative Setup CD you should be able to customize the installation much more during setup but i don't remember if you can go down to individual package selection with these as well. At least you can select groups of packages like LAMP and so on.


systemd has two "modes": system and user. When systemd is running as a system instance, then everything is, by default, run as root. When systemd is running as a user instance, then everything is run as the user that started the systemd instance. In addition, a limited set of variables are set for services started. For the system instance, only LANG and PATH are set by default (at least on Ubuntu 15.04). For the user instance, in addition to the previous variables, HOME, LOGNAME, SHELL, and XDG_RUNTIME_DIR are set.

In your case, based on the output of the process, the process is meant to be run under a user's account, not as root. The proper fix would be to move the service file to either /etc/systemd/user or ~/.config/systemd/user, so that the service would be started under the user's systemd.


How can I invoke a user switch from the command line?

gdmflexiserver as a legacy option to provide the greeter switcher service during the transition between GDM and LightDM.

This has now been dropped from 12.04.

The replacement command is:

dm-tool switch-to-greeter

Other useful dm-tool options (dm-tool --help):


Can't use two network interfaces at the same time

Configuring the output of ifconfig and the comments given to my first answer, I think that the problem is related to way you configure your NIC's in /etc/network/interfaces.

As you don't have any specific configuration for eth1 in /etc/network/interfaces, I suppose that your modem is giving to your server the IP info via DHCP. As per the route ouput, you get your default gateway pointing to the modem so to Internet.

But on your /etc/network/interfaces file for the eth0 you have also a default gateway configured (statement gateway 172.16.1.254).

You cannot have two default gateway on a system. The assignment of the default gateway on eth1 disable the static configuration of eth0, reason why there is no IP for eth0 in the ifconfig output and why Internet works and the internal network no more.

You will have to remove the line gateway 172.16.1.254 and try again.

By doing so, of course, if you have more than one subnet on the internal LAN you won't be able to reach them anymore.
Unless you configure static route towards all of these subnets on your server :

  sudo route add -net A.B.C.D gw 172.16.1.254

you can add the route command in a script saved under /etc/network/if-up.d to be run each time an interface goes up.


Evgeniy is indeed correct. I experienced the same problem on my Ubuntu 14.04 laptop, but it could be fixed by uninstalling the old Skype and installing a new one. To be precise, I did the following:

1.) Open Synaptic Package manager (I guess this also works with the Ubuntu Software Center) and type Skype in the search window. There were two packages installed. I marked both of them for complete removal.

2.) Go to www.skype.com and click on "Download Skype". The website proposes a .deb file, which I downloaded.

3.) Double-clicking on it opened the Ubuntu Software Center, where I hit the install button.

4.) Search for Skype in the Ubuntu-search window. Open it and log-in with the usual account settings.

As Fotis Skodras pointed out, Skype no longer works for 32bit systems. At home, where I have a 32bit Linux Mint, I've replaced Skype with Jitsi:
https://jitsi.org
It allows video conversation through the browser without installing anything. As there are shortcomings (e.g., one does not have a list of contacts), I was wondering if there are other free programs, with which Skype could be replaced on 32bit Linux systems?


How to "convert" running Ubuntu server to boot able ISO

After long research I found the only working solution is using Mondo Rescue: http://www.mondorescue.org/
This does not "Remaster" the OS but, let you reinstall it on any new HD and hardware.

For now, this is my best solution.


No.

What you have to do is save the work somewhere you can write to, e.g. /tmp, exit the program, run the program with sudo  x, and read the data from /tmp.

Or, in vi or vim, you can do :w | sudo tee root-writeable-file


Donwload and install with the steps below:

wget  https://launchpad.net/nitrotasks/trunk/1.5.1/+download/nitrotasks_1.5.1.tar.gz
tar xf nitrotasks_1.5.1.tar.gz
cd quickly_trunk
sudo checkinstall --pkgname nitrotasks python setup.py install

And to prevent your error in xfce, install gir1.2-unity-5.0

sudo apt-get install gir1.2-unity-5.0

Your binary is in

/usr/local/bin/nitrotasks

a desktop file is also available, run the app via Nitro

/usr/local/share/applications/nitrotasks.desktop

Check all other files with

dpkg -L nitrotasks

Remove it with

sudo dpkg -r nitrotasks

or with

sudo apt-get remove nitrotasks


How to configure ubuntu for lightweight low-memory usage?

Kubuntu is really Ubuntu with a KDE desktop instead of GNOME. The lightest I know of is Lubuntu (lubuntu-dektop package) this is still running the same thing underneath Kubuntu and normal Ubuntu just with a lighter desktop.


Overwrote the desktop folder to a file. How can i reverse it?

The desktop configuration is stored in ~/.config/user-dirs.dirs. In your case the line with

XDG_DESKTOP_DIR="$HOME/Desktop"

is most likely wrong. So move the Desktop to somewhere else and create a new Desktop folder.

$ mv ~/Desktop ~/Desktop_backup.pdf
$ mkdir -p ~/Desktop

Logout and login again, you should be fine.


How can I reinstall Apache HTTPD after deleting some of the configuration files?

To replace configuration files that have been deleted, without purging the package, you can do

sudo apt-get -o DPkg::Options::="--force-confmiss" --reinstall install apache2

To fully remove the apache2 config files, you should

sudo apt-get purge apache2

which will then let you reinstall it in the usual way with

sudo apt-get install apache2

Purge is required to remove all the config files - if you delete the config files but only remove the package, then this is remembered & missing config files are not reinstalled by default.


Need help with: "file type Gzip archive is not supported"

The file is surely gzip-compressed.

Uncompress it using command line:

craft@engine:~$ gunzip thefile.gz

Note: The original file will be removed and replaced by the uncompressed one.

If it says something like program not installed or unknown command, install it via:

craft@engine:~$ sudo apt-get install gzip


FN + F7 don't work (before allowed me to turn on/off display)

You can try setting a shortcut in keyboard settings. Go to System Settings > Keyboard and click on the Shortcuts tabs. Click on Custom Shortcuts and then click on the + (plus) symbol. Give the shortcut a name and in the command section add

xset dpms force off

This command switches the LCD off until you move the mouse or press a key, just like when the laptop is left idle.

Now here is the bit that may or may not work: Click on your new shortcut where it says Disabled and press your key combination FN + F7. Hopefully it will recognise the combination and FN + F7 will now execute the command to switch the LCD off.


It's possible by any USB, but i don't think you will be able to copy files using live USB.

Ubuntu will auto mount your USB and show in the Home Folder Devices list.Copy and paste files just like you do in Windows or other OS.


IPv6 EUI-64, how to activate privacy extension on Ubuntu Server 20.04

As documented on https://netplan.io/reference, you can specify ipv6-privacy: true to enable IPV6 privacy extensions.


Nautilus File Manager closes immediately I open it

Solved the problem by:
1) Creating a Ubuntu 20.04 ISO usb stick (from my laptop);
2) Using it (the ISO usb-stick) to wipe my pc hard-disk and re-install Ubuntu. Luckily I had backed-up my hard-drive before "playing around" so could restore my home folder and all subdirectories. Unfortunately some things have changed and I have as yet been unable to solve the issue - for example, I had to re-install Exodus (crypto wallet) but I can't get it to open!


Rhythmbox isn't seeing all of my music files

I had a similar problem with Rhythmbox. I don't have nearly the number of files you have, but it was not seeing new files or changed files. I did the following:

In Preferences --> Music, I unchecked "Watch my Library for new files".
Completely closed Rhythmbox (important).
Renamed the rhythmbox database - ~/.local/share/rhythmbox/rhythmdb.xml
Started up Rhythmbox and checked "Watch my Library for new files".
It started checking my collection and found everything.

It seems that my problem was an issue with the configuration file. I had reinstalled Rhythmbox, but had not done a complete uninstall. This left a corrupted configuration file in my Rhythmbox sub-directory. You may want to try this if it's possible that you have a corrupted configuration file.


Is there a way to see my server's mediawiki version using the terminal?

Visit Special:Version, or fetch the equivalent API if you really want to use it from the terminal. E.g.

curl -s 'https://en.wikipedia.org/w/api.php?action=query&meta=siteinfo&format=json' | jq '.query.general.generator'


make a bootable usb for windows 8.1 recovery in Ubuntu

The best choice for create a bootable USB in Ubuntu is multisystem

This tool allows you to create an USB with multiple bootable OS. (You can add Ubuntu, Debian, Windows XP, Windows 7...

The tutorial on the official page is very well explained on how to do this:

MultiSystem: Create multiboot usb on linux

I will make a resume of the steps you will need to follow:

Download multisystem
Install multisystem
Execute multisystem and choose your USB to use as bootable USB
The program will ask you to format the USB in FAT32
After the installation a very sample GUI will open and you only need to drag&drop your .iso into the window


Mounting partitions in a cloned image of a drive

You should be able to mount all primary and logical partitions, for example with kpartx, in your case it seems to be partition #1 and partition #5.
You cannot mount an extended partition. It is a container for logical partitions (inside the extended partition).
There is a detailed description in my answer to a similar question,

Mount dd image for my USB

Workaround

Unless someone can show how to mount a drive or partition with encryption, for example an Ubuntu 'encrypted disk', LVM with encryption, I can suggest the following workaround.

Get a new drive that is big enough, at least as big as the uncompressed image file and clone from the image file to the new drive.
If things work well, you can replace the old drive and boot from the new drive.
Otherwise you should be able to mount the partitions, even if it is more complicated due to the encryption.

Booting into an ISO full drive backup


getting error: bash: ./autogen.sh: No such file or directory

The syntax you are using

./name-of-file

runs an executable in the current working directory. If you cannot see name-of-file with ls -a it will fail with the error you saw, and if it does not have execute permission for the user running the command, it will fail with permission denied (if there are no x bits set at all, and you try running it with sudo, the fail message will be command not found)

The program you are trying to compile uses the cmake method to set up the build environment, and there is evidently no autogen.sh (or configure) script to run.

I just successfully built this release from the GitHub page you linked to. It was straightforward, and I didn't encounter any problems.

First you need to install all the dependencies for the build. I'm not sure if all this is actually required, but you mentioned needing some of it anyway...

sudo apt install build-essential automake dh-autoreconf libusb-1.0-0-dev cmake g++

make a directory at the location shown in your screenshot (open a terminal and cd /ARMToolchains/stlink-master if necessary... why aren't you building in your home directory? I recommend moving the whole directory to $USER, but anyway...) the basic method is

mkdir build
cd build
cmake ..

When that exits successfully, you can run

make

If that exists successfully, you may run

sudo make install

To move the binaries to the correct locations. If not, you can run them from the current directory. If you can't get the version you've already downloaded to build (this happens quite often when cloning the master as it might be in the process of getting tweaked), then download one of the releases (like the one I linked above) and try again.


Need help getting and intalling zlib1g-dev on Ubuntu 14.04. Error Couldn't find any package by regex

Although apt-get obtains packages from online repositories, the actual URLs are resolved behind the scenes using information from the /etc/apt/sources.list file and any additional files in /etc/apt/sources.list.d/

Hence to install a package using apt-get, you should specify only the package name: in this case, that's just sudo apt-get install zlib1g-dev


Ubuntu 16.04.3: failed to start raise network interfaces

Reason

The problem was caused by Predictable-Network-Interface-Names from systemd/udev.
Possible solution

According to this source you can either:

You disable the assignment of fixed names, so that the unpredictable kernel names are used again. For this, simply mask udev's rule file for the default policy: ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules
You create your own manual naming scheme, for example by naming your interfaces "internet0", "dmz0" or "lan0". For that create your own .link files in /etc/systemd/network/, that choose an explicit name or a better naming scheme for one, some, or all of your interfaces. See systemd.link(5) for more information.
You pass the net.ifnames=0 on the kernel command line

Applied solutions

I did create a new file 10-rename-network.rules in /etc/udev/rules.d/ and added the following content to it:

SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="ff:ff:ff:ff:ff:ff", NAME="eth0"

where

eth0 = desired network interface name, used in /etc/network/interfaces
ff:ff:ff:ff:ff:ff = hardware mac address of the network device

I'd recommend rebooting after completing this to make sure the change is sticky.


boot problem with ubuntu 13.10 or 14.04 on linux

Try a quick re install of Ubuntu along side your old system. Copy the old data from your other system over and use that system instead.


How to continue the previous work after pressing Ctrl+C

In short no... When you press Ctrl+C a signal is sent to the process, and it kills the process that is running in your terminal. You can't resurrect it. All you can do is run it again.

The best you can do is start to retrain your model by running the command again

EDIT:

As was discussed in the comments, my oversight may have led to an incorrect answer! After a SIGTERM signal, it is possible to resume the process

SIGKILL: Terminates a process immediately. This signal cannot be handled (caught), ignored or blocked. (The "kill -9" command in linux generates the same signal).

SIGTERM: Terminates a process immediately. However, this signal can be handled, ignored or caught in code. If the signal is not caught by a process, the process is killed. Also, this is used for graceful termination of a process. (The "kill" command in linux if specified without any signal number like -9, will send SIGTERM)

So I will defer to dessert's comment left on your original post more information is necessary. Thus I will leave the answer 'no' until further information is provided


Run command after system start automatically

Put your command at last of /etc/rc.local but before exit. Or add your command to ~/.profile file or /etc/profile file

Add these lines (to give your user root access without password) to sudoers file (/etc/sudoers)  as :

Execute sudo gedit /etc/sudoers in terminal and add following lines to it at the end of "%admin ALL = (ALL) ALL"

user_name ALL = (ALL) NOPASSWD:ALL

Replace user_name with your user name


Ubuntu first time user -desktop or server?

The desktop and server tasks are the same OS, the choice is just about what optional software you'd like the installer to start you off with.  It is a choice of whether you want to install software suitable for desktop, such as a desktop environment (like Windows), or software suitable for a server, which will have no desktop environment and use a prompt (like DOS).

If you choose one it is still possible to alter it later.  And it is possible to have a desktop environment installed but then also install server software (like web servers, etc).


Cannot install ia32-libs on a 64 bit Ubuntu installation

Install the dependencies as usual, but append :i386 to it as in:

sudo apt-get install libgl1-mesa-glx:i386

If you get an impossible situation, try to install the 32-bit C library first, then the other packages:

sudo apt-get install libc6:i386

See also Does the multiarch feature in 11.10 mean the death of force--architecture installs?


How to make my maximum screen resolution to be detected by Ubuntu?

It is probable that your graphic driver is not detecting that resolution. Follow the instructions below; it might help. It helped me in my Ubuntu(using unity) which installed in my desktop that has a dedicated AMD Radeon 5570HD(which uses Gallium REDWOOD drivers i.e the default open source drivers). First type this in your terminal(You can open terminal with Ctrl+Alt+t) :-

cvt 2048 1536

You will get something like this :-

# 2048x1536 59.95 Hz (CVT 3.15M3) hsync: 95.45 kHz; pclk: 267.25 MHz
Modeline "2048x1536_60.00"  267.25  2048 2208 2424 2800  1536 1539 1543 1592 -hsync +vsync

Now do this:-

xrandr --newmode "2048x1536_60.00"  267.25  2048 2208 2424 2800  1536 1539 1543 1592 -hsync +vsync

Then this:-

xrandr

You will get an output similar to this(maybe not exactly this):-

Screen 0: minimum 320 x 200, current 1368 x 768, maximum 8192 x 8192
DisplayPort-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 disconnected (normal left inverted right x axis y axis)
DVI-0 connected primary 1368x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1024x768       60.0
   800x600        60.3     56.2
   848x480        60.0
   640x480        59.9
   1368x768_60.00   59.9*

Here the connected monitor is DVI-0 according to the above output. So one would do this next:-

xrandr --addmode DVI-0 2048x1536_60.00

Instead of DVI-0 you should type in whichever is your connected monitor. This should work. I am assuming from your description above that 2048x1536 works on your monitor. If it doesn't you can try whichever resolution will work for you.

Now if you want this to take effect every login without having to type all of this again, follow the instructions below.

Open gedit or any other text editor. Type the following:-

#!/bin/sh
xrandr --newmode "2048x1536_60.00"  267.25  2048 2208 2424 2800  1536 1539 1543 1592 -hsync +vsync
xrandr --addmode DVI-0 2048x1536_60.00
xrandr --output DisplayPort-0 --off --output DVI-0 --mode 2048x1536_60.00 --pos 0x0 --rotate normal --output HDMI-0 --off

You must edit the last line according to your PC. Save the above file as lightdmxrandr.sh in /usr/bin .Then make it executable by this command:-

sudo chmod a+x /usr/bin/lightdmxrandr.sh

Then open /etc/lightdm/lightdm.conf(If this file is not there then read the "PS" below) by the command:-

sudo gedit /etc/lightdm/lightdm.conf

You can use your own text editor instead of gedit. The file must contain something like this:-

[SeatDefaults]
user-session=ubuntu

Add the below lines to the file:-

greeter-session=unity-greeter
display-setup-script=/usr/bin/lightdmxrandr.sh
session-setup-script=/usr/bin/lightdmxrandr.sh

Now save the file and reboot. You must have your desired resolution both in the login screen and your desktop session. This should most probably work. But if it doesn't then read on and follow the below instructions.

Open a terminal(if you are stuck on the login screen and you can't open a terminal then drop into a tty with Ctrl+Alt+F1) and type in the following :-

sudo nano /etc/lightdm/lightdm.conf

This will open the lightdm.conf file which we edited above. Now remove the below line alone from the file:-

session-setup-script=/usr/bin/lightdmxrandr.sh

Press Ctrl+x to exit the file and then press y to save it before exit which it will prompt you to. Then type :-

sudo reboot

to reboot your PC. This should get you into your desktop(If it doesnt read "PS" below). Now go to System Settings>Displays. You might find your desired resolution there(This might happen since we ran the script above with lightdm.conf). Then select that resolution and reboot to have your desired resolution. But if you don't find your desired resolution there, you may try this.

Open Startup Applications from dash. This should give you something like this(but not exactly like this) :-

Press Add. You will get this :-

Give some name you like. Then press browse and select the script which we created(Remember that we saved it as /usr/bin/lighdmxrandr.sh ). If you want give a description. Then press Add. Before closing Startup Applications check if the entry you just added has a tick mark next to it. Now reboot your PC. This should get you the desired resolution in both the login screen as well as in the desktop.

PS:-

If /etc/lightdm/lightdm.conf ain't there then you must be having /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf . Edit this file instead of lightdm.conf .
If none of the above works and you are stuck at login then drop into a tty and type :-

sudo nano /etc/lightdm/lightdm.conf

Now remove all the editing we did and press Ctrl+x and then press y to save the file. Now type :-

sudo reboot

This should get you back to your desktop, but, of course, without your desired resolution and with your default resolution. Then try System Settings>Displays and check if your desired resolution is there(This might happen since we ran our script with lighdm.conf ). Now select that resolution and reboot. You will get your desired resolution now.

Credits go to these three questions:-

How can I get my monitor's maximum resolution without the proprietary AMD graphic driver installed?
Why don't my lightdm.conf edits affect my desktop screen resolution?
How can one run a shell script just before the desktop session begins?


How to restore missing calendar data from Lightning/Thunderbird

I realize that this is an old question, but I was restoring lightning data after an OS crash. This is what I did to get my calendar working:

Close Thunderbird if it's running
Copy all files from backup profile directory's calendar-data subdirectory into your new profile directory. Likely local.sqlite is the only file needed, but I had a few others so I copied them over as well.
Open up prefs.js from your backup and look for lines like:

user_pref("calendar.list.sortOrder", "3bf851bb-ece1-48df-8de3-c814c05e5fe7");
Open up the same file in your new profile directory and find the same line. If it has a different identifier as its value, replace all occurrences of it with the value from the backup file (there should be 6) and save that file.
Reopen Thunderbird


Connecting a Client Laptop to a AP-mode configured Laptop

I figured out what was going wrong. I did not have a DHCP server running on my host machine, hence the client could not get an IP address.


The solution to this problem is in wiki.ubuntu.com/Bumblebee.

Easily done by running the following command:

sudo apt-get install bumblebee bumblebee-nvidia primus linux-headers-generic
sudo reboot


How to get a higher resolution than 1920x1080?

So I have ended fixing this issue by plugging in the monitor via display port instead of using an hdmi cable.

It's still interesting that on Windows, via hdmi I was able to get resolutions up to 2560x1440.


Restore natural scrolling in Ubuntu 16.04 on Dell XPS 13

Edit the file /usr/share/X11/xorg.conf.d/40-libinput.conf or 90-libinput.conf depending on your HWE stack.

Add to the end of the touchpad section of the file a line

Option "NaturalScrolling" "True"

and restart the session.

The section should look this way:

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

You can also add Option "Tapping" "True", if you want to enable tap to click feature.


How to migrate from PHP 5.5.* to PHP 7.0.* and upgrade the entire LAMP stack on Ubuntu Linux 12.04 LTS(64-bit) operating system?

PHP7 has not yet been released as official Ubuntu package. If you are not in a hurry or you do not have too much time, I would just suggest that you wait for 16.04 which is due in April, and it will hopefully have PHP7 available.

You should, in the meanwhile, migrate from 12.04 to 14.04, so you are ready to update to 16.04 when it comes out. Direct migration from 12.04 to 16.04 will probably not be supported, as it has never been in the past.

If, on the other hand, you just want to try PHP7 now, you need to use Ondrej Sury's ppa. But I still believe that 12.04 is too old for that to work, and that you should upgrade first.

Look for a guide about that, you will find plenty of resources.

E.g. https://www.digitalocean.com/community/tutorials/how-to-upgrade-to-php-7-on-ubuntu-14-04

Have fun.


Make service monit possible for a particular user to start without prompting for password on Ubuntu 16.04

I found the solution!

Add a file, /etc/polkit-1/localauthority/50-local.d/monit.pkla with these contents

[monit service]
Identity=unix-user:user1
Action=org.freedesktop.systemd1.manage-units
ResultAny=yes
ResultInactive=yes
ResultActive=yes

Now user1 can start monit without problems


Execute script after successful network connection

Stephen Boston mentioned you could use a systemd service to automate it.

Create a service file under /etc/systemd/system and name it FILENAME.service

Paste this into your file:

[Unit]
Description=YOUR DESCRIPTION
Requires=network-online.target
After=network-online.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/YOUR/PATH/TO/SCRIPT

[Install]
WantedBy=multi-user.target

Type=oneshot means it will only be executed once.

The line requires=network-online.target states that the service needs the service network to be online and only executes after=network-online.target

You can see the service (test.service) started after the network.service

To finish it up you need to enable the service with the command

sudo systemctl enable FILENAME.service

Check if your Service is enabled

sudo systemctl is-enabled FILENAME.service

You can ofcourse manually start or stop the service with

sudo systemctl start/stop/restart/status FILENAME.service

TIP: Pic was created with systemd-analyze plot > output.svg


Ubuntu One file sync pause/resume for large files

Although there is no specific pause/resume in ubuntu one. Starting with 11.04, it will start uploading where it left off after a disconnect. Large files should continue where they left off. You can disconnect the client from the command line, or by using the Ubuntu One Control Panel.

This can be seen by the output of u1sdtool --current-transfers and disconnecting and reconnecting... Here's an example with an ISO:

john@Monolith:~/.cache/ubuntuone/log$ u1sdtool --current-transfers
Current uploads:
  path: /home/john/Ubuntu One/precise-dvd-amd64.iso
    deflated size: 1611418705
    bytes written: 9506000
Current downloads: 0
john@Monolith:~/.cache/ubuntuone/log$ u1sdtool --current-transfers
Current uploads:
  path: /home/john/Ubuntu One/precise-dvd-amd64.iso
    deflated size: 1611418705
    bytes written: 17598000
Current downloads: 0
john@Monolith:~/.cache/ubuntuone/log$ u1sdtool -d
john@Monolith:~/.cache/ubuntuone/log$ u1sdtool --current-transfers
Current uploads: 0
Current downloads: 0

john@Monolith:~/.cache/ubuntuone/log$ u1sdtool -c

.... After a minute or two...

john@Monolith:~/.cache/ubuntuone/log$ u1sdtool --current-transfers
Current uploads:
  path: /home/john/Ubuntu One/precise-dvd-amd64.iso
    deflated size: 1611418705
    bytes written: 39760920
Current downloads: 0


How can I change the GNOME-Shell theme manually?

First you need to get hold of a theme, if you don't got one you can find one here.
After you downloaded the theme, unzip it to "/usr/share/gnome-shell/theme".
Then you can reload gnome-shell by ALT+F2 and typing gnome-shell --replace
Or just log out and back in again.

Hope it helped.


How to remove access point / hotspot in Ubuntu?

Check if your network connection has the same name as your SSID.

They are different things, the SSID is the name that appears in the menu when you connect and it is the name you chose for the connection.
However, on the 'Edit connections' menu, the one that appears is the network connection name and  not the name you actually expected.
So check if you don't have connections called like 'wired connection 2' or 'wired connection 4' (ubuntu gives it random names like that).
If you have one of those that you don't know the provenience of then click on edit, and check if it has the SSID name of the network you want to get rid of. If you do find it, delete it.


How to set both dual cores to userspace governor

You don't normally set it to userspace manually; you run a user space governor and it takes over.  What userspace governor are you wanting to run and why?

As for why it keeps changing back, you must be running another program that is changing it.


Result of

gsettings get org.gnome.desktop.wm.preferences button-layout

should be 'appmenu:minimize,maximize,close'

if not

gsettings set org.gnome.desktop.wm.preferences button-layout appmenu:minimize,maximize,close


Cannot transfer files to the PC through Bluetooth

Launch Personal File sharing Preferences

and enable the options below  see image


Bash : rename files (1 per folder) with folder's name

You can test this:

mkdir epubs

for f in */*.epub; do
  mv "$f" epubs/"${f%% *} - $(basename "$f")"
done


How to disable "on mouse stop auto click"

For Ubuntu 11.10 and later:

The setting is in Universal Access, Pointing & Clicking tab, Hover Click. Set it to off.


Get the default Firefox profile directory from bash

Try grep 'Path=' ~/.mozilla/firefox/profiles.ini | sed s/^Path=//. Default profile folder name is stored in profiles.ini. This will work fine while you've got single profile.
If you have more than one Firefox profile then the file format changes, so extracting the folder name becomes more tricky. Here's the script to do that:

#!/bin/bash

cd ~/.mozilla/firefox/
if [[ $(grep '\[Profile[^0]\]' profiles.ini) ]]
then PROFPATH=$(grep -E '^\[Profile|^Path|^Default' profiles.ini | grep -1 '^Default=1' | grep '^Path' | cut -c6-)
else PROFPATH=$(grep 'Path=' profiles.ini | sed 's/^Path=//')
fi

echo $PROFPATH

This script will work in both cases, it selects the appropriate method depending on the amount of profiles. Works in OSX, too.


default username and password for ubuntu12.04 LTS image

I believe you should be able to connect directly to an instance with the keypair you have used, when you booted the instance. Try:

  ssh -i /your_keypair\ root@/ip\

(don't forget to chmod 700 your keypair, or you won't be able to use it)

Other option is to get a testing cirros image up and running it has credentials:

  Username: cirros
  Password: cubswin:) (with that smiley)

There is a how-to with a link for cirros image here:
Registering Virtual Machine Images


How to make Nautilus list `..` for parent directory in all folders

You can get a type-able address bar by pressing CtrlL, where you can enter a relative or absolute path (with completion), and press Enter to navigate to that path. If you want to see the breadcrumb, press CtrlL again.


No sound in .mkv after upgrade to Ubuntu 14.04

I had the same problem in VLC today.
I just went into:

Tools > Preferences > Audio

Then I had to change output module to

ALSA audio output

Thats fix my problem in Ubuntu 12.04, VLC 2.0.8


Ubuntu 12.04 usb installation problem - login page

The liveCD username and password, by default, are:

Username: ubuntu

Password: ubuntu


Ubuntu 12.04 (Wubi) not starting - root.disk corrupted

Sometimes the root.disk, the virtual partition that Wubi uses to boot, gets corrupted. This is a file that lives in the \ubuntu\disks\ directory. If Grub (inside wubildr) cannot mount the root.disk, it cannot show the grub menu (which is stored on the root.disk) and then it just drops you to a grub prompt to await further instruction.

There is nothing you can do from the grub prompt until you've figured out the problem with the root.disk and, odds are, there is NTFS corruption. It's fairly common, for example, if you've performed a hard shutdown or reboot. In some cases, the reason isn't clear.

What you need to do is to run chkdsk /f (or /r) from Windows on the drive you installed Wubi. If you installed on the C:\ drive this will require a full restart.

To run chkdsk on Windows 7 (the first checkbox corresponds to chkdsk /f and the second to chkdsk /r:

If prompted, restart the computer and boot into Windows to complete the chkdsk making sure not to 'Hit a key' to abort it.

After that, check the ubuntu\disks\ directory to make sure the root.disk is still there. In some cases, the ubuntu\disks\ directory itself is no longer present. If either are missing, you need to look for them as chkdsk will often recover corrupted files/directories to hidden folders named \found.000, \found.001 etc. These are hidden and protected OS directories by default (Windows 7) so they won't show up in Explorer. I find it easiest just to use the Command prompt.

To do this, right-click on CMD.EXE and select "Run as administrator". Change to the drive the \ubuntu directory is located on, and search for the hidden \found.??? directories.

e.g. if the root.disk is missing, you're looking for a file > 5GB in size. If you know what size your install was it helps. In this case, it's 15GB

C:\>dir /a:h
C:\>cd \found.000
C:\found.000>dir
 Volume in drive C is OS
 Volume Serial Number is B4B7-99A8

 Directory of C:\found.000

19/07/2011  02:02 PM    15,000,000,000 file0000.chk
               1 File(s) 15,000,000,000 bytes
               0 Dir(s)  222,258,069,504 bytes free

C:\found.000>move file0000.chk \ubuntu\disks\root.disk
        1 file(s) moved.

If the whole \ubuntu\disks directory is missing, you're looking for a directory named dir0000.chk, and inside that you'll find the correctly named root.disk and swap.disk, so you can just move the directory back in place:

C:\>cd \found.000

C:\found.000>dir
 Volume in drive C is OS
 Volume Serial Number is B4B7-99A8

 Directory of C:\found.000

19/10/2012  04:51 PM    <DIR>          .
19/10/2012  04:51 PM    <DIR>          ..
19/07/2011  02:02 PM    <DIR>          dir0000.chk
               0 File(s)              0 bytes
               3 Dir(s)  222,258,069,504 bytes free

C:\found.000>dir dir0000.chk
 Volume in drive C is OS
 Volume Serial Number is B4B7-99A8

 Directory of C:\found.000\dir0000.chk

19/10/2012  04:51 PM    <DIR>          .
19/10/2012  04:51 PM    <DIR>          ..
24/02/2012  12:22 AM    <DIR>          boot
06/11/2012  09:28 AM    13,000,000,000 root.disk
15/11/2011  09:28 PM       268,435,456 swap.disk
               2 File(s) 13,268,435,456 bytes
               3 Dir(s)  127,904,968,704 bytes free

C:\>move dir0000.chk \ubuntu\disks
        1 dir(s) moved.

Recovery isn't guaranteed in all cases depending on the extent of corruption. Note that the root.disk may be correctly in place before running chkdsk and then be removed after running it.

Reference: http://ubuntu-with-wubi.blogspot.ca/2011/08/missing-rootdisk.html


How to resolve screen flickering on Ubuntu 14.04 LTS and Dell Inspiron 15 7000 Series 7548

Possibly related: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1407913

Try going into CompizConfig Settings Manager and searching for workarounds.

Click on the only result:

then scroll down to the bottom and select the Force full screen redraws (buffer swap) on repaint check box:

Close CompizConfig and reboot and see if this helps.

This resolved a screen flicker I was having with my NVIDIA GTX 750 Ti, so I'm not totally sure it will work, seeing as you don't give your GPU (if any.)

However, it never hurts (well, normally) to share - hope this helps :)


How to remove the “AMD Testing use only” watermark?

The script above did not work for me.
However I found a much simpler answer here

Edit the ati signature file:

sudo gedit /etc/ati/signature

and just replace the "UNSIGNED" line with the following code

9777c589791007f4aeef06c922ad54a2:ae59f5b9572136d99fdd36f0109d358fa643f2bd4a2644d9efbb4fe91a9f6590a145:f612f0b01f2565cd9bd834f8119b309bae11a1ed4a2661c49fdf3fad11986cc4f641f1ba1f2265909a8e34ff1699309bf211a7eb4d7662cd9f8e3faf14986d92f646f1bc

It worked fine for me.

The resulting file should be 238 bytes long for it to work.


You can either override the automatic choice based on the priority value by setting the alternative manually:

update-java-alternatives --set java-1.8.0-openjdk-amd64

Or you can change the priority of each entry by manually editing the appropriate configuration file in /usr/lib/jvm, in your case that would be /usr/lib/jvm/.java-1.8.0-openjdk-amd64.jinfo.

Open it in your favourite text editor as root and change the line

priority=1081

to your needs. It should be near the top of the file, probably line 3.


These are a couple of ways to update Google Chrome on Ubuntu 20.04 when the installation is done through the .deb file:

Open Software Updater. Select and install the available Google Chrome update.
Through Terminal. Type sudo apt-get update and then sudo apt-get --only-upgrade install google-chrome-stable.


I posted an answer here, that may be useful, for convenience I will just put it here again.

Yad may be useful in this regard, it is a fork of zenity with more features, one of them the ability to create forms.

Here is a very simple example of a form:

#!/bin/bash

frmdata=$(yad --title "Test Form" --form --field "Address" --field="Name")

frmaddr=$(echo $frmdata | awk 'BEGIN {FS="|" } { print $1 }')
frmname=$(echo $frmdata | awk 'BEGIN {FS="|" } { print $2 }')

echo $frmaddr > test.txt
echo $frmname >> test.txt

The above script will display a form like this:

After you enter your data and click ok or hit enter on the keyboard, the form data will be written to a text file called test.txt, I am using awk to separate the form data which is a string with a pipe as field separator, I believe there is a direct way to get the data without awk but I am no yad expert, please check the project home and ask questions, you may find a more elegant way.

How to get and install yad here:

http://www.webupd8.org/2010/12/yad-zenity-on-steroids-display.html

yad project home:

http://code.google.com/p/yad/

more examples here:

http://technostripe.com/yad-a-fork-of-zenity-with-more-features/

http://code.google.com/p/yad/wiki/Examples

There is no form designer for it yet but since the syntax is so simple and so close to zenity, that is not usually a problem.


VLC can't play large raw avi 1080p video

did you check your systems manager what you CPU load is? How big and long is your file. RAW Videos can quite big and take some time to load from harddisks. Maybe there your problem comes from.

With iostat you can check your io's to your harddisk (if you think it could be the problem)
Here you can finde a description how to use it.


Where does LXRandr save its display configurations?

To know what has changed in the home folder:

find ~/ -mmin -5 -type f

You can change 5 to a smaller number if you wish.

In this way, after saving configuration in LXRandr and running this command, the last change recorded is in ~/.config/autostart/lxrandr-autostart.desktop. That's it.

To open that:

gedit ~/.config/autostart/lxrandr-autostart.desktop

It contains something like:

[Desktop Entry]
Type=Application
Name=LXRandR autostart
Comment=Start xrandr with settings done in LXRandR
Exec=xrandr --output LVDS --mode 1680x1050 --rate 60.1 --output VGA-0 --off
OnlyShowIn=LXDE

It says that it just starts "xrandr with settings done in LXRandR". It's an xrandr configuration. In the example the external display is connected by VGA but shut down.

(To activate that configuration by a keybind, the line to be used is the one after Exec=. It will vary according to the active display settings at the moment when LXRandr saved them. Many separate configurations can be saved in this way to be used with different keybinds; but after saving with LXRandr the file lxrandr-autostart.desktop is overwritten.)


which keyboard is used at LUKS decryption?

On my system (Ubuntu 20.10), this is how i solved it:
Restart the computer and go to the GRuB bootloader, select "Ubuntu (advanced options)", and boot ubuntu in recovery mode.
Ubuntu will boot with more raw terminal output.  Enter in the LUKS password; after 3 bad attempts, it will timeout for 60 seconds.  Now your keyboard will output to the screen (although none of it will be interpreted by the shell).


Turn the Caps Lock LED on, while keep Caps Lock status is off

You can get a list of all controllable LEDs by checking the content of the virtual directory /sys/class/leds:

$ ls /sys/class/leds/
input5::capslock  input5::numlock  input5::scrolllock

On my system, there are only the three keyboard LEDs. If your output looks different, make sure you use the correct names instead below!

Each file is a symbolic link to a directory holding several properties of that LED:

$ ls '/sys/class/leds/input5::capslock'
brightness  device  max_brightness  power  subsystem  trigger  uevent

The only thing which is important for us is the brightness file content.

0 means the LED is off.
1 means the LED is on. (Assuming the max_brightness file holds the value 1 - on special keyboards the LED might maybe support multiple brightness values?)

We get the current LED state by checking the brightness file's content (it's currently off):

$ cat '/sys/class/leds/input5::capslock/brightness'
0

To switch the LED on, we must set that file's content to 1:

$ echo 1 | sudo tee '/sys/class/leds/input5::capslock/brightness'
1

To switch the LED on during every boot, you might want to append the command below to your /etc/rc.local script. It will be executed as root, therefore we don't need the sudo tee but can use Bash output redirection:

$ echo 1 > '/sys/class/leds/input5::capslock/brightness'


How do we know the version of a tool from command line on a remote server?

Generally, you can run apt-cache policy <package>, e.g.:

$ apt-cache policy texmaker
texmaker:
  Installed: (none)
  Candidate: 3.0.2-2
  Version table:
     3.0.2-2 0
        500 http://archive.ubuntu.com/ubuntu/ oneiric/universe i386 Packages


Automatically shutdown when switching to battery

The package that handles the AC-to-battery transition is pm-utils. On a command line, looking at the files in the pm-utils package will tell you where to go next:

    $ dpkg -L pm-utils
    ...<snip>...
    /usr/share/man/man1/pm-is-supported.1.gz
    /usr/share/man/man8/pm-powersave.8.gz
    /usr/share/man/man8/pm-action.8.gz
    ...<snip>...
    /usr/share/doc/pm-utils/HOWTO.hooks.gz
    /usr/share/doc/pm-utils/AUTHORS
    /usr/share/doc/pm-utils/README.debugging
    /usr/share/doc/pm-utils/TODO.Debian
    /usr/share/doc/pm-utils/README.distributions
    /usr/share/doc/pm-utils/TODO
    /usr/share/doc/pm-utils/README
    /usr/share/doc/pm-utils/HOWTO.modules
    /usr/share/doc/pm-utils/changelog.Debian.gz
    /usr/share/doc/pm-utils/copyright
    /usr/share/doc/pm-utils/NEWS.gz
    ...<snip>...


No Root File Stystem is defined error when installing?

If you are using the option to erase the entire disk, then it is an installer bug and should be reported as such. Use the advanced method I have outlined as a workaround. If you are choosing to do a side-by-side, you can't, as you don't have another OS, and it would be pointless. If you are using the advanced partition option, delete your existing(formatted) partition, select the free space , click add after selecting it, and make an Ext4 filesystem. If it gives you a choice of mount point, select /. Otherwise, click OK to add the filesystem, click on it, click edit at the bottom after selecting it, and select the mount point to be /. Then, try to install.


call bash script with array of strings with spaces as argument

I think you just need to use \" for space separated arguments.
Did you try to escape string with spaces in the following way:

  "\"arra y1\""

I think it may solve your issue.


This function is removed since gnome 3
But, the gnome 2 terminal has been forked as mate-terminal, it has the function you want.

sudo apt-get install mate-terminal

If you want to keep the gnome 3 terminal and agree to rename tabs from command line, you can try this:

1- Add a function 'set-title' to the .bashrc
2- Rename a terminal title with set-title The New Title Name

nano ~/.bashrc

##Add the following to the .bashrc file
function set-title() {
  if [[ -z "$ORIG" ]]; then
    ORIG=$PS1
  fi
  TITLE="\[\e]2;$*\a\]"
  PS1=${ORIG}${TITLE}
}

Usage : set-title My Tab Title


How to ignore proxy if not available in script

lol sorry found the answer ... just type \ before the variable
\$proxy

How about Acquire::http::Proxy-Auto-Detect?


Reduce the size of windows in Ubuntu (14.04)

There is a key combination of ctrl+alt+[NumpadNumber] which positions the window you have currently a focused on the screen.

1/3: left/right bottom quarter
7/9: left/right top quarter
4/6: left/right half
8/2: top/bottom half
5: whole screen/maximise

In your case, you would want to focus on one window, press ctrl+alt+4 then focus on another window and press ctrl+alt+6. Now they should be side by side on your screen.

Hope this helps :)


How NOT to route all traffic through the VPN?

I used something called 'split tunneling' for this when configuring my work VPN. Ubuntu 18.04

Settings->Network->Gear Icon
Choose IPv4 tab
Click checkbox: 'Use this connection only for resources on its network'


How can I send an XMPP message using the command-line?

You can use sendxmpp for that, here's a link to the manpage:
http://manpages.ubuntu.com/manpages/trusty/en/man1/sendxmpp.1p.html
Example
echo "hello bob!" | sendxmpp -s hello someone@jabber.org


flash drive at half capacity after 'dd image' format

This is because the ISO contained a partition table, which overwrote the one on the flash drive. To fix it, create a new partition table on the drive.

In GParted, you can find this in Device → Create partition table. Select a msdos partition table.

Make sure you are really operating on the correct drive, else you may end up with a non-booting computer.


Ubuntu thinkpad e15 gen2 lid and fn keys not working

After suspend, all the fn buttons start working. It's not a solution but can help a little bit.


Installation of Just Clang/LLVM Documentation?

Clean the package cache: sudo apt-get clean
Download the debs: sudo apt-get install -d clang llvm
Extract the debs in a "work" directory: find /var/cache/apt/archives/ -name "*.deb" -exec dpkg-deb -x {} work \;
Copy the docs and man pages to /usr/share: sudo cp -a work/usr/share/{doc,man} /usr/share/

You can remove the work directory now: rm -rf work.

I noticed that there's lots of llvm related packages. Add all the packages you want to step 2, specially the -doc (llvm-2.8-doc, llvm-2.9, llvm-3.0).


64 bit version of boinc client requires X while 32 bit version does not?

I realize this question is quite old, but I was able to avoid installing all of those libs and get a working boinc-client/manager installed on 12.04 64-bit:

$ sudo aptitude install --without-recommends boinc-client boinc-manager

Or you can use the apt-get option --no-install-recommends.

I have yet to run into any issues.


AppArmor fails to generate or update cache files when the features reported by the kernel and those in the cache are out of sync. This can happen when a kernel with new features is installed and/or the userspace has not been updated to match and/or there is a bug in the userspace compiler.

One way to get in this situation is by installing a kernel from a development release, or from upstream and not also updating the apparmor userspace with matching packages. This does not stop apparmor from loading policy but it does generate warnings and slow it down as it does a new compile on each load.

Removing and reinstalling a set of packages like apparmor, apache2, libapache2, .. may or may not correctly remove and clean out old inconsistent cache file. The partial removal of cache files will generally result in new cache entries not being generated as the cache only stores entries for one features set.

The cache files are stored in /etc/apparmor.d/cache/.

You can compare the cache and kernel features sets by looking at:

/etc/apparmor.d/cache/.features

and depending on your kernel:

/sys/kernel/security/apparmor/features/

(a directory of entries)

or:

/sys/kernel/security/apparmor/features

(a file)

and:

/sys/kernel/security/apparmor/matching

You can check for loaded policy status, to determine if policy is being loaded and its just cache update failures you are experiencing by using:

sudo aa-status

You can try to force regenerating the cache by using:

sudo /etc/init.d/apparmor restart

If that fails you can try manual removing the the cache files and then regenerating the cache:

sudo rm -rf /etc/apparmor.d/cache/*
sudo /etc/init.d/apparmor restart

If that doesn't work you have hit a bug and I would recommend filing a bug with launchpad:

ubuntu-bug apparmor


Unbuntu 20 KVM forces Console mode out of range tried GFXMODE

Here's the Answer for anyone else having the problem :-)
https://linuxconfig.org/how-to-increase-tty-console-resolution-on-ubuntu-18-04-server


Failed install 12.04 on Intel Hardware Raid with Large Partition (> 2TB)

Try the alternate text-based installer which you can find here: http://www.ubuntu.com/download/desktop/alternative-downloads

You may need to give yourself a separate /boot partition near the beginning of the hard drive array when you are choosing the partitioning. Your BIOS may have a limit on how large of a disk it can initialize the boot from.


rEFInd Boot Manager stopped working after installing Ubuntu 17- MacBook Pro Dual Boot

I had the same issue as you.
Resolved it by changing BootOrder using efibootmgr from within Ubuntu.

Before

# sudo efibootmgr
BootCurrent: 0000
Timeout: 5 seconds
BootOrder: 0000,0080
Boot0000* ubuntu
Boot0080* Mac OS X
Boot0081* Recovery OS
Boot0082*
BootFFFF*

Change order

# sudo efibootmgr -o 0080,0000

After

# sudo efibootmgr
BootCurrent: 0080
Timeout: 5 seconds
BootOrder: 0080,0000
Boot0000* ubuntu
Boot0080* Mac OS X
Boot0081* Recovery OS
Boot0082*
BootFFFF*


Moving wubi Ubuntu unstallation to partition separated from host partition

You need to use a different media to run gparted from (a Live CD/USB seems like the obvious choice) or a different way to resize the partition (Windows 7 disk management?).

The only thing you need to do from the separate OS or method is the resize, the rest should be possible from the Ubuntu installation.

Partition Magic does not do things from the windows environment, it is replacing the windows kernel on boot to make the changes it needs to do, however, if you feel more comfortable with it, it can do what you need (resize the windows partition).

Note: keep in mind that partition resizes are not 100% reliable operation, and you should have a backup of your data prior to the operation.


grep in bash-script doesn't print message in log file

As you know, when you are using > logTest.txt, you are simply redirecting stdout to the logTest.txt so you can't see anything.

To see what the problem is, run your grep without redirecting the stdout to a file:

./exeFile dir1/file.conf | grep textError

See if you have any output to redirect in the first place, maybe your grep does not have any results at all.

So first make sure your grep is working, then redirect the output.

In your second command, you are redirecting all of the output and you are not filtering anything, thats why the second command works.


Added a new resolution with xrandr and my monitor now is a black screen that says out of scale

Fixed the problem changing from xorg drivers to nvidia drivers and everything is working perfectly,followed this guide:https://www.cyberciti.biz/faq/ubuntu-linux-install-nvidia-driver-latest-proprietary-driver/

Hope this helps anyone else with the same problem


Are there any GTK3 themes that work properly in Unity-2D? All that I've tried have "button glitches"

After further testing, at the moment the answer to my question seems to be no. It appears that the only included Ubuntu Ambiance and Radiance have the ability to render properly when maximized for the reason stated in my previous comment. This has been filed as bug #984818 at Launchpad.

Until this problem is fixed with the Unity-2D panel it not possible for any third party theme to work properly.


You need to install the Linux version of Matlab, not the Windows version.  Once installed, the defaults installed, at least up until version 2016a did not create a icon with a link on the desktop or anywhere else.  Instead, you need to open a terminal window (CTRL + ALT + T) and run matlab at the prompt.  This should work.

There are ways to create an icon have it show on your HUD or side menu.  Although I have not tried this one, if you go to Ubuntu Software Centre you will find an entry for Matlab.  If you install that app you are supposed to get an icon installed to work with your Matlab installation.  Presumably that works but I haven't personally tried it as I created the icon and shortcut manually.


VirtualBox Web Service missing after clean installation on Ubuntu 18.04.1 LTS

Note: Tested with VirtualBox 6.0 and it's working.

These services are not installed by default on the Ubuntu version you are using. However, you can download the official scripts that provide these services.

To do so, simply copy and paste these commands into the terminal and hit the enter. This will download the scripts and add them via update-rc.d to the start up scripts.

cd /etc/init.d/
services=(vboxautostart-service vboxweb-service vboxballoonctrl-service)
base_url="https://www.virtualbox.org/svn/vbox/trunk/src/VBox/Installer/linux"
for service in "${services[@]}"
    do
      wget "${base_url}/${service}".sh -O "${service}" \
      && chmod +x "$service"  \
      && update-rc.d "$service" defaults 90 10
    done

About the vboxdrv:

It's not a service, but a module and needs to be loaded. You can run modprobe vboxdrv to load the module, but usually it's automatically loaded during the virtualbox installation.

To check if it's really loaded you can run

# modprobe -n --first-time vboxdrv

Or you can use modinfo to verify if the vboxdrv kernel module is loaded:

# modinfo vboxdrv
filename:       /lib/modules/4.15.0-47-generic/misc/vboxdrv.ko
version:        6.0.4 r128413 (0x00290008)
...

After you are done with all these things, simply reboot.

After the restart, you can run service --status-all | grep vbox to verify that the services are running.

You should see an output similar to this:

 [ ? ]  vboxautostart-service
 [ + ]  vboxballoonctrl-service
 [ + ]  vboxweb-service

Now, you can also control these services via systemctl, i.e. systemctl status vboxautostart-service.

For more information about the configuration options of each Oracle VM VirtualBox service, see the official manual:

Web Service: page 243 (254/361)
Autostart Service: page 248 (259/361)


Rename files numerically (date/time order)

The following will break on files containing newlines, but should work the rest of the time. It will sort the files based on the time they were last modified, rather than their actual creation time, because Ubuntu doesn't store the creation time of files. So if you've modified the files since you downloaded them, you won't get an accurate ordering.

n=0; ls -tr | while read i; do n=$((n+1)); mv -- "$i" "$(printf '%03d' "$n")"_"$i"; done

ls -tr sorts files by modification time, oldest first (and when you pipe the output of ls it automatically lists files one-per-line rather than the standard way of doing things -- it should be noted that this is a GNU-ism, if you have to work on another *nix with a different version of ls, this might not be the case). while read i takes that list and goes over each item one at a time, and the rest of it does the actual renaming.

n=$((n+1)) increments the variable $n by one. There could be problems if this had been set beforehand, so to be on the safe side you should set it to 0 at the beginning of the line.

$(printf '%03d' "$n") prints the number contained in the variable $n, padded to three zeros (so 001, 002 ... 087 ... 999). I hope that the mv command is fairly obvious.


Team Viewer has an option to send key combination to the remote computer, and this must be turned on.

On the Team Viewer toolbar, click on "Actions" and make sure "Send key combinations" is selected.  This will send the Alt+Tab to the remote machine instead of the local one.


Getting error installing updates (in Canada)

If the server is down you could go into software sources and choose another server.
See the "download from". You now have it set to Canada. If you change it too a US server and it does download your server is probably down.


How to recompile the kernel without the sources?

You cannot compile a kernel without the source. Compiling is something you do with source. You can't drive without a car either.

You can modify the behavior of an existing kernel with boot parameters, writing to sysfs, etc. It depends what you want to do.


Why does gedit (Text Editor) switch to read only, and how can I undo it without reloading?

After posting this last night, I noticed that gedit (Text Editor) was NOT to blame. The whole file system had been set to read-only somehow, so gedit was just behaving correctly.

Why the filesystem was read-only suddenly, I don't know. Could be my hard drive is dying, so I'll try to test for that.

Update: After running some analysis of the disk, there were some logical errors but no physical errors. Correcting the logical errors and restarting cleared up the problem, though I still don't know what the cause was. It clearly was not gedit, though.


How can I fix 12.10 Theme changes that make unreadable dialogs in Eclipse

Eclipse can use GTK themes but it is an option, it's not obligatory.
Go to Preferences, General->Appearence. Select "Classic" in Theme instead of GTK.
Restart eclipse and you should be happy with the result.

Cheers :)


"makedeb.sh: No such file or directory" while installing Back in Time

You would be better off using this PPA: ppa:bit-team/stable  .

Run these commands in a Terminal:

sudo add-apt-repository ppa:bit-team/stable
sudo apt-get update
sudo apt-get install backintime-gnome backintime-notify

The advantages over installing from a .tar.gz file are that:

Automatic updates via Ubuntu's Software Updater.
Installation system-wide, and including a .desktop launcher.