Unity window button theme specification?

I've done a bit more digging, and I suspect that:

unity uses the metacity theme (metacity-1 subfolder) for all window decorations;
unity uses the unity subfolder to draw window buttons in the top unity panel only (when a window is maximized and the titlebar has been hidden (?))

(I don't currently have Unity available to me to test).

The relevant bug: https://bugs.launchpad.net/unity/+bug/740232

In particular, comment 22:

  This has been fixed. Check /usr/share/themes/ambiance/unity, you'll find buttons there which are loaded into panel. So, yes Unity window control buttons are now themable.

The relevant code (3/Jun/2013): http://bazaar.launchpad.net/~unity-team/unity/trunk/view/3355/unity-shared/PanelStyle.cpp#L197

I do not believe there is any documentation.

However, reading the relevant code (above) it seems like

The window button types are CLOSE, MINIMIZE, UNMAXIMIZE, MAXIMIZE
The window button states are NORMAL, PRELIGHT, PRESSED, DISABLED, UNFOCUSED, UNFOCUSED_PRELIGHT, UNFOCUSED_PRESSED

These seem much the same as metacity.

To find the image corresponding to the button with type type and state state, we look up unity/<type_><state_>.png, where:

type_ is:

'close' for type CLOSE;
'minimize' for type MINIMIZE;
'maximize' for type MAXIMIZE;
'unmaximize' for type UNMAXIMIZE.

state_ is:

'' (nothing) for state NORMAL (a button on the active window);
'_focused_prelight' for state PRELIGHT (a button on the active window that is being hovered over);
'_focused_pressed' for state PRESSED (a button on the active window that is being pressed);
'_unfocused' for state DISABLED; (??)
'_unfocused' for state UNFOCUSED (a button on an unfocused window);
'_unfocused_prelight' for state UNFOCUSED_PRELIGHT(a button on an unfocused window that is being hovered over);
'_unfocused_pressed' for state UNFOCUSED_PRESSED (a button on an unfocused window that is being pressed).

Hence note that of the images in the unity subfolder of (say) Ambiance, <role>_focused_normal.png is not used, even though it's provided in the package (??).

If the image for a particular (type, state) is not found, it looks like some sort of default button is drawn (rather than using one of the existing images).


Why does suffixing an ampersand at the end of a GTK command, result in extra output in the next command after close?

In your question, there are some misconceptions. Firstly, this behavior is not limited to Gtk commands. Secondly, the notification is not send after the "next command" but on the next prompt (say, as soon as you type the Enter key).

What you are doing is called Job Control. In bash you can send commands to the "background" so that they don't block the command line. For example, try running gedit on the terminal. Gedit's window should appear and the command line should be "blocked", that is, you cannot type any new command unless you close Gedit.

A solution to this blocking behavior of "long running" processes is to send their commands to the background on invocation. This way the command won't block and you will be able to continue working on the command line.

A way to send a command to the background is by using the & after the command. Continuing with the Gedit example, you can start it on the background by running

gedit &

You will now notice that the command prompt is printed immediately and you can run new commands (contrast this with simply running gedit without ampersand). You'll also notice the extra information about the new "job" you just created: the job number in brackets, and its PID.

When the job ends (either normally or because you killed it), bash will notify you with something similar to:

[1]+  Done                    gedit &

(The 1 is the job number and on the right you have the command with which you created this job, just in case you forgot :-)

If you have several jobs on the background you can use the command jobs to get a list with their statuses.

In conclusion, you don't need to add the ampersand unless you want to run another command immediately.

For references and other interesting aspects about job control read:

Job Control, wooledge
Job Control, MIT


Can DVD be used after it stuck at 100% Creating image checksum when burning?

The cd, if bootable, could still be used to install.

I wouldn't recommend tho, the system may fail because the cd wasn't finished. The best to do it to burn it again (or make a bootable usb, that's a better option). If the cd wasn't finished it may not contain all files necessary to the system run properly.


In the latest Ubuntu (18.04 LTS) it seems like they increased the buffer size or fixed something, because I can now paste large selections without issue.  No added extensions necessary.


How can I boot from a usb key when all I can get is a Ubuntu grub rescue prompt?

Just powered my AA1 up.
F2 - press rapidly as power button pressed brings me to BIOS.
Might be worth ensuring you have the latest BIOS - downloads and instructions on ACER site. Had to do that for my Z1 rebuild (SSD variant). I have 2 HD versions such as yours too so can provide a little experience.
BIOS upgrade is possible without having access to it and may help or at least allow access to the BIOS.
Might be worth taking the HD out and putting in a caddy attached to another machine to pull all your data off and/or check partitions and formats are as you expect.This is straight forward and many teardown guides are available - it's a couple of screws on the back.
I am assuming you cannot find /root/dev on any of your ls of your mountable partitions.
If you have an external CD-ROM you may be able to run a recovery linux.
DVD-rom may or may not be recognised depending on bios. This assumes you previously set boot order to these before HD for just this scenario..
This applies to a USB key too if you had previously set boot from this prior to HD. My paranoia means I usually leave this sort of thing set, recognising it allows for access if you don't keep physical control.
Sorry can't use comments yet so it is an answer...
also helpful would be : Grub rescue - error: unknown filesystem


Have you considered using Ubuntu's built in updater-manager (not the software center nor apt-get update)? Usually all software updates for third-party software is sent through it.

Sorry I cannot be of more help, but that's the only method I know of.


How do I force Unity to not use compositing?

Just install unity-2d  and reboot. At GDM login screen, in the drop-down box at the bottom of the screen select 'Ubuntu Unity 2D session'. In consequent bootups, the Unity 2D session will become the default.

How do I install and switch to the Unity 2D desktop?

If you want to enable/disable composting in Unity 2D, you can install the Unity 2D tweaking tool by following this guide.


I got a similar problem, an pkgProblemResolver error when I was trying to install openssh-server.

The problem may be caused by (1) "hold packages" which installation resulted in error and the dependencies (i.e. other packages) in your system are corrupted or missed, or (2) by incompatibilities of the packages you want to install and the packages you already have.

If it is a problem with hold packages, you can detect the hold packages and remove or unhold them.

You can determine the hold packages using dpkg --get-selections

$ dpkg --get-selections | grep hold
  or
$ apt-mark showhold

Then, you can un-mark or remove the hold packages

$ sudo apt-mark unhold package_name
  or
$ sudo apt-get --purge remove package_name

Finally, I recommend to auto-remove unused packages

$ sudo apt-get autoremove

If it is a problem with dependencies, The solution may involve removing and downgrading some of the packages you already have. You may use aptitude to get suggestions on how to solve the problem.

First, you must install aptitude if you do not have it

$ sudo apt-get install aptitude

Then, you can run the command indicating that you want to install the openssh-server

$ sudo aptitude install libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386

The program will show you suggestions about how to solve the problem. Usually the first solution does not work. You can press n to request a new suggestion. Press y to accept a solution that installs the openssh-server and downgrades some other packages.


How to use vim command character to find an explain in it's help file

In general, to find help for a command in Vim, use the command mode (the one where you type :wq for exiting):

:help gh

You can press Ctrld to show a list of possible completions after typing this,

:he gh
gh                               c_<Right>                        -menuheight                      zip-copyright                    match-highlight                  Vimball-copyright
ghc                              i_<Right>                        :belowright                      'cmdwinheight'                   netrw-copyright                  <ScrollWheelRight>
'ghr'                            c_<C-Right>                      'helpheight'                     'nosplitright'                   'nowinfixheight'                 <C-ScrollWheelRight>
g:ghc                            c_<S-Right>                      'splitright'                     'winfixheight'                   shift-left-right                 <S-ScrollWheelRight>

As you can see, gh is listed, so just press Enter:

                                                        gh
gh                      Start Select mode, characterwise.  This is like "v",
                        but starts Select mode instead of Visual mode.
                        Mnemonic: "get highlighted".


make nautilus stop asking for password when mounting disk

Change the owner of the directory where the drive is mounted to be your own user:

sudo chown -R luca:luca /media/luca/Storage/


In Empathy IRC, how do I turn off the "joined" and "disconnected" messages?

At the moment, there is no easy way to do this.

There is currently an open bug report regarding this issue: https://bugzilla.gnome.org/show_bug.cgi?id=599453

In the meantime, I'd recommend switching to xchat or irssi, which are both great chat programs (xchat is GUI, and irssi is CLI), and are a lot less buggy than empathy. (unless you feel like testing/debugging/extending empathy)


How to copy ntfs/windows data from external usb hd to ubuntu ext4 disk?

If I understand correctly, you copied files from your Win10 laptop onto an external HDD. I'm assuming that your external HDD is in some sort of USB connected enclosure. It would probably be helpful to know the file system format of the external HDD, but I am going to assume it is NTFS.

If this is all true then you should be able to simply plug your external HDD into your Ubuntu 16.04 desktop. Ubuntu 16.04 should be pre-installed with the necessary ntfs-3g components to read your NTFS HDD. Then you should be able to simply copy the files from the external HDD to your Ubuntu 16.04 desktop using either a drag and drop method or possibly something like rsync.

Hopefully that helps!

Some links that might help:

https://help.ubuntu.com/community/MountingWindowsPartitions
https://help.ubuntu.com/community/rsync


No, we still only use nouveau for 2D rendering and if you install the nvidia driver it will take over. New in natty though, you can now install libgl1-mesa-dri-experimental to get the experimental 3D driver. However, this is very much "if it breaks you get to keep both pieces", the developers don't want to get bug reports about it right now.


Reportedly a bug with the upgrade of python from 3.2 to 3.3 where the _Timer module is renamed Timer.

Open "/usr/local/lib/python3.3/dist-packages/CherryPy-3.2.2-py3.3.egg/cherrypy/process/plugins.py" in a text editor and replace _Timer with Timer on line 424.


How can I connect to my Amazon EC2 server using a desktop client

I think you're asking how you can shorten the following command:

ssh -i ~/path/to/your/ssh_key.pem \
   ubuntu@ec2-79-125-64-190.eu-west-1.compute.amazonaws.com

That can be accomplished with with edits to ~/.ssh/config.
The following example ssh config stanza might be helpful:

Host myec2server
  IdentityFile /home/USERNAME/ec2/ec2-keypair.eu-west-1.pem
  User ubuntu
  HostName ec2-79-125-64-190.eu-west-1.compute.amazonaws.com

Now, you can just type ssh myec2server. see man ssh_config for more ssh_config tricks.  You can then combine that with another of the answers here and create a launcher with the command:

gnome-terminal --execute ssh myec2server

Also related, is a new-ish EC2 feature import-keypair that allows you to upload your own public keys.  Then, you can launch new servers with keypairs that you use elsewhere.


I had exactly the same issue and found the solution here.

Installing libreoffice-gtk with Synaptic Package Manager and restarting LibreOffice solved the problem for me.


How to connect to two VPNs at the same time?

If you're a bit familiar with routing, default gateways and network cards, this is easy:

If your machine has an Ethernet port, use that. If not, add an additional WiFi card to the machine.
Connect to the Internal VPN using the first NIC.
Note the IP address range of the VPN
Connect the second NIC to the Internet VPN
This should now become the default gateway. if it doesn't, remove the default from the first NIC.
Add a route on the second NIC to the first NIC for the IP address range noted in #3

Done!

If the previous five steps don't make you go "Aha! Off course!"  then:

Don't do it!  :P  ;-)
Don't ask if it's possible with 1 NIC  >:)


Install Mac OS Lion on Macbook with existing Ubuntu 12.04 dual boot

this is pretty unusual, but might work. There are some problems though. I myself never tried installing this way and i am pretty sure you will run into some problems. Almost certain you will have to reinstall grub and stuff.

Be sure to make a backup of all your important files. And i would personally consider do install Mac OS X first, then Ubuntu again. You can but the lion installation and create a spare partition for ubuntu before installing os x.

About the Lion DMG: If you have a friend with Mac OS X running, you can easily turn the dmg into a bootable usb drive or dvd. I think i followed this guide: http://lifehacker.com/5823096/how-to-burn-your-own-lion-install-dvd-or-flash-drive. However there a lot of them available, just try google. Mac sure your USB Drive is large enough and correctly formated (Apple HFS... you will lose all data on that drive).


18.04.2 Emojis partially gone from Librewriter autocorrect

Ubuntu 18.04 added official support for color emoji with the addition of Google Noto Color Emoji.  In previous versions, color emoji wasn't included and would have to have been a user-installed font or package.

Google has installation instructions for their font pack.

You could also install the ttf-ancient-fonts package through Synaptic or apt, which adds emoji support.


question about dual booting other linux distro with ubuntu 12.04 LTS

Can't really understand this question right. Use boot-repair to fix general GRUB problems.
From my experience, wiping the windows partitions never influences the other linux OS unless you execute stuff from them or you still have some sensitive data.

Windows will take control of the boot EFI partition, in your case I think it's sda1, when you first install it. After that you can access the boot EFI and modify it to your needs (this is what the ubuntu installer did).

So, theoretically you can wipe sda2 and 3, but not sda1 because it will wipe the ubuntu boot data together with the rest. You can clean the old windows efi files from sda1 afterwards in ubuntu.
I think you could use pretty much any distro similar to ubuntu on the same home (forked ones for example, like Mint).


Why are some programs in the Ubuntu Software Center not open source?

Several repositories

Ubuntu features various repositories with its own policies on the software being included there.

Summarized from Community Wiki - Repositories:

main contains applications that are free software, can be freely redistributed and are fully supported by the Ubuntu team.

This is the fully-FOSS section.
restricted Our commitment is to only promote free software – or software available under a free licence. However, we make exceptions for a small set of tools and drivers that make it possible to install Ubuntu and its free applications on everyday hardware.
universe is a snapshot of the free, open-source, and Linux world. It houses almost every piece of open-source software, all built from a range of public sources. Canonical does not provide a guarantee of regular security updates for software in the universe component

Open source, maybe FOSS
multiverse component contains software that is not free, which means the licensing requirements of this software do not meet the Ubuntu main component licence policy. [...] not supported and usually cannot be fixed or updated. Use it at your own risk.

These are the "regular" repositories which the Software Center uses to list the applications available.

Additional software (partners)

Additional to the above, there's the Extras and the Partner repositories. You'll have to enable those by yourself as an opt-in. The partner repository is more or less privately held by Canonical. It includes proprietary software in it, without source code available usually, just for reasons of being partners with Canonical or other commercial reasons.

Some costless "apps" in the Software Centre are provided via the Extras repository, and have to adhere to the Extension Repository Policy. These list just a few (see below).

The apps submitted via the MyApps programme are another story and very much Ubuntu specific. Source code is not always available and you can find some relevant information on the MyApps commercial software FAQ. Some are commercial and closed-source only, provided via a Private PPA with APT-HTTPS authentication. The ones distributed in this way don't have to adhere to any policies apart from the Launchpad PPA policies and some technical requirements - they're fairly private to the developers.

What about package x, y and z?

To see in which component a certain application is included, I suggest to go to packages.ubuntu.com, find the package, and in the page title you'll notice the section in brackets, e.g. Package: kcalc (4:4.9.2-0ubuntu1) [universe].

Can I run my system with only FOSS software?

To filter for FOSS-only, just only enable main (and optionally universe) - just to make sure you don't let in close-source software. Edit your /etc/apt/sources.list and files in /etc/apt/sources.list.d/ to exclude these if you like. You may run into issues running your hardware correctly as indicated by the description of the restricted component above.

Whether it will be very functional depends on your hardware and requirements you hold to the software you'd like to use. Some mainstream hardware doesn't require any proprietary firmware/binaries and can run perfectly fine without any closed source piece of data. The restricted and multiverse components provide a generally acceptable balance in this for most people, but you need turn them off in case you want to completely FOSS.

The set of applications you can pick will considerably scale down if you decide to disable the universe component. The list of all packages in Quantal has these numbers to give you some idea:

main (+ security): 14250
universe: 32595
multiverse: 746
restricted: 14

I was unable to find a credible source for the additional repositories, so by just using the regular Packages.gz files (assuming Quantal amd64):

extras: 9
partner: 9

See also

Ubuntu Free software philosophy
Extension Repository Policy
How to remove the “For Purchase” section from the Software Center?


Are rootkits something I should be concerned if I'm a normal user?

If you are a normal user no.

Now what do I consider a normal user ?

You only install software from official repositories. When ever you download software from other sources (that includes launchpad) you check if the maintainer is of a good reputation.
You keep your system up to date and stick to a lts or you keep upgrading on normal version.
You do not run a server on your system. Servers do require a monitoring system.
You keep your passwords safe and use good passwords.
Do not let your system unattended or be used by anyone else without you present.
Make your router your 1st defence.
Do not run random terminal commands. Take extra care with wget and FTP commands (and similar commands that download files)

There are probably some more things to consider but this will keep you from harm.


Ubuntu 20.04 Chromium snap fonts missing and become 'boxy'

my friend. You can try to install it in DEB form. In this post, they explain it well. Remember to change the version.
Another alternative is to use Flatpak which is explained in this post as well.


How to install firefox addon Skip Cert Error silently through automation

wget https://addons.mozilla.org/firefox/downloads/latest/1865/addon-1865-latest.xpi
firefox -silent -install-global-extension addon-1865-latest.xpi -setDefaultBrowser www.google.es


How to Link and use two or more Dropbox Accounts simultaneously

General idea [source]

  The basic idea is to just start Dropbox from the command-line using an alternate home directory. This will create another Dropbox icon, and another Dropbox folder, which has to be in some other place from the original one.

  The two Dropbox folders will both be called Dropbox (this cannot be changed), but you can distinguish them by their location.

Setup

Method: 1 - If you have installed nautilus-dropbox from the repository

Open a terminal and paste the following commands:

$ mkdir "$HOME"/.dropbox-alt
$ HOME="$HOME/.dropbox-alt"
$ /usr/bin/dropbox start -i

A new Dropbox setup wizard window will open and second Dropbox icon should appear on the status bar.

Choose an existing account (different from the original one!) or create a new one.
Make sure you choose an alternate location for your new Dropbox folder.

Now your alternate dropbox is set.

start Dropbox from terminal

$ /usr/bin/dropbox start -i

start Alternate-Dropbox from terminal

$ HOME="$HOME/.dropbox-alt" && /usr/bin/dropbox start -i

Method: 2 - If you have compiled dropbox in your home from tar.gz file

Open a terminal and paste the following commands:

$ mkdir "$HOME"/.dropbox-alt
$ ln -s "$HOME/.Xauthority" "$HOME/.dropbox-alt/"
$ HOME="$HOME/.dropbox-alt"
$ /home/$USER/.dropbox-dist/dropboxd

Dropbox setup wizard window will appear. Finish the setup similarly as described in Method -1

start Dropbox from terminal

$ /home/$USER/.dropbox-dist/dropboxd

start Alternate-Dropbox from terminal

$ HOME="$HOME/.dropbox-alt" && /home/$USER/.dropbox-dist/dropboxd

Note:

You can create a small script with the above commands to start Dropbox.
One can put the script at startup. Don't forget to give the script execution permission.

chmod +x /path/to/script

I have tested the second method. Hope it will be useful.


I mixed Shell and Terminal Emulator in the terminology apparently i had the shell working a while back and xterm just need some configuration changes to work properly (also i got rid of gnome-terminal)
Sorry my bad

As suggested below i'm adding more details to this.
I've installed Ubuntu Mini with nothing more
Installed I3wm
Installed Zsh
Installed Tmux
All via Apt
Created .xinitrc and added exec i3 to start i3wm when x starts,
followed the zsh official instructions when changing shell which is running chsh -s $(which zsh)
Also you can check the Env variables to see the SHELL changed to that path.

Regarding .zshrc there is an if i copied from bashrc that checks if the current terminal is tty1 and then runs startx, this is so you can easily start everything once you logged in in the first terminal and still keep the ability to have other terminal without running the same

There is also a line there to start tmux with every zsh session

Regarding the Terminal that i confused it was because it was white and black text i've changed to colors to black and light gray text and create .Xdefaults file to keep it like that

I also had some apps from snap like vscode which i had to add to PATH in .zshrc to make sure Dmenu populated those in there (i3 works with demnu) and i have set up i3bar to work with Conky per official guide on i3wm website plus the entries which i needed.

TLDR version

apt install i3

apt install zsh

apt install tmux

.xinitrc

exec i3

.Xdefaults

xterm*background: black
xterm*foreground: lightgray

.zshrc

export PATH=$HOME/bin:/usr/local/bin:/snap/bin:$HOME/start:$PATH

if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then
startx
fi

[[ $TERM = "xterm" ]] && { tmux && exit 0; }


How to make a jar file run on startup & and when you log out?

Here's a easy way to do that using SysVInit. Instructions:

Create the start and the stop script of your application. Put it on some directory, in our example is:

Start Script: /usr/local/bin/myapp-start.sh
Stop Script: /usr/local/bin/myapp-stop.sh

Each one will provide the instructions to run/stop the app. For instance the myapp-start.sh content can be as simple as the following:

#!/bin/bash

java -jar myapp.jar

For the stop script it can be something like this:

#!/bin/bash
# Grabs and kill a process from the pidlist that has the word myapp

pid=`ps aux | grep myapp | awk '{print $2}'`
kill -9 $pid

Create the following script (myscript) and put it on /etc/init.d.

/etc/init.d/myscript content:

#!/bin/bash
# MyApp
#
# description: bla bla

case $1 in
    start)
        /bin/bash /usr/local/bin/myapp-start.sh
    ;;
    stop)
        /bin/bash /usr/local/bin/myapp-stop.sh
    ;;
    restart)
        /bin/bash /usr/local/bin/myapp-stop.sh
        /bin/bash /usr/local/bin/myapp-start.sh
    ;;
esac
exit 0

Put the script to start with the system (using SysV). Just run the following command (as root):

update-rc.d myscript defaults

PS: I know that Upstart is great and bla bla, but I preffer the old SysV init system.


403 forbidden : You don't have permission to access this resource. Apache/2.4.18 (Ubuntu) Server Port 443

I solve the problem by specifying the correct Document Root folder.
I was pointing to wrong folder.

After I change the value for Document root in /etc/apache2/sites-available/test.conf file.


Are you sure that you have a good internet connection? It could be that your internet keeps going out during the download. You could also ditch Wubi and grab the ISO from the Ubuntu website and then create a live CD/USB, up to you.


A bug report was filed for this here. If you follow the comments, hopefully your problem should be fixed. If not, it may be worth trying to post your problems you encountered there and trying to get it fixed, as it is the Ubuntu bug report tracker.


I need to locate Apps files to make them available to Unity Launch Folders

Now I feel silly!
The answer is in Anton's YouTube video!
Basically you find the app you want to add with the Super key, with the Search tool at the top of the Unity panel. Then just drag the app icon found right into the Unity Launch Folders drawer you previously created. And take it from there.


EN-GB hyphenation not working in LibreOffice 5.1.2.2 on Ubuntu 16.04

I reinstalled hunspell-en-gb and restarted(!) the system. Now it works!


How to grep JSON key's value in command-line?

Use jq:
aws logs list-log-groups | jq -r '.logGroups[0].arn'

Output:
arn:aws:logs:us-east-1:929815623526:log-group:alla:

jq can be installed from the universe repository:
sudo apt install jq

jq is to be preferred for parsing json, but if jq is no option for whatever reason and you know that the format won't change, you can possibly use grep -P and head -n1:
aws logs list-log-groups | grep -Po '"arn": "\K[^"]*' | head -n1


One thing you need to do is add a keyboard layout that has usage of the AltGr (Right Alt) key.

I'm writing this on XUbuntu 16.04 LTS with Serbian (Latin) keyboard layout, and AltGr works like a charm right out of the box. For example, I'm able to type @\|€, etc without an issue.

If you need help adding keyboard layouts try searching the net, or look at this article.

You can check the keycode that your AltGr key returns by running xev command in the terminal. Then, press your AltGr key, which should return (in the second row) something like:

keycode 108 (keysym 0xfe03, ISO_Level3_Shift)


Run systemd-analyze blame and you will see which applications/programs are taking how much time at startup.


I think you want this:

find -L /mnt/1TB2/TV/* -name cover.jpg -execdir ln -s cover.jpg poster.jpg \;

-execdir moves to the directory of the file, and executes ln -s cover.jpg poster.jpg.

There are two main problems with your script:

for file in $(find -L /mnt/1TB2/TV/* -name 'cover.jpg')

This will break on whitespace. E.g. a file path that contains SEASON 01 will be split at the space.

It's usually best to avoid handling filenames in a shell script, instead using find -exec or find -execdir. But if you really need to, the most thorough method I'm aware of is

while IFS= read -rd '' filename; do
    ...
done < <(find ... -print0)

... which is a mouthful.
ln -s $file poster.jpg

Since there is no change of directories, the symlink will be created in the directory where you run the script.

And this will also split $file on whitespace. You should always quote your variables: "$file"


cron is not bash (and your bash syntax is wrong, too. Read man bash). Read man 5 crontab, and, to achive what you seem to want:

In your crontab (crontab -e)

DISPLAY=:0
XAUTHORITY=/home/username/.Xauthority
* * * * *  /home/username/test

BUT! This is not necessary! the play command uses neither $DISPLAY or $XAUTHORITY.

From man play:

SoX is a command-line audio processing tool, particularly suited to making quick, simple edits and to batch processing.  If
you need an interactive, graphical audio editor, use audacity(1).

Your problem is that crons $PATH is not the same as yours. man 5 crontab will show you how to set it, or you culd use the full path to play in your script:

#!/bin/bash
# no need to set $PATH
/usr/bin/play $HOME/Media/Music/my_audio.mp3

You can explore the differences between cron's execution environment and the GUI execution environment by executing (echo "=== set ===";set;echo "===env ==="; env | sort;echo "=== alias ===";alias) >some.file in both (with different values for some file).


Gnome-shell will not launch Ubuntu 13.04

Try running gnome-shell with the -r (replace) option:

gnome-shell --replace

or

gnome-shell -r

should replace the current running window manager (if that is what you want!). If you want to use gnome-shell by default, reconfigure your login manager with sudo dpkg-reconfigure lightdm (as suggested by Josh) to have the option of selecting gnome-shell session at your login screen.


testing dhcp server locally on one physical machine with virtual machine

Ok, I've found different solution. I use two virtual machines in Internal network. One of them use static IP address and has DHCP server configured. The second VM finds DHCP server and get IP from range.


This is a peculiar error you will get if you run XAMPP in LINUX.

Assumption: XAMPP is unzipped @ /opt/ folder.

If you get the error "XAMPP: Another web server daemon with SSL is already running" when you run ./lampp start. Simply follow the steps below to get rid of this error:

Open the file /opt/lampp/etc/httpd.conf.
Search the Listen 80 and change it to some other port (e.g. Listen 2145)  (Line No. 40).
Open the file /opt/lampp/etc/extra/httpd-ssl.conf.
Search the Listen 443 and change it to some other port (e.g. Listen 16443) (Line No. 39).
Open the file /opt/lampp/lampp
Search for the port testport 80 and replace it to testport 2145. Also change the testport 443 to testport 16443. (Happens to be the Line No. 197, 214)
Now go and run /opt/lampp/lampp start. It should work now.

Note: Line numbers may be different.


Google Chrome: Error 21 (net::ERR_NETWORK_CHANGED)

Are you using Docker? Do you have Docker networks? Try removing them (except for bridge, host and none). That fixed it for me.

I'm using Kubuntu 16.10 on a Dell Inspiron 13 (5000 series, Intel Corporation Wireless 3165 (rev 79)). This issue used to happen with both IPv4 and IPv6 networks, and both wired and wireless.

You can remove all unused Docker networks with the command:

docker network prune


Recovering from a Ubuntu freeze but keep programs running?

The answer in a single word:

No.

Unfortunately X applications which are running will be terminated when X closes.  Since closing the X server, and restarting is what fixes your problem... there is probably no way around it.


After upgrade to 20.04: luks doesn't open my disk on boot; cryptroot/crypttab is empty, cryptsetup doesn't recognize the crypttab entry

Fyi, I got it fixed.
It was so weird, I would've never find out if someone didn't have told me.
The problem is with the file /etc/crypttab: It needs an EOF at the end!
Whoah! How can this be? This is the first time in the last 25 years that some linux needs ecpects an EOF in a text file. Gosh!
Anyway, now it's fixed, after more than one week testing.


Quick google search, the lm-sensors package should fit your purpose. (Note I'll be summarizing this article).

Open a terminal window.

sudo apt-get install lm-sensors

Let the process finish, then

sensors-detect

And answer yes to the corresponding yes or no questions. After this is finished you have a choice to either insert the sensors into /etc/modules automatically (yes) or to manually do it later (no.)

Next, load the necessary modules with

sudo service kmod start

You will need a monitoring program, further down the article's page there are a few listed, psensor being the first listed. Install (your choice)...

sudo apt-get install psensor

And launch the executable (or run the application from the terminal window). You should now be able to monitor your sensors.

For the tablet sensor (From another AU post):

sudo apt install iio-sensor-proxy inotify-tools

NB: You might have to put your computer to sleep and wake it up for the sensor to work. After that, it keeps working.

Also see this github repo


How do I prioritize internet traffic in my local network for individual PCs?

Yes, you can do this, but don't try to do this in Ubuntu or even on your PCs.

The machines in your network are autonomous and work independently. Traffic of these come together at your router/modem and that's where you can prioritize traffic. This is called QoS (Quality of Service) and most routers let you prioritize traffic based on several properties: source IP address, port number, etc. Reading your other question I think you have a device quite capable of doing this.

Please re-ask your question on Superuser.com where this is more on topic. (or moderator may have it migrated for you)


Sony flash tools .tar installation on ubuntu 18.04

SP Flash Tool v5.1752 Linux

You need to get libpng12 as the first step:

cd ~/Downloads
wget http://archive.ubuntu.com/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1.1_amd64.deb
sudo apt-get install ./libpng12-0_1.2.54-1ubuntu1.1_amd64.deb

It seems that you do not need to compile anything here. It is binary release.

unzip "SP Flash Tool v5.1752 Linux.zip"
mv "SP Flash Tool v5.1752 Linux" "SP_Flash_Tool_v5.1752_Linux"
cd SP_Flash_Tool_v5.1752_Linux
chmod +x flash_tool

and run it with

./flash_tool

 and follow instruction for your device.

FlashTool

It is binary release too. So you need to extract it and launch binary file.

7z x flashtool-0.9.25.0-linux.tar.7z
tar -xf flashtool-0.9.25.0-linux.tar
cd FlashTool

and run it with

sudo ./FlashTool

 and follow instruction for your device.


Firefox import bookmarks/settings dialog

Firefox can import bookmarks from Chrome (but apparently not from Chromium!). To do so, press Alt+B to open the bookmarks window, click on Import and backup, and then on import data from another browser. You should see Chrome listed.


Problem with R installation on ubuntu after removing

It appears that you are missing a couple of dependencies for the R version you are attempting to install.

Specifically, r-base-core and r-recommended of versions = or greater than 3.3.1

Compatible versions are available in Ubuntu 16.10 (and beyond) by enabling the Universe repository and issuing the command

sudo apt-get install r-base-core r-recommended

If you are running an earlier version of Ubuntu you'll have to either upgrade to 16.10 or use a version of R supported by your current OS.


Steam does work on wine, although there are a few things that needs to be done to make it run flawlessly, such as installing microsoft core-fonts and a few library replacements. The easiest method of installing wine is using winetricks. Uninstall Steam first, then install winetricks, start winetricks and pick Steam for the installation. Note that apps installed through winetricks are installed into a prefixed environment, therefore if you want to start Steam.exe through command line for whatever reason, you must set the WINEPREFIX environment variable (otherwise it will be run in wine's default environment). Steam can install a shortcut in the Desktop and Start Menu, and wine is smart enough to add WINEPREFIX to those shortcuts, so they're the best option to start a prefixed app.


Get DHCP IP but can't ping anything using connectx2 and Ubuntu 20.04

I'm an idiot. The switch port was previously configured to only accept vlan tagged packets (which esxi was doing). Works perfectly now that I configured the switch to accept untagged packets.


13.10 - Bumblebee with Nvidia Optimus 750M - Stuck in high resolution (3200*1800) and drivers issues

Ok everything back to normal (resolution, brightness control, ubuntu logo loader during start up, video card...)

Here is my guess of what happened:

When I installed saucy, I didn't set up the nvidia optimus card. I had to specify the option "nomodeset" to the grub for being able to boot.
However, when I updated my ubuntu base, it seems I didn't need anymore this option. I thought it was a problem of nvidia optimus and therefore installed bumblebee with the latest nvidia drivers (at least now I have it).

I therefore solved my problem by changing my boot options like this:

sudo gedit /etc/default/grub

I changed this line:

GRUB_CMDLINE_LINUX_DEFAULT="acpi_backlight=vendor dell_laptop.backlight=0 nomodeset"

to this one:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor dell_laptop.backlight=0"

and updated the grub:

sudo update-grub

I did a reboot and, the resolution was back to normal, the ubuntu logo load during start up was back, and no more lag with videos or desktop effects...

However the brightness control buttons were still not working. This was due to my new drivers. I just had to read this thread in askubuntu: Changing the brightness stopped working in 13.10 saucy salamander , and applied the solution for intel video cards:

Creating the 20-intel.conf file with:

sudo gedit /usr/share/X11/xorg.conf.d/20-intel.conf

And adding the following inside:

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

EndSection

Reboot and all good :) Brightness buttons are working again :)

I think my problem was very specific, not sure if it will help anyone... In case you have the solution here :)

Cheers!


WebDAV in Nautilus - connection to OneDrive?

After a very long time, I decided to connect via "onedrive-d", not WebDAV :(

Step by step solution:

test@test:~$ git clone https://github.com/xybu92/onedrive-d.git
test@test:~$ cd onedrive-d/
test@test:~$ sudo su
root@test:~/onedrive-d# ./install.sh
root@test:~/onedrive-d# onedrive-pref
root@test:~/onedrive-d# onedrive-d start

You can read help info by typing:

onedrive-pref --help
onedrive-d --help
And check README.md on "onedrive-d" Github page.

After that, in local path (/home/test/OneDrive), I have all files from OneDrive.


Running QML/C++ application build with CMake is unable to run from QtCreator or snap package

Looks like your missing libqt5gui5 from your stage-packages

UPDATE:

So to expand my answer a bit more. Here is an simple working example to snap a CMake/Qt/QML application and make it runnable from qtcreator

// main.cpp
#include &ltQGuiApplication&gt
#include &ltQQmlApplicationEngine&gt

int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);

    QQmlApplicationEngine engine;
    engine.load(QUrl(QStringLiteral("qrc:/qml/main.qml")));

    return app.exec();
}

//main.qml
import QtQuick 2.4
import QtQuick.Window 2.1
import Ubuntu.Components 1.3

Window {
    minimumHeight: units.gu(80)
    minimumWidth: minimumHeight
    MainView {
        applicationName: "simpleapp"
        anchors.fill: parent
        Page {
            title: "Hello world"

            Button {
                anchors.centerIn: parent
                text: "Quit"
                onClicked: Qt.quit()
            }
        }
    }
    Component.onCompleted: show()
}

#CMakeLists.txt
project(simpleapp)
cmake_minimum_required(VERSION 2.8)

set(CMAKE_INCLUDE_CURRENT_DIR ON)

find_package(Qt5Core  REQUIRED)
find_package(Qt5Gui   REQUIRED)
find_package(Qt5Qml   REQUIRED)
find_package(Qt5Quick REQUIRED)

set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

FILE(GLOB_RECURSE QML_FILES "${CMAKE_SOURCE_DIR}/*.qml")
add_custom_target(qml_files SOURCES ${QML_FILES})

set(CPP_FILES ${CMAKE_SOURCE_DIR}/main.cpp)

add_executable(${PROJECT_NAME} ${CPP_FILES} ${CMAKE_SOURCE_DIR}/qml.qrc)
qt5_use_modules(${PROJECT_NAME} Core Gui Qml Quick)

install(TARGETS ${PROJECT_NAME} DESTINATION /bin)

#snapcraft.yml
name: simpleapp
version: 1.0
summary: Qt Application Example
description: A simple app
confinement: devmode

apps:
  simpleapp:
    command: qt5-launch simpleapp
    plugs:
      - unity7
      - home

parts:
  application:
    plugin: cmake
    source: .
    build-packages:
      - qtbase5-dev
      - qtdeclarative5-dev
    stage-packages:
      - libqt5gui5
      - libgtk2.0-0
      - ubuntu-sdk-libs # probably overkill but fine for this example
    after: [qt5conf] # use the qt5-launch wiki part to setup env

To build the snap and run it:

$ snapcraft snap
$ sudo snap install simpleapp_1.0_amd64.snap
$ simpleapp

And just use the standard run config in qtcreator.


Setting up user to download files with no shell access

From man sshd_config:

ForceCommand
         Forces the execution of the command specified by ForceCommand,
         ignoring any command supplied by the client and ~/.ssh/rc if
         present.               ...           Specifying a command
         of “internal-sftp” will force the use of an in-process sftp
         server that requires no support files when used with
         ChrootDirectory.

So edit your /etc/ssh/sshd_config and add something like this:

Match User username
    ForceCommand internal-sftp

Use Match so that only the required users/groups are affected.

The full description of ForceCommand says:

             ...    The command is invoked by using the user's login shell
         with the -c option.  This applies to shell, command, or subsystem
         execution.

However, as internal-sftp is in-process, this will work even if /usr/bin/nologin or /bin/false are used as the login shell.


How do you use "GParted" if you have no unallocated space?

You need to resize your Windows C: drive from Windows itself. Doing it from Linux can break the system. Use Disk Management to do this. After that, reboot back to the Ubuntu Live USB/DVD. Make a partition for Ubuntu (ext4).
Or you could just click "Install Ubuntu alongside Windows (Boot Manager)" and install Ubuntu that way.


$ man ping

...

   -i interval
          Wait interval seconds between sending each packet.  The
          default is to wait for one second between each packet
          normally, or not to wait in flood mode. Only super-user
          may set interval to values less 0.2 seconds.


How to activate User after changing UID with usermod?

Any UID values below 1000 are treated as system type users.  These are hidden from the Login-screen.

If you want to see users on the Login-Screen the UID value needs to be greater than 1000.


Installing 12.04 on a system with windows 7 and UEFI

The screen-shot links are dead; however, the usual cause of the symptoms as described is a corrupted partition table. If this computer is booting in BIOS mode (it may be, even if the firmware is UEFI-enabled), then my FixParts utility may be able to fix the problem pretty painlessly, but I can't make any promises about that. If the computer is booting in EFI mode, then I can't make any recommendations about fixes without more information. The output of gdisk -l 0: from Windows might help, but you'll need to install the Windows version of my GPT fdisk utility.


Ubuntu 18.04 Purpose Behind Splitting Analog/Digital Output, and How To Not Separate them?

Only those sound cards that offer both, an analog and a digital signal processing will appear as separate analog and digital devices.

In your case, if I read the data on your screeshot correctly, you connect your headset throught a PS4 controller. This controller can receive digital or analog audio signaly from the attached system.

You may prefer a digital sound processing whenever there is a high-end sound card attached where all desired sound processing and decoding will be done by this hardware. Analog output is reserved for those system that are only just able to playback or amplify the analog audio signal given. Since the PS4 controller can do both, you are free to choose whichever makes the best sound experience and lowest signal-noise ratio.

If you hear no difference you may prefer the digital sound processing of the controller to save some CPU power of your computer.


How can I recover from a frozen app when connecting over VNC

I'm not sure that there's a way to do it from VNC, but if you can ssh into the server you can kill the process.

Use ps -A to list all running processes. You can use grep to prune the list if you know what you're looking for. Then use kill <pid> to kill the process, or killall <name> to kill all processes with that name.


Directories need execute permission in order for processes to access (open) them.

When you use --chmod=a=rw, the destination directory gets created but then immediately gets its permissions set to drw-rw-rw such that its contents become inaccessible ("failed to stat") e.g. given

$ tree
.
└── source
    ├── file1
    ├── file2
    └── file3

1 directory, 3 files

then

$ rsync --include="file*" --exclude="*" -avh --chmod=a=rw source/ destination/
sending incremental file list
created directory destination
rsync: failed to modify permissions on "/home/steeldriver/destination/.": Permission denied (13)
rsync: recv_generator: failed to stat "/home/steeldriver/destination/file1": Permission denied (13)
rsync: recv_generator: failed to stat "/home/steeldriver/destination/file2": Permission denied (13)
rsync: recv_generator: failed to stat "/home/steeldriver/destination/file3": Permission denied (13)
./

sent 107 bytes  received 502 bytes  1.22K bytes/sec
total size is 0  speedup is 0.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1183) [sender=3.1.1]

fails because

$ ls -dl destination/
drw-rw-rw- 2 steeldriver steeldriver 4096 Mar 23 18:24 destination/

so that

$ ls -al destination/
ls: cannot access 'destination/.': Permission denied
ls: cannot access 'destination/..': Permission denied
total 0
d????????? ? ? ? ?            ? .
d????????? ? ? ? ?            ? ..

The solution is to use --chmod=a=rwX (or, equivalently, --chmod=ugo=rwX)

$ rsync --include="file*" --exclude="*" -avh --chmod=ugo=rwX source/ destination/
sending incremental file list
created directory destination
./
file1
file2
file3

sent 224 bytes  received 110 bytes  668.00 bytes/sec
total size is 0  speedup is 0.00

where the X symbolic mode means

execute/search only if the file is  a  directory  or
already  has  execute permission for some use

See man chmod


Ati Radeon 5650m fglrx black screen ubuntu (all versions)

My laptop is Intel/ati 5650. If the VGA driver use fglrx, the vga option in bios must be changed to "discrete", not "switchable".


how to disble or make convenient workspaces in 12.04?

Hold the Ctrl and Alt keys while pressing the Arrow keys, to switch between workspaces.

To use touchpad gestures, you must have a touchpad which supports multitouch to be able to do such gestures.


grub-setup is no longer used, it was replaced by grub-install. I've edited that other answer to use grub-install.


Disk Partitioning for ubuntu 15.10 to have a NTFS drive

Use gparted.  This is available on the Live ubuntu install disk.

With this gui application you can create new partitions, resize any existing partitions, or delete partitions and more.

Decide how big you want your Ubuntu partition to be and how big you want your Windows partition to be.  Also create a swap drive.  Your swap drive should be at least the size of the ram you have in your computer.  You might consider making it 1.5 times amount in case you increase your ram in the future.

When installing your OS'es both Ubuntu and Windows, you will have the option during install to choose the specific partition for the install.

Keep in mind that in the normal legacy mode a disk can only have 4 primary partitions.  You might consider making one primary partition, then and extended partition.  Under the extended partition you can create as many partitions as you want.  This way you can have partitions for your OS installs, a swap partition and other DATA partitions.


A couple of ways:

cd '$RECYCLE.BIN'
cd \$RECYCLE.BIN

See this SuperUser question for a discussion of escaping.


I cannot detect my wireless headphone in ubuntu 18.04 LTS

I had the same issue and solved it by clicking on the menu settings at the right corner where battery icon is, then clicking on bluetooth -> settings and from there turn the bluetooth off and on and wait til u see ur headset on the list.


Thunderbird Message filters are stored in your home directory ($HOME)

open terminal

cd ~/.thunderbird
use find command to grep the message filters

find . -type f -name msgFilterRules.dat

msgFilterRules.dat will store all your filters.

You can cat the file and see the contents.

Hope this helps


Found it! In ubuntu 20.04 the /dev filesystem is mounted with the noexec flag and mmap refuses to map a page exec from a noexec filesystem. Fortunately MAP_ANONYMOUS does work, so I can use that (with some logic to detect a working anonymous map since this program runs on zillions of different distros and antique kernels).


which “pactl” : audio source is “curently playing” one

To list the default sink we can issue

pacmd list-sinks

The default sink is marked with an asterisk *:

>>> 2 sink(s) available.
  * index: 0
    name: <alsa_output.pci-0000_02_00.1.hdmi-stereo-extra1>

Adding .monitor to the default sink will give us an input source for this sink.

In case we need to know where a stream is currently playing we can issue:

pacmd list-sink-inputs


Ok, that's a known problem. There's a bug in zeitgeist and DockbarX 0.43 don't handle that error as it should. Next version will simply not use zeitgeist if there's an error instead of crashing.

It might take a while before the next release of DockbarX (I'm doing some code cleanup that is much more work than I suspected). In the mean time, try to install zeitgeist from the ppa (ppa:zeitgeist/ppa) or remove the ppa and downgrade zeitgest to mavericks own version if you already use the ppa.


Compiz Config works under Unity and the Ring Switcher does work.


How do I know what version `do-release-upgrade` will upgrade to?

You can check:

$ do-release-upgrade -c
Checking for a new Ubuntu release
New release '17.04' available.
Run 'do-release-upgrade' to upgrade to it.

Or run the upgrade and cancel:

$ do-release-upgrade
Checking for a new Ubuntu release
Get:1 Upgrade tool signature [836 B]
Get:2 Upgrade tool [1,268 kB]
Fetched 1,269 kB in 0s (0 B/s)
authenticate 'zesty.tar.gz' against 'zesty.tar.gz.gpg'
extracting 'zesty.tar.gz'
[sudo] password for muru:

It's clear from both outputs that I'll be upgraded to 17.04 (zesty).

$ do-release-upgrade --help
Usage: do-release-upgrade [options]

Options:
...
  -c, --check-dist-upgrade-only
                        Check only if a new distribution release is available
                        and report the result via the exit code


Using a Fork Bomb to prevent interactive shell on root

It would not do anything as any modern linux distro, Ubuntu included, has been patched so this fork bomb will not work (unless you change the default security settings).

Go ahead, run it ;)

See:

Fork bomb protection not working : Amount of processes not limited

https://superuser.com/questions/435690/does-linux-have-any-measures-to-protect-against-fork-bombs

These limits should already be set by default.

At any rate you can also do drastic things such as setting the root shell to /bin/false or what not.

Does not prevent people with physical access from having root access and may or may not prevent

sudo /bin/bash
sudo /bin/ksh
sudo /bin/zsh
sudo /bin/sh

=)


How to pass list of names to be searched by grep using xargs?

You can use -I to tell xargs to use a particular character or sequence of characters as a placeholder for the argument. From man xargs:

   -I replace-str
          Replace occurrences of replace-str in the initial-arguments with
          names read from standard input.  Also, unquoted  blanks  do  not
          terminate  input  items;  instead  the  separator is the newline
          character.  Implies -x and -L 1.

A common choice is {} so

cat nameslist.txt | xargs -I {} grep {} targetfile.txt

or (without the useless use of cat)

< nameslist.txt xargs -I {} grep {} targetfile.txt

However, assuming your list has one name per line you don't need xargs here at all - grep can read a list of patterns (or fixed strings, with the -F option) from a file:

grep -F -f nameslist.txt targetfile.txt


Specify Home Directory: Partitioned Disk: Fresh Re-Install: Ubuntu Gnome 14.04.02

Make dev/sda3 your /home and dev/sda5 /.

Too not format the /home partition, there are some small boxes on the installer under the option "format?"

Make SURE dev/sda3 is NOT checked and dev/sda5 IS checked.

This will reinstall the system but leave your /home the same as it was in the previous install.


Dell XPS (late 2019) running ubuntu 20.04 Fan always on and very loud with kind of knocking sound that has started to give me headaches

TLDR: open the back-cover and  Clean the fans.
An update on this that I got so annoyed by the sound that I decided to open it up to clean. and I did just that, opened the back cover and with the laptop cleaning tools like the soft brush, carefully cleaned the fan with blowing on it to remove any stuck dust. when I opened it did not look that bad to be honest but the cleaning did improve it.
Now the fan is not Always on, it starts occasionally but even when it starts, there is no more the annoying knocking sound, it is just the whirring sound which is much better than before.


You are getting this error because your runtime PATH to javafx is probably incorrect or missing.
Please, follow these steps:
Check the path of JavaFX. (example: /usr/share/openjfx/lib/)
Then run command:
java --module-path $FX-PATH --add-modules javafx.controls -jar sample.jar

where $FX-PATH should be set or replaced with mentioned JavaFX path.
If you need to add more modules, you can specify them in --add-modules parameter.
(--add-modules javafx.controls,javafx.fxml)


IIRC the inconsistent 'reversed scrolling' behaviour even across the default (x)ubuntu apps was due to the different scroll handling in GTK2 and GTK3. Don't know if that still applies..

Anyway, I just found out the "old xinput trick" still works (xUbuntu 18.04.1, xinput version 1.6.2), so I might as well share how it works. And how to make it persist reboots.

Test / temporary solution

List all your currently available pointers and keyboards:

xinput list

Something like this will appear:

⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Logitech USB Laser Mouse                  id=9    [slave  pointer  (2)]
⎜   ↳ TPPS/2 IBM TrackPoint                     id=12   [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=11   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Power Button                              id=8    [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=10   [slave  keyboard (3)]
    ↳ ThinkPad Extra Buttons                    id=13   [slave  keyboard (3)]

Pick the id of the pointer in question, list all its device properties:

xinput list-props 12

Device 'TPPS/2 IBM TrackPoint':
    Device Enabled (143):   1
    Coordinate Transformation Matrix (145): 1.000000, ...
    libinput Natural Scrolling Enabled (281):   1
    libinput Natural Scrolling Enabled Default (282):   0
    libinput Scroll Methods Available (283):    0, 0, 1
    libinput Scroll Method Enabled (284):   0, 0, 1
    libinput Scroll Method Enabled Default (285):   0, 0, 1
    libinput Button Scrolling Button (286): 2
    ...

This is what we need: libinput Natural Scrolling Enabled (281)

To enable natural scrolling globally i.e. for "TPPS/2 IBM TrackPoint" (for the current session), first turn it OFF in 'Mouse & Touchpad' preferences.
Enter one of those two lines below, hit Enter. (both do the same, because to read or write a property you can use either its entire(!) name or its ID)

xinput set-prop 12 "libinput Natural Scrolling Enabled" 1

xinput set-prop 12 "281" 1

Now test it in applications where naturalscroling wouldn't work via system preferences.

Permanent solution

If the above test worked on your machine, you can apply the changes everytime you log into your session with a small startup script. The script part that matches deviceName is from this answer about button maps by @zerobandwidth).

Save the code below as natural_scrolling.sh in your home directory or in /any/path/youLike

#!/bin/bash
# Find all xinput devices whose name matches any of the arguments passed here,
# then set the Natural Scrolling' property to '1' regardless of its
# current state.

# expect multiple arguments, store them as array
deviceNames="$@"

# exit if no argument is passed
if [ "$deviceNames" = "" ]; then
        echo "No argument received, exiting."
        echo "Call this script with argument(s) like 'Logitech' that match"
        echo "any of your attached pointer devices."
    exit 1
fi

for deviceName in $deviceNames
do
    deviceId=$(xinput --list | awk -v search="$deviceName" \
    '$0 ~ search {match($0, /id=[0-9]+/);\
                  if (RSTART) \
                    print substr($0, RSTART+3, RLENGTH-3)\
                 }'\
     )
  # set device-specific property (works i.e for 'TrackPoint' & 'Logitech')
  xinput set-prop $deviceId "libinput Natural Scrolling Enabled" 1
done

Mark the script executable:

chmod +x natural_scrolling.sh

Call it with unique(!) device_name string(s) as argument:

/any/path/youLike/natural_scrolling.sh Logitech TrackPoint

Add it to your startup applications, i.e via Session & Startup preferences in xfce and test it by logging out & back in again.


Ubuntu live USB shows blinking cursor on boot

I had the same problems that you now explain with my first Ubuntu installation. From my experience, this usually comes with a defaulty installation on the bootable usb stick. I just did my installation following the method I explain here, and worked perfectly. These steps are:

1 - Check the architecture (32 or 64 bits) of your computer. Somehow, despite 64 being compatible with 32, the latter gives problems on the former.

2 - Download the Ubuntu Desktop .iso for your architecture.

2 - Download the program Universal USB Installer from here.

3 - Open the program and fill-in the blank spaces with the linux distribution you wish to install, the location of the .iso and the usb you wish to use. Create the bootable usb (and be patient).

4 - Check carefully what the program is doing. On a few occasions, you'll need to interact with it to tell him to continue to the next process or close a window (when the program has already finished using it and tells you it needs to be closed to continue with the process). Maybe you had some issues here with your previous installation.

5 - Make sure the program tells you it's finished, and close it and shut down the PC. Do not restart the PC. Completely shut it down and completely start it up again. I cannot explain why, but I had problems with restarting too on the past.

6 - While starting the computer, either set the BIOS to start booting from the usb or (as in my computer) press the key that allows you to choose the booting method (in my computer, it's F12. The computer usually tells you which key it is just before booting by default).

7 - Choose "boot from usb".

I hope this is helpful. I basically followed the steps of this, adding my personal experience.


You have to press that button while holding the Fn key


This application is already packaged for Ubuntu, it is placed in universe pocket.
To install VIM-LaTeX open terminal and type:
sudo apt-add-repository universe
sudo apt-get update
sudo apt-get install vim-latexsuite

You can also consult with its manual before use.


When should I expect the NVidia 302+ driver to be available?

The newest proprietary Nvidia drivers (including Nvidia 302.07) are available from ppa:graphics-drivers/ppa.

For details see: How do I install the Nvidia drivers?

The Xorg-edgers ppa now is for bleeding edge open source graphics drivers:

  Note: The drivers obtained from there are bleeding edge. So they are not considered as stable and may lead to system instabilites, or in the worst case to a broken system that can't boot any more. Please take the time to read the notices for this ppa and how to remove it in case things break.


Why is my Ubuntu Touch app not visible in the Ubuntu Software Center?

This is because the desktop version of Ubuntu does not support Click packages yet. To view or install your app, currently you must have an Ubuntu Touch device. Also, there is currently no online list of Click apps (remember, the Click App Store is still in Beta).

In the future (by Ubuntu 14.10), Click packages, the new App Store, and Unity 8, along with all the apps written using the Ubuntu SDK, will be available on the desktop as well.


How do I setup routing through a PPTP VPN?

sudo route add 192.168.0.0/24 gw 192.168.2.VPNENDPOINTADDRESS

the far end will either need to NAT or the far network will need to have a route back.


Try to install Ubuntu - MD5 Check Sums Different

Do you know why the Windows 8 installation crashed in the first place?

I think you should run memtest86+ on your desktop.  Bad memory could result in all kinds of strange issues with random crashes and corrupt file systems.


Bluetooth headset microphone is not detecting on Ubuntu 18.04

You will need to change the sound profile from High Fidelity Playback A2DP Sink to HFP/HSP for the microphone to appear in settings


Xubuntu 15.04 goes to sleep when the screen is locked

This behaviour has been around since at least Ubuntu 14.04 (i.e. kernel 3.13) and is reported as Bug #1350513. On Sony models Ctrl+Alt+F1 and Ctrl+Alt+L can start the shut-down procedure; on Lenovo models it sends the system to sleeping mode.

In all likelihood these are all symptoms of a same issue with the kernel. I would suggest you jump over to Launchpad and report there in detail your computer model and all the procedures that unexpectedly send the system to sleeping mode.


How can I get Kubuntu to use my Multimedia keys?

KDE assigns keyboard shortcuts on a per app basis. If you are using Amarok, for example, click on the Settings menu item and then the third item under that Configure shortcuts. This will open a dialogue with all the Amarok actions and 3 separate shortcut options for each action.


Php Server Monitor - Uncaught Error: Class 'DOMDocument' not found

As said in the requirements, PHP Server Monitor requires PHP 5.3.7+

PHP 7.2 is way higher than 5.3, this "PHP Server Monitor" seems to be not compatible with 7.2.

You can try to install PHP 5.6, i.e. thanks to sury.org packages, using this PPA:
https://launchpad.net/~ondrej/+archive/ubuntu/php

But if you're looking for good, web-based monitoring tool, then you should rather take a look at netdata instead.


Does a text to class diagram generator exist?

The closest thing I've run across so far is yuml.

It's got it's own particular syntax (and I've hit a few random snags every so often), but overall, it does a pretty good job, and it even provides a couple different styles and formats for output.

If items in your diagrams grow too large vertically, try forcing the diagram to a horizontal (dir:lr) direction.

Just be sure to save your original text, in case you lose the link(s) to your diagram(s).


Who decides what category the software in the Ubuntu Software Centre is filed under, and who can we report errors to?

This is probably an error in how software-center parses the .desktop file of Pinta.

Some common reasons why an application ends up in the wrong categories:

The Categories option in the .desktop file of the application is incorrect.
Software-center interpreted the application wrongly. You can read about how the software-center classifies the applications into various categories here.
A stale .desktop file got stuck in the app-install-data, which makes the application to be classified wrongly.

If you think an application is categorized under a wrong section, file a bug report against the package and software-center in Launchpad.

How do I report a bug?

You can follow how to report such a bug report by following this similar bug report against GParted.


How can I make Deja Dup use AES 256 as the encryption algorithm?

I know this is a bit late but if you put s2k-cipher-algo AES256 in ~/.gnupg/gpg.conf then all your deja-dup backups will be encrypted with AES256.  The only downside  to this is that if you didn't have this option enabled from the first backup, all your other backups become pointless at that point because you'll need to delete them all and start over.  So before you set the option please pick your backups for files that need to be kept.


update-alternatives arguments -  and  can't be the same

The manpage is somewhat confusing IMHO, but the key parts seem to be

--install link name path priority [--slave link name path]...
       Add a group of alternatives to the system.  link is the  generic
       name for the master link, name is the name of its symlink in the
       alternatives directory, and path is the alternative being intro‐
       duced  for the master link.

where generic name is described in the TERMINOLOGY section as

generic name (or alternative link)
       A name, like /usr/bin/editor, which refers, via the alternatives
       system, to one of a number of files of similar function.

whereas the actual executable target is referred to as the path

alternative (or alternative path)
       The name of a specific file in the filesystem, which may be made
       accessible via a generic name using the alternatives system.

so in your case it needs to be

update-alternatives --install /usr/bin/x-www-browser x-www-browser /usr/local/bin/vimb 30


mapred-site.xml file not present in Hadoop 2.7.0

You need to rename the mapred-site.xml.template file to mapred-site.xml.
(in hadoop-2.7.0/etc/hadoop)

For this, you can use:

mv mapred-site.xml.template mapred-site.xml

and then make changes in the configuration file mapred-site.xml as required.


Ubuntu 16.04 External Display Stopped Working (Black)

I know this has been a while so thank you to everyone who tried to help.  It turned out it was a hardware problem with the HDMI socket.  Nothing to do with Ubuntu!


16.04/Dell XPS 15 9560 freezes/keyboard not working on login

I had the same issue. I could fix it with a modification of /etc/default/grub file. I added a parameter to line GRUB_CMDLINE_LINUX_DEFAULT. Now it looks like

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_rev_override=1"

Don't forget update-grub once you changed this file


Ubuntu single boot install on Vaio SVP132A1CL (SVP1321BPXB)

So I finally managed to get the single boot going.

I'm not sure which step actually solved it but here are the ones I took:

Disabled "Secure Boot" on BIOS setup
Changed boot setting from "EFI" to "Legacy" (BIOS/CMS)
Unchecked "Download updates while installing"
Selected "Something else" on "Installation type"

I've a feeling that the magic happened at this point. This is what the partitions looked like from the previous install > Partition table
So I erased all of them and added 534MB of "boot reserved space" (I'm not sure about the exact names of the options)
Added 119004MB of "ext4"
Added 8494MB of "swap"
Formatted disk

And again the installation wasn't successful... So I decided to have a clean install to play around partitions and see if something worked
Ran the installation again but this time with "Installation type" set as "Erase disk and install Ubuntu" and as I clicked on "Continue" I noticed the alert "Write the changes to disk?" only listed 2 partitions (main and swap) instead of the usual 3 it'd been showing earlier
Finished the install as usual and Voilà, the system booted!

Hope this helps anyone stuck on VAIO booting loops.

Edit

A month ago or so, I had to set it back to Windows and was stuck for hours while the backup media wouldn't get past formatting the disk. Or better yet, I could format the disk, but not install boot instructions.

Fiddling around later I remembered this post, switched back to Legacy and it worked like a charm.


XBMC doesn’t downmix sound from 5.1 to stereo

As far as I can remember, there was a bug, with some AC3 5.1 encoded videos.  If the stereo setting works OK for 7.1 videos, or other , then this is it. Nothing more to do that trying a daily build with the bug fixed, or older version without the bug


Showing 31 gb log files, but cannot track where the files are

They may be hidden files, open a terminal and list all files including hidden

sudo ls -ahlS /var/log

This will list all files, showing human readable file sizes, in list format and sort by size, largest first. Does that help?

If you find the large files that way, you can open your file manager as root and make sure you're showing hidden files to delete/manage those files.


System locks up when disk I/O is saturated

I have had the same issue on my laptop, which has a fairly slow disk system as compared to the remainder of the computer.

I was able to make this much better, by changing the scheduling algorithm used for disk transfers.  By default Ubuntu uses Deadline, but I find my system  responds more quickly when I use cfq.

To see what scheduler you are using, issue the command

cat /sys/class/block/sda/queue/scheduler

To do a one-time change (until reboot) issue the command

echo cfq | sudo tee /sys/class/block/sda/queue/scheduler

Note that it is important that the change be made to whatever it is that you have for your external hard drive;  Mine usually loads up as sdb. so I would issue the command echo cfq | sudo tee /sys/class/block/sdb/queue/scheduler

I make my change permanent for all drives attached to my computer, by adding the kernel parameter elevator=cfq in my grub file, which looks like this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash noautogroup elevator=cfq"


Run the following:

sudo apt-get remove gtk2-engines-oxygen gtk3-engines-oxygen
rm -rf ~/.kde

This should uninstall Oxygen for GTK and delete the KDE preferences directory in your home folder.

Source: Restore GTK integration after removing KDE


How do I configure sshguard in Ubuntu 20.04?

I found the Arch Wiki page on sshguard, which advises adding the following to /etc/ufw/before.rules, just below the # allow all on loopback block:

# hand off control for sshd to sshguard
:sshguard - [0:0]
-A ufw-before-input -p tcp --dport 22 -j sshguard

Adding this to the file and doing sudo systemctl restart ufw seems to have done the trick.

However, there's one other config change you should make: the sshguard.conf file that comes with Ubuntu will cause sshguard to retrigger on its own log messages, instantly banning the IP as soon as it makes a single mistake. (This bug seems to have been introduced in the upstream debian package; the examples provided in the sshguard source don't have this problem.) To fix this, edit /etc/sshguard/sshguard.conf and remove the SYSLOG_FACILITY options from the LOGREADER setting, replacing them with -t sshd (and possibly other services you want sshguard to monitor.) The setting should look like this:

LOGREADER="LANG=C /bin/journalctl -afb -p info -n1 -o cat -t sshd"

With these two changes it now seems to be working as expected.


Why is this package not removed with apt-get remove?

Apt (or, rather dpkg) operates on the default architecture by, well, default. From the output it looks like i386 is not your default architecture, so you have to specify it. For example, see the Debian Multiarch HOWTO, which shows you have to specify the foreign architecture for both installing and removing such packages.

You could do:

sudo apt-get remove --purge 'libnvidia-.*:i386'

(Note that apt doesn't use wildcards, but regex. See apt-get remove with wildcard removed way more than expected. why?)


Boot happens twice even if I delete the first option in efibootmgr

It seems to default to using this file:

\EFI\ubuntu\shimx64.efi

Which then loads this file:

\EFI\Boot\BootX64.efi

This is a sure sign that Secure Boot is enabled. Secure Boot will only load a bootloader signed by Microsoft. You will have to disable Secure Boot in the BIOS / UEFI firmware before your computer will stop defaulting to shimx64.efi.


If you have a 64 bit CPU you can install a 64 bit version.

The 32 bit version of Ubuntu needs only 512MB RAM, the 64 bit version will need a minimum of 1024MB RAM. Since you have 2024MB RAM (2GB) you can install the 64 bit version on the 64 bit processor.


Want [ubuntu]iso bootable on external hdd as liveCD

You can use several tools for the job

I have used Linux Live USB Creator (LiLi) successfully

http://www.linuxliveusb.com/en/download

Universal USB Creator is recommended in the installation guide

http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/

For more such tools see this

http://sysberto.com/2013/07/best-9-tools-to-make-pendrive-bootable-for-windowslinux-os/

And if you really want to do what you say-
make the HDD as a bootable CD (in which case you would not be able to use all the space available on it, only the size of the disk, ie 700mb)

tool for it

http://sourceforge.net/projects/win32diskimager/

From the command line using dd command

sudo dd if=/path/to/file.iso of=/dev/sdb bs=1M

I Recommend using Linux Live USB Creator,
With it you can also add persistence, that is you can save changes to it in Ubuntu Live Boot.


Squid 3.1 doesn't have the storeurl_rewrite_program parameters, required to cache query parameters. There is no way to do that.


For Ubuntu 11.10

The solution depends on whether you are using the standard or 2D version of Ubuntu, which depends on your graphics card. (See: Am I using Unity or Unity 2D? )

Resizing the Dash in the standard Ubuntu

When opening the Ubuntu Dash, you should see three "window buttons" in the upper-left.
Click the maximize button (the square) to switch between fullscreen and windowed mode.

Resizing the Dash in Ubuntu 2D

Install and launch Dconf Editor . Once it's open, navigate to the desktop > unity section in the left pane. You will see a form-factor option, which if set to 'Netbook' will made the Dash fullscreen, and if set to 'Desktop' will make the Dash windowed.

What about drag-resizing the Dash, like a Window?

There are many unconfigurable parts of Unity, and this is one of them. The Dash has two modes  (fullscreen and windowed) and you can switch between them  using the methods above. You can't drag-resize the Dash.

In defense of Unity's design, though, there's no reason you'd want to resize the Unity Dash to arbitrary dimensions on the fly. You don't "drag and drop icons [from the desktop to the Dash]  in order to create shortcuts", as the question asker mentioned; that's what the launcher is for. The Dash is designed to be the sole focus on your desktop when you use it.


You most likely have the package vim-tiny installed which can be executed with the commands vi or vim.tiny as shown in the package description. Also you probably have pre-installed the package vim-common (it has some configuration files according to the description) which may be shown as Vim in the ubuntu software center. There is a separate package vim which can be installed with the command sudo apt-get install vim. There are not many differences between vim and vim-tiny (which has a smaller subset of features).


Mounted external drive through fstab, permission denied even with sudo

I also use a Pi and I also attach a extern HDD.

To get it working with ntfs you need 2 other tools:

sudo apt install ntfs-3g fuse

and then you can mount your drive with
-t ntfs-3g #is needed to get read write access to ntfs drives
-o #are some options
-uid=1000 #is the id of my main user you can also use names
-gid=100 #group id of users to make it simple
-then we need a source my usb-stick with ntfs is located at SDC and the parition is SDC1
-the last point is the destination and I want it into /mnt/usbstick

sudo mount -t ntfs-3g -o uid=1000,gid=100 /dev/sdc1 /mnt/usb-stick

So the answer to your Qestion is NTFS-3G instead of NTFS.

If this is working you can also use it in your fstab.

Hint: NTFS-3G will always set access level to 777 so no wory if the folder is green :-)

br
chris

br chris


I don't know if it will help. Try installing gnome-shell

sudo apt-get install gnome-shell

Then on login page, select option ubuntu classic (no effects)


Nvidia Quadro K2000M on Dell Precision M4700 - Drivers not working

Problem solved. Need to disable optimus from BIOS. Then everything works fine.


TrueCrypt

Package in Natty

From the website: Free open-source disk encryption software for Windows 7/Vista/XP, Mac OS X, and Linux. Some of the main Features:

Creates a virtual encrypted disk within a file and mounts it as a real disk.
Encrypts an entire partition or storage device such as USB flash drive or hard drive.
Encryption is automatic, real-time and transparent.

More information about the features of TrueCrypt can be found in the documentation.

And to finish it off a nice (term used loosly...) youtube video on using truecrypt in Ubuntu 11.04


Start the "Additional Drivers" application and install the driver for Broadcom wireless cards which should be in the list.


Why is sound changed muted on 11.10 startup?

This has already been much discussed in:

No sound after boot

How can I automatically mute the volume at every boot?

(Which are really the same subject.)


How do I blow away Thunderbird's email/password settings?

You could try to start Thunderbird with the "safe-mode" option by entering in the terminal thunderbird -safe-mode, which sometimes allows one to start the program when it won't start normally. This is effectively a debug mode which makes Thunderbird start without addons disabled and with only the most basic configuration options enabled.

Alternatively, you could find your .thunderbird folder in your home folder by viewing hidden files in your file explorer. Then you should be able to navigate to the various folders, although you won't be able to access the stored passwords as they are kept encrypted in sqlite databases. So backup your profile first if you want, then navigate to .thuderbird/<profile.default>/ then delete signons.sqlite and key3.db to remove your passwords and logins. This only removes the passwords, but it will be enough to get Thunderbird running again if my first method fails.


I "elegantly solved" my problem by using the following:

sudo apt-get purge grub-pc grub-common
sudo rm -r /etc/grub.d/
sudo apt-get install grub-pc grub-common
sudo grub-install /dev/sda
sudo update-grub

Deleting the /etc/grub.d/ directory seemed to have gotten rid of whatever 12.04 files I had lurking, allowing 14.04 to get on with installing grub!

Although I would of course recommend making a backup of anything that you are about to delete.


find boot and shutdown times for a time period

At a teminal type cat /var/log/syslog | grep -i shutdown
For older syslog type cat /var/log/syslog.1 | grep -i shutdown
And you can swap out the word shutdown for other words like boot etc.


Juju is a meta package. You also need to remove juju-core

sudo apt-get remove juju-core

and this will remove the development binaries for juju devel from your machine, now after removing the devel ppa, and wiping any of the leftovers you're free to install Stable again with:

sudo apt-get install juju juju-local


How to detect RAM that was added after Ubuntu installation?

Ubuntu uses all the available RAM detected by your BIOS - there are no special commands that need to be given to detect additional RAM. In this case the problem seems to be that your BIOS is not using the added memory.

First, try using another slot for the memory. This might show if the used memory slot is defective. Then you should try if it is detected by another, compatible, computer. If not, it is likely defective.


wwwdata user not working when permissions are 400-500 - 403 forbidden access

The files need r and directory needs to be rx by the user www-data.

So, with what you want ...

find . -type f -exec chmod 440 {} \;
find . -type d -exec chmod 550 {} \;

Just make SURE you run that command from /var/www and not /

See also How to avoid using sudo when working in /var/www? or similar.

You may need looser permissions depending on what you are doing in /var/www. You may need to allow rwx on directories where users would download files, such as avatars on forums for example, or allowing x on CGI .


How to show the name of document in the dock instead of the application name?

The Ubuntu dock doesn't allow for this in GNOME (could be different for different desktop environments). The Ubuntu dock is based off of the Dash to Dock extension and this extension also doesn't allow for this.
But this can be solved by using a different option: Dash to Panel. It provides a lot more options than Dash to Dock. It's a bit different of a workflow, as the Dock and the top bar are meshed into one, but it does what is asked in the question.
You can set up Dash to Panel as follows:

Go to the extension's settings in Tweaks and click on the Behavior tab. The last option is Ungroup applications. Make sure it's ON. You can also click the additional settings on Ungroup applications.

Also have a look at Show window previews on hover on the same tab. This option will let you see a preview of the program before clicking on it.


How to set up multiple hard drives as one volume?

I decided to write the step by step directions that I did to set this up. An important note is that I did this on a system where I boot from a separate partition that is not part of the LVM. So the LVM is simply for storage and does not have any of the files needed by the OS to boot. Also this is to create the appearance of one large drive, although a similar technique can be used to create the appearance of multiple drives (well partitions really). It is a very selfish brain dump since the other guides do not all that complete to me. So I hope it can help others.

These directions are essentially from the link provided by Murat Gunes with some more information I gathered from here.

I started with a disk that I did not have anything on it that I needed.

First you need to create a partition as Linux LVM. You can use fdisk to do this. You can see all the drives Ubuntu sees and how they are listed by running: sudo fdisk -l

The first line in each section should give you enough information to identify your drive. It will look like:

Disk /dev/sda: 500.1 GB, 500107862016 bytes

The part that matters is /dev/sda. Now run: sudo fdisk /dev/sda. You will see:

Command (m for help):

Type p to list the partitions on your drive. You need to delete the partitions that you want to make part of the LVM. So type d to delete. If the drive only has one partition it will remove it (well flag it for removal, it does not happen until we tell it to do it). Otherwise I think (mine only had one) it asks you to enter the number of the one you want to delete.
Now you need to create the new parition. Type n for new. It asks whether extended or primary. Type p for primary. It asks for partition number, type 1. For first cylinder and last cylinder just leave them blank to use the defaults.
Now you need to set it to Linux LVM. Type t. It asks for a hex code, use 8e for the Linux LVM. You shoule see something like:

Changed system type of partition 1 to 8e (Linux LVM)

Finally type w to write out the changes to the disk.

Now we need to instal LVM so run sudo apt-get install lvm2 to install it.
I am gonna be honest and say I am not sure what this step does but the other directions said to do modprobe dm-mod to Load the LVM Module. I did not get any errors so I figure it worked.
We need to edit the /etc/modules file to this module loads on boot. Do sudo nano /etc/modules to open it up to edit. Add dm-mod to the list of items.  If this file is empty or does not exist, simply add dm-mod as a single line to the file.
We also want to edit the lvm configuration to update the filter so it does not take to long to scan (I think that is why anyway). So do sudo nano -w /etc/lvm/lvm.conf and change the line with:

filter = [ "a/.*/" ]

to be:

filter = [ "a|/dev/hd[ab]|", "r/.*/" ]

Now we need to set up the first LVM. Do sudo vgscan. You should see something like:

Reading all physical volumes.  This may take a while...No volume groups found

Just in case there are any volume groups already set up run sudo vgchange -a y to make them available.

Now run sudo pvcreate /dev/sda1 to set up the partition.
Now run sudo vgcreate media /dev/sda1 replacing media with the name you want the partition to be labeled as.
Now run sudo lvcreate -l100%FREE -nvolume media replacing volume with the name you want it to be called. This will use all the free space available in the partition.
Now we need to format the volume so for ext4 you would do sudo mke2fs -t ext4 /dev/media/volume.
Make the directory you want to mount the volume at. I did sudo mkdir /mnt/media.
Mount the volume by doing sudo mount /dev/media/volume /mnt/media. Now this is only for this session. When you reboot it will not be remounted automatically. To do that we need to edit /etc/fstab file. To do this add sudo nano /etc/fstab and add the line:

/dev/media/volume        /mnt/media       ext4    defaults        0       1

At this point you could start adding files to the disk, so if you need to clear other disks you want to add you could copy them on here.

Adding another drive to your volume

So follow the steps in the first bullet again but for the new drive.
Now if the drive name is /dev/sdb1 then do sudo vgextend media /dev/sdb1 to add it to the volume.
Now we need to unmount the volume. To do this do sudo umount /dev/media/volume.
Now you can see the stats on your volume now by running sudo vgdisplay. The important part is Free  PE / Size. You need to know how much space you can add to the volume for the next step.
So if you had 150 Gb of space you would do sudo lvextend -L+150G /dev/media/volume.
Now run sudo e2fsck -f /dev/media/volume to check the filesystem.
Now run sudo resize2fs /dev/media/volume to resize everything.
You can run the stats again and verify that Free PE / Size has dropped to what you expect.
Remount the volume by doing sudo mount /dev/media/volume /mnt/media
Rinse and repeat for any other drives.

Also something that I found helpful was I had files I needed to copy off of disks to the LVM I created before I added that disk. So I used `cp -r -v` so that it would recursively copy files and use the verbose output so I know what it was doing. An example of the full command would be:

cp -r -v /mnt/temp/Movies /mnt/shared/media

Where /mnt/temp/Movies is the folder you want to copy from.


It's a setting in compiz.

If you load up ccsm (compizconfig-settings-manager) and look at the Grid plugin in the Windows management section.  To disable it completely, you can untick the "Grid" plugin in ccsm and it will no longer snap like in Windows.

The main part to look at is the Edges tab in the ccsm dialog. You can disable each edge action by changing the option to "None"


SQLite connection with LibreOffice error

Probably the driver must be downloaded, compiled and installed, and then the ODCB configuration files need to be edited (cf. Thej, 2018) from this site.

Thej (2018) also gives further detailed explanations on how to set up SQLite and ODBC correctly for use with Libreoffice Base.


How do I get the touchpad on a MBP 7,1 working?

Had the same problem upgrading from ubuntu 10.10 to 11.04. I used the Synaptic drivers in 10.10, but the solution that worked the best for me was to REMOVE all mention of the Synaptics Touchpad diver and Device settings for the touchpad from the xorg.conf file.
Rebooted and the Touchpad worked perfectly with the default ubuntu touchpad drivers. The settings also appear under the mouse settings for the touchpad by default after install on the MBP 7,1

The same holds true for the Apple Magic Trackpad used with Ubuntu 11.04. It works perfectly out of the box with multi finger gestures.


This happens to me all the time. If you're certain you have KeePassRPC.plgx up to date and in the right location, you next need to clear Keepass's plugin cache.

Launch Keepass and go to Tools → Plugins. Near the bottom you should see a section called "Plugin Cache"; click the Clear button, exit the dialogue, then exit Keepass (make sure it isn't just 'closed' to the tray) and open it again.

Once you've restarted Keepass you can restart Firefox. KeeFox should work at that point.


Problem with Nvidia drivers for K20, C2070 on Ubuntu 12.04

You should try with xorg-edgers fresh X crack" PPA: this is the fresher drivers you can find for Ubuntu, for all recent graphic cards. They have versions for 12.04. And I personally use that on two workstations in production.

You can find all the information following the link below:

https://launchpad.net/~xorg-edgers/+archive/ppa


how can i install Intel Hd4000 and Amd radeon 7600 graphics driver?

Maybe you can refer to this even if it is 13.10, I think it still applies in this question


Toggle numlock without the key - without sudo permissions

Using super-user rights:

Install numlockx:

sudo apt-get install numlockx

Turn off Num Lock with numlockx off.

Turn it on with numlockx on.

Without super-user access:

gedit ~/.xinitrc

Add the following line:

/usr/bin/numlockx on

Unfortunately, you need the package numlockx for the above...


Resolvconf -u gives the error "resolvconf: Error: /etc/resolv.conf must be a symlink"

It's easy to fix. Just open a terminal and run the following commands:

sudo rm /etc/resolv.conf
sudo ln -s ../run/resolvconf/resolv.conf /etc/resolv.conf
sudo resolvconf -u


Installing GPU compatible NVIDIA driver leads to login loop

This is a Gnome issue (bug). Check your GDM. It is probably 3.18+.
Seems it doesn't work very well with Nvidia and I had the same issue.
Workaround?

I changed gdm3 to lightdm on Ubuntu. Works fine (I even used this on Ubuntu GNOME 16.04).

sudo apt install lightdm

Or use Noveau until the gnome guys fix this (at least you can use the computer).

If you read the entire bugzilla page, you will see this is not something they are prioritizing right now.


Try:

. /usr/bin/vi
thtml /usr/bin/vi
php /usr/bin/vi
html /usr/bin/vi

or

. /usr/bin/vim.tiny
thtml /usr/bin/vim.tiny
php /usr/bin/vim.tiny
html /usr/bin/vim.tiny

--Edit--
Well, as VIM is complaining that it needs a terminal window to be able to start, a solution would be to use the non-command-line version of VIM. Namely, gvim.

sudo aptitude install gvim

And this should be the file association configuration for FileZilla (tested it, and it worked for me):

. /usr/bin/gvim
thtml /usr/bin/gvim
php /usr/bin/gvim
html /usr/bin/gvim


You have to edit /etc/default/grub not grub.cfg. Change it from there and run

sudo update-grub2


Ubuntu MATE was created for users who liked the classic gnome 2 style and does an amazing job with some pretty nifty features.


copy this command to a file winecleaner.sh

\rm -f  '/home/henry/.wine/drive_c/users/henry/Application Data/foobar2000/running';'/home/henry/.wine/drive_c/Program Files (x86)/foobar2000/foobar2000.exe'

and then on the terminal run

chmod +x winecleaner.sh

and then run this program from terminal :

./winecleaner.sh

If it works fine then add this script to start-up application list


Wifi issue under ubuntu (RTL8723BE driver)

First confirm which wifi driver your system is using

sudo lshw -C network

This will give something like (just check the description: Wireless interface):

*-network
   description: Wireless interface
   product: RTL8723AE PCIe Wireless Network Adapter
   vendor: Realtek Semiconductor Co., Ltd.
   physical id: 0
   bus info: pci@0000:08:00.0
   logical name: wlan0
   version: 00
   serial: 24:ec:99:21:c9:29
   width: 64 bits
   clock: 33MHz
   capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
   configuration: broadcast=yes driver=rtl8723ae driverversion=3.8.0-27-generic firmware=N/A ip=192.168.1.74 latency=0 link=yes multicast=yes wireless=IEEE 802.11bgn
   resources: irq:17 ioport:3000(size=256) memory:c3000000-c3003fff

and confirm your driver from configuration: and see if your's is rtl8723be

Now just connect through the Ethernet temporarily and do:

sudo apt-get install linux-headers-generic build-essential git
git clone https://github.com/lwfinger/rtlwifi_new.git
cd rtlwifi_new
make
sudo make install
sudo modprobe rtl8723be

Reboot your system. Check if its working.
This works for all the kernels above 3.0


Ubuntu installer not showing install options

Solved it. Turns out that my laptop's SSD came in RST mode, which ubuntu apparently doesn't support natively, so I had to go set it to AHCI before booting from the usb.


how to find out what takes a lot of disk space?

I recommend using the command du you may want to use the -h flag so its human readable. So thusly I recommend:

du -h

This will give you a very long list of sizes and paths.

Good luck!


Is the Jolicloud DE still available and what versions does it work with?

It appears to be available for Precise (ubuntu 12.04) which is still supported until April 2017.

There doesn't appear to be any packages for any newer releases.

Sources:
https://wiki.ubuntu.com/Releases

https://launchpad.net/~jolicloud-team/+archive/ubuntu/ppa?field.series_filter=


Found the solution at last. I needed:

Alt+Super+RightClick on panel
Select "Add to panel.."
Enable "Notification Area"

After that trays was automatically merged.


Ubuntu 18.04.2 - After upgrade facing issue with input type="password" fields - Loosing focus

My solution for now: Go to Settings/Region & Language/Manage Installed Languages and Change 'Keyboard input method system change' to XIM & restart ... seems to solve the issue. (previously unselected)

Credit to: https://github.com/ibus/ibus/issues/2002#issuecomment-411218148


2 device nodes for 1 camera in ubuntu 19.10

Really I should learn to search with english keywords.

here ist the explanation for and
here the background.


How to change a HDD NTFS partition into a ext4 partition without to loss any?

You cannot convert your NTFS partition on-the-fly to ext4 (or any other) without data loss due to the fact you have to destroy the existing partition to create a new one.

What you can do:

Backup your data to an another drive/partition.
Reformat the original drive/partition
Move back your data

That's all.

Or there is an another option but I do not recommend it!

Use anyconvertfs from anyfs-tools to convert ntfs to ext2/3
Then you can convert it to ext4 using tune2fs.


How to block PCs/Phones connected to my Wi-Fi Hotspot?

network manager -> Edit connection -> select wifi -> Edit -> Wifi-security -> change Key

or

change SSID or password key from config file

 sudo gedit /etc/NetworkManager/system-connections/wifi-name


Dual Booting 12.10 2 Separate HDD Windows 7

NB: I am assuming that Windows had also been installed under UEFI, but looking at it again I'm not sure. What partitions are there on /dev/sda?

Grub doesn't seem to install the correct entries for Windows. Check out the 'Multiboot in UEFI' section here. Try booting into Ubuntu and adding a menu entry like:

menuentry "Microsoft Windows Vista/7/8 x86_64 UEFI-GPT" {
    insmod part_gpt
    insmod fat
    insmod search_fs_uuid
    insmod chain
    search --fs-uuid --no-floppy --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 1ce5-7f28
    chainloader /efi/Microsoft/Boot/bootmgfw.efi
}

The precise setup for the 'hd0,gpt1' sections might be different for your installation, also the UUID at the end '1ce5-7f28' will be different - the guide in the page I posted gives detail on how to find it.

To add the entry to grub in Ubuntu open a terminal and enter

sudo gedit /etc/grub.d/30_custom

Or possibly 40_custom. Add the entry, save, and then in terminal again

sudo update-grub


I have no internet connection after upgrading from 12.04 to 12.10

If you've got a dhcp server as most modernrouters got replace the contetn of that file with

#This file describe the network interfaces available on your system
#and how to activate them. For more information see interfaces(5).

#The loopack network interface

auto lo
iface lo inet loopback

#The primary network interface

auto eth0
iface inet dhcp

and reboot. This should fix it!