Commands, especially those related to keyboard, mouse, and touchpad settings, or xrandr commands, often need the desktop to be fully loaded. If you run them simply at login (using Startup Applications), they often run too soon and break.
Therefore, you need to introduce a little time break before your actual command runs. Use the following command instead to add to Startup Applications:
/bin/bash -c "sleep 15 && xmodmap /home/seph/Code/Ubuntu\ Scripts/Xmodmap"

Open the dash → Startup Applications → Add, and add the command.
That should do the trick.


Right side of touch pad becomes too hot while using Ubuntu

That could be your hard drive. Run the following command to prevent unnecessary spin ups and downs which can lead to undue wear to the drive:

sudo hdparm -B 254 /dev/sda

Then run the following commands to make the changes permanent:

echo "/dev/sda* {" | sudo tee -a /etc/hdparm.conf
echo "  apm = 254" | sudo tee -a /etc/hdparm.conf
echo "  apm_battery = 254" | sudo tee -a /etc/hdparm.conf
echo "}" | sudo tee -a /etc/hdparm.conf

Also, to make sure all your sensors (temp and otherwise) are detected install lm-sensors, acpi and run sensors-detect:

install:

sudo apt-get install acpi acpid acpitool lm-sensors

detect:

sudo sensors-detect

Follow the prompts.


By default, Ubuntu live-USB doesn’t keep  settings, and data after system restart, since its read-only.  In order to have settings and data saved you need to create a persistence
USB drive.

To do that click Here or Here


If your laptop has an Intel N10 graphics chip, it may be this bug: https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/830949.

If so, an easy way to test is to lower the resolution of the external display until the sum of horizontal resolutions totals less than 2048.

If it turns out to be that problem, you have several options. One is to arrange the screens vertically rather than horizontally (the idea is that everything must fit in a 2048x2048 matrix, so as long as your monitors don't add up to more than 2048 in either direction you should be fine.

The second option is to use Unity2d, which doesn't trigger this bug.


How do I stop Thunderbird from forgetting my passwords?

Scouring the internet for answers didn't help. I had the idea to purge-remove my thunderbird installation but I feared losing at least parts of my email archives in the process.

Luckily, I found a solution that went almost hassle-free:

open Thunderbird
go to Edit -> Preferences
open tab Security -> Passwords
open Saved Passwords
WARNING: The next step will erase all your passwords from Thunderbird Password Manager, so be sure to have all of your email passwords written down somewhere or saved by another password safe like KeePass!
click on delete all
close the window
in the main window, click retrieve all
when asked for your password, enter it and tick Use Password Manager to save password
send yourself an email from every one of your accounts and repeat the previous steps when prompted for passwords

That's it, your passwords should be all set again. Reboot (or logoff-logon) to test if they really stick.


/etc/hostname is what tells the computer itself what it is called. It has nothing (much) to do with the outside world. It affects things like what name is in command prompts, and what the computer reports its name as to the local network through avahi (mypc.local).

For anything as seen from the outside world you must use a Domain Name Server which is a completely different kettle of fish and provides mappings between symbolic names (FQDN) and IP addresses.


Unable to start ubuntu after display config change

Looks like you problem its triggered from the script you used in the solution you have found.
Delete that script and start over. Be sure to have Xorg as default display server.


I've written a small Lens for Unity, allowing to search and open Tomboy notes.

You'll find it here:

https://launchpad.net/~remi.rerolle/+archive/unity-lens-tomboy

Please let me know if you find it useful or have any comments/problems.

To install:

sudo add-apt-repository ppa:remi.rerolle/unity-lens-tomboy
sudo apt-get update
sudo apt-get install unity-lens-tomboy

Source -> here

What are PPAs and how do I use them?


Ignore idividual (non-security related) updates fron Discover in Kubuntu 20.04 LTS

After a release (like 20.04 or 20.10), Ubuntu rarely updates software. If Ubuntu is released with Foo 1.3, it will continue to use that version for the life of the release. Future releases will have newer versions. This means that you won't get random changes for six months until the next release of Ubuntu...or five years for the life of an LTS release of Ubuntu.

Maintainting your workflow (not changing the user interface) is one of the original goals of LTS releases.

Deb package updates in the -security pocket of the Ubuntu repositories are, of course, security-related. These are almost never new releases -- the Ubuntu security team deliberately tries to patch the vulnerability and nothing else.

If you don't install these, Unattended Upgrades will install them for you.
There are a few exceptions: For example, all releases of Ubuntu get the latest upstream releases of web browsers via the -security pocket.

Deb package updates in the -updates pocket of the Ubuntu repositories are critical (crash or data-loss) bugfixes that are not security issues. Minor bugfixes go into the next release of Ubuntu.

If you don't install these, Unattended Upgrades won't install them for you.

Snap packages are designed to update without asking you. The updates can happen at any time, including to new releases. While this is a desired feature for many users, this kind of random-update seems the opposite of what you want. For a stable, unchanging workflow, avoid snaps that are under heavy development or update frequently.
However, stable and well-maintained Snaps have some features that you may find attractive. They avoid the LTS-to-LTS migration cliff. Snaps have clearly defined interfaces that don't change. Snap sandboxing may help keep your system stable by isolating flakier applications. Many Snaps are built and tested by the upstream developers directly.


How to list gnome-control-center panel names?

If you have 3.8 installed a new feature is available which makes finding out the panel names a lot quicker, this was added in the 3.8 branch only, as of 01-10-2013, for reference this is the commit that added the feature:

 (g-c-c) Add --list command-line option

gnome-control-center -l

which will give the following with a list.

Available panels:
background
bluetooth
color
datetime
display
info
keyboard
mouse
network
notifications
online-accounts
power
printers
privacy
region
search
sharing
sound
universal-access
user-accounts
wacom


Ubuntu desktop version 16.04 install: server version is the only available choice

It looks like you downloaded a copy of Ubuntu server, not the desktop version.  Here is the link to the correct download.


System reverts to 87Hz refresh rate at every startup after I have installed nvidia drivers

None of the mentioned proccedures will work for you properly.the same prob makes my 12.04 upgrade a hell too. i just got rid of this prob & i m gonna share my soln with u. Hope it 'll help u the best:

A. first u need to set lightdm res.

1. Type/copy this command in terminal to show your display details:

   xrandr -q

    If you only have one monitor you will see a line in the output like the following ( probably with some different values, its the identifier at the start we are after):

   VGA-1 connected 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm

2. Now you need to create a bash script:

   Open up your favourite text editor, lets use gedit for this example, press alt+f2 and type ”gedit”
   Type/copy this line (replacing “1024x768″ with your desired resolution):

   #!/bin/sh

   xrandr --output VGA-0 --primary --mode 1024x768

  Save this on your home folder as ”lightdmxrandr.sh”.
  You should test this script before you put it into practice.

3. Now make it executable (by chmod command or from property dialog box)

4. Now run it:

 ./lightdmxrandr.sh

5. If everything goes right move the script somewhere more appropriate:

    sudo mv ~/lightdmxrandr.sh /usr/share/

6. now run this in lightdm, navigate to lightDM  folder & Open up the lightDM conf file:

   sudo gedit /etc/lightdm/lightdm.conf

7. Now add the line below after the last line and save – this instructs LightDM to use the resolution script you just made:

   display-setup-script=/usr/share/lightdmxrandr.sh

B. Now reboot or restart LightDM and the correct resolution should be set on your LightDM log in screen & display.

C. 1. Now install nvidia driver

   2. set proper display resolution & save the configuration file:

   sudo nvidia-settings

USE VALUES ACCORDING TO YOUR SYSTEM. VALUES USED HERE ARE ACCORDING TO MY SYSTEM .

***********************************************************************************

Enjoy!


After resizing partition Ubuntu boots in emergency mode

I solved the problem in the following manner:

In the emergency mode, I ran journalctl -xb | less and searched for errors.

It appeared that /dev/sda3 couldn't pass control sum check and therefore was refused to be mounted. Fortunately right there was a proposition to run manually fsck /dev/sda3 to fix it.

I ran fsck /dev/sda3 and, in a while, it fixed the problem.

Since then I didn't have problems booting into Ubuntu.


To get more reproducible results I would recommend to remove locally installed R with
sudo rm /usr/local/bin/R

and then install version from the official repositories by
sudo apt-add-repository universe
sudo apt-get update
sudo apt-get install r-base-dev

then test the installation by running R --version.


Google Chrome graphical glitches - AMD Radeon

If you want to change all Graphics Feature Status option to  Hardware accelerated you need to enable the flag named as
Override software rendering list.

In order to do this enter chrome://flags in address bar and then enable the flag.


How to fix LibreOffice after running `sudo libreoffice`?

Close libreoffice, then run:

sudo chown -R $USER: ~/.config/libreoffice/

it should fix all necessary ownership problems.

If it didn't work, then try moving the broken configuration files:

sudo mv ~/.config/libreoffice{,-rm}


Try to replace vga card

Check data cable

If you got a signal from your screen, boot in rescue mode and check your system.


Print return value after program execution

Yes, there are two ways. One is to set PROMPT_COMMAND in .bashrc, the other - to set command substitution in PS1 for the echo $? command.

Method 1:

From the bash manual page:

  PROMPT_COMMAND

      If set, the value is executed as a command prior to issuing each
      primary prompt.

Whatever you set this variable to, will be run before drawing the prompt each time. Demo:

$> PROMPT_COMMAND=" echo 'Last command exited with'  \$? 'code'  "
Last command exited with 0 code
$> ls /etc/passwd > /dev/null
Last command exited with 0 code
$> ls /etc/asdf > /dev/null
ls: cannot access /etc/asdf: No such file or directory
Last command exited with 2 code
$>

Note the use of \$? . For permanent change, save it in .bashrc

Method 2

Suppose my PS1 prompt is set like this:

PS1='
user@ubuntu:$> '

If I want to run some program each time this prompt is redrawn on the screen (which is after each preceding command runs), I would need to use command substitution $(. . .)  and set it in the prompt like so:

PS1=' [ $? ]
user@ubuntu: $> '

Demo:

$> PS1=' [ $? ]
> $>_ '
 [ 0 ]
$>_ ls /etc/passwd > /dev/null
 [ 0 ]
$>_ ls /etc/asdf > /dev/null
ls: cannot access /etc/asdf: No such file or directory
 [ 2 ]
$>_

Notice that I split my PS1 into two lines, top will have [ exitcode ] and bottom  $> <blank space>' . That is why there is > before $> ' on the second line (The leading > is PS2 prompt for multiline commands ) .  Alternatively, you could do something like this ( notice the $'...' structure):

  $> PS1=$'[ $? ] \n$> '
[ 0 ]
$>


Well, there is hope, but it will be tricky.
First, power off the computer. Never switch it on again until data is recovered. Hopefully previous data is still there, until it is overwritten. Obviously, you'll need another computer into which you'll mount your damaged HD in read-only mode. Alternatively, you'll need a new hard drive in the same computer, that you'll set as the boot drive, still mounting the damaged HD as secondary, read-only. Yet another alternative would be to boot in a live USB-stick, itself partitioned to allow some persistent data.

Now for the hardest part : you absolutely need the previous partition map. Start sector, end sector and exact size of each partition. If you wrote this down somewhere, or have an exceptional memory, you can proceed. If no, skip to "forensics" below.

So say you know the previous partition map. Just partion (e.g. with gparted) anew as it was before, format the partitions as NTFS and you may find your data exactly as it was, with the exception of some files which were overwritten while installing and running Ubuntu. It happened to me once, it was quite mesmerizing. Now, I had it easier as I had only one partition, so the previous partition map was straightforward.

Absent previous partition map, skip into forensics mode. I did that when upgrade to 13.04 proved to be the upgrade from hell for some reasons. I dont remember what tool I used. The good news is that I recovered some files. Bad news number one was that I didn't recover them all. Bad news #2 was that none of them had a name any more. I was left with a bunch of direcories named like recov_dir.153 holding files like f1393216.jpg (or whatever extension) so thereafter lots of manual hard work to figure out what is what.

Summary : hope exists, brace for hard work, expect some loss.


Can't boot to windows 10 after install ubuntu 18.04

Just run the update-grub

sudo update-grub

It should solve the problem.


Is there a terminator-like terminal without the X environment requirement?

I would suggest looking into screen and/or tmux.

Screen is a terminal multiplexer, which supports things like detaching, splitting into multiple views, multiplexing many terminals and so forth.

I do not know terminator, but I suspect screen may provide the functionality you are describing.


How do I create a desktop shortcut for Eclipse in my Mint Cinnamon environment?

I could not find Eclipse on the "start" menu so I added a /home/user/eclipse.desktop file in my desktop which now looks like this
    [Desktop Entry]
Version=1.0
Name=Eclipse
GenericName=Java IDE
Comment=Java IDE
Exec=/home/user/Programs/eclipse/eclipse/eclipse --started-from-file %U
TryExec=/home/user/pathtoeclipse/eclipse
Icon=/home/user/pathtoeclipse/icon.xpm
Terminal=false
Type=Application
Categories=Programming;
MimeType=
X-KDE-Protocols=;

And now it works


upgrade ubuntu server from 12.04 LTS to 14.04 LTS

It is still just released ( ubuntu 14.04 ) and not tested for such purpose as yet . But do not worry you do not need to update the host it self ( 12.04 is supported till 2017 ) only thing is containers them self that is what you needed. Good thing with containers is that they are just a bunch of files , backup them and test them is everyting ok with upgrades.
Cheers.


18.04 Mouse & Keyboard not showing in xinput but detected as USB devices


Missing driver ASUS PCE-N53 11n N600 PCI-E Adapter

I just ended up compiling the driver myself. Not what I would have wanted, but hopefully this will be fixed in the next version of Ubuntu.

I someone else has the same problem here is what worked for me:

Install build-essentials

sudo apt-get install build-essential

Download the driver from Asus. I found them here: http://www.asus.com/Networks/Wireless_Adapters/PCEN53/

Unpack the downloaded .zip file. The download comes with a lot of instructions for what you need to do. Most of them turn out to not be required.

Enter the directory where you unpacked the zip and unpack the driver code.

tar -jxvf DPO_GPL_RT5592STA_LinuxSTA_v2.6.0.0_20120326.tar.bz2

Enter the new directory and start make

make

This runs for a while and then fails due to a missing /tftpboot directory. This does not seem to be relevant since the correct file is made anyway.

Now install the driver.

sudo make install

The installation instructions tells you to edit a /etc/rc.d/rc.local file. Since I didn't have neither the file or directory I just skipped this step and rebooted.

After the reboot everything seems to work. Ubuntu automatically found the card and it is what I am using now. Since I have only been using it for 10 minutes I don't know how stable it is but hopefully it will be ok.

Note: I found that I had to have my Ethernet unplugged and then restart Ubuntu for this to take. Otherwise works great.


Ubuntu Installation Fails from cd and usb stick

Have you tried UNetbootin?

It can create a bootable usb drive using the.iso file you downloaded.
It is available for Windows, Mac and Linux. You may have more luck with it.
Here's a link: http://unetbootin.sourceforge.net/


14.04 Desktop: Static IP is acquired, ping works, DNS does not

I don't typically want to answer my own questions but I fixed this issue - mostly. The answers were on these 2 posts:

Static IP configuration causing apt-get errors

resolv.conf doesn't get set on reboot when networking is configured for static ip

Ultimately the answer was to add:

dns-nameservers 10.0.1.1

At the end of the eth0 definition in /etc/network/interfaces. This solves all of my access issues to he outside world. However, I have gone from a very quick boot up to a boot up that takes a couple of minutes while it waits on the network config for some reason. The static IP is reserved with the router so conflicts really shouldn't be the issue.

Anyways the system now works functionally with the static IP I want. The long boot up is just an annoyance.


How to disable services when Ubuntu loads?

The command to disable services on rebooting of Ubuntu based systems

 systemctl disable servicename

for centos6: chkconfig servicename off


AMD Radeon Graphic Card Seen as 'Unknown Display' after Installing Ubuntu Bionic 18.04

Well, I don't know why but on the 4th attempt and after installing the updates (like on the previous attempts), Ubuntu manages after the reboot to show a 4K HD display ... Without having to try to install or re-install anything.
The About screen saying:
Graphics AMD® Radeon RX 5700 XT
A further note : Installing the 18.04.3 ISO Image without access to the Internet installed Kernel 5.0 and the working MacIntosh Wi-Fi support from package bcmwl-kernel-source. Later the update installed Kernel 5.4 and the Wi-Fi Internet was still working on both Kernels.
When I tried installing 18.04.4 ISO Image it installed Kernel 5.4 and the Wi-Fi was not working. Trying to install bcmwl-kernel-source failed as well.


How can I terminate a ping output in a linux terminal on a AMI (Amazon Machine Image) machine

Try pressing Ctrl+Z. It works for me on Amazon Linux 2 AMI. It terminates the ping response and takes you back to the $ prompt.


Unable to change resolution after ubuntu.css edit (18.04)

I attempted to re-install NVIDIA drivers to no avail, and also tried to reset to default theme/icons, which didn't help. I had to run a master sudo apt-get update, which fixed everything!


Problems installing ubuntu 12.10 alongside windows 8

First, UEFI is not a "new Windows;" it's a new firmware that's in the process of replacing the 30-year-old BIOS. See the Wikipedia article on UEFI for details.

There are a number of possible causes for your problem. The easiest one to solve is that you simply need to select the boot device using a boot menu. On my ASUS P8H77-I motherboard, this menu can be accessed by pressing F8 as the computer starts up. (As soon as you power on, start repeatedly tapping F8.) It's possible you'll need to use another key, though. Using it should produce a boot menu that gives you boot options. If you have trouble getting the menu, try again; it can be finicky. Be sure to select the boot option for your USB drive that includes the string "UEFI" or "EFI," otherwise you're likely to install in BIOS mode, which will cause further problems down the line.

Another possibility is that your problem is with a specific UEFI feature called Secure Boot. Microsoft is requiring computers that bear a Windows 8 logo to ship with Secure Boot enabled, but this blocks other OS installations. Linux distribution maintainers have announced plans to work around this obstacle, but I don't know offhand if they were implemented in time for Ubuntu 12.10's release. If not, you'll need to do something about it yourself. The only practical solution at the moment is to disable Secure Boot in your computer's firmware. To do this, you'll need to enter the setup utility, locate the option, and disable it. On my ASUS P8H77-I motherboard, you'd press Del during the boot process to enter the setup utility. Once in, pressing F7 enters Advanced mode, which is necessary to get at the options. Enter the Boot menu and select the Security Boot Parameters option, which reveals additional options to enable or disable Secure Boot. My motherboard shipped with Secure Boot disabled, so I'm not sure exactly what you'll see, but my hunch is you'd want to change OS Type from Windows 8 UEFI to Other Legacy & UEFI. Of course, all this assumes that you'll see the same menus in your ASUS UX31 computer as I see in my ASUS P8H77-I motherboard. That's not really a safe assumption; you may need to improvise. In the future, major distributions will ship with installers and boot loaders that will work with Secure Boot, and additional boot loader programs will exist to help work around the trouble that this feature causes. (Note that Secure Boot has real potential to solve some security problems, particularly in Windows 8. Although conspiracy theories abound concerning Secure Boot, I'm unconvinced by them.)


How can I solve, error:unknown filesytem grub rescue>

First Method

First completely uninstall Grub.
Then use the Ubuntu 9.10 Live CD to boot. Use the following command to boot the CD

$ sudo fdisk -l
After the complete boot check where the Ubuntu is installed and note down the location. Then mount it using this command:

$ sudo mount -t ext3 /dev/sda2 /mnt
Next change the Location or Directory which is of your choice.

$ /dev/sda2
Now install the Grub again

$ sudo grub-install --root-directory=/mnt/ /dev/sda

Second Method

Restart the system and boot from Ubuntu 9.10.
After the boot you will need to edit the grub.
Now the computer is booting to grub. Create new command line to edit the grub. Use these commands as given below:

root (hd0,0)

kernel /vmlinux-version ro root = /dev/hdaN

initrd /initrd-version
At the end press Ctrl+x to boot it properly.
In the system level you will need to upgrade the GRUB. To do this use the following command:

$ upgrade-grub


unattended-upgrades sends attachment instead of text

Aha, thanks for the raw message, that makes all the difference.

The heirloom-mailx mailer is trying to be helpful; it isn't the unattended-upgrades script itself that is creating the attachments. If you want to keep heirloom-mailx, you can try creating a new configuration file to set the encoding variable to different values, and use the MAILRC environment variable to select the different configuration. Probably some configuration can be found that will just send along the data without any mangling.

Another option would be to use the bsd-mailx version of mailx(1) instead, it is less helpful and will just send raw data.


Why are .goutputstream-xxxxx files created in home folder?

This is a bug - https://bugs.launchpad.net/ubuntu/+source/lightdm/+bug/984785

Pretty sure it's not ubuntu one - I don't have it here and have the files.

I delete them every now and again, not caused me any issues.

You can run this command in a terminal to delete them all:

cd && rm .goutputstream-* -v


After booting from the Ubuntu live CD (tried 14.04 and 16.04) I was able to work around this problem by running update-grub chroot'ed to the grub partition.  (Substitute /dev/sda1 below with whatever partition you installed grub on. All commands as root.)
mkdir /mnt/chrootdir
mount /dev/sda1 /mnt/chrootdir
for dir in proc dev sys etc bin sbin var usr lib lib64 tmp; do
    mkdir /mnt/chrootdir/$dir && mount --bind /$dir /mnt/chrootdir/$dir
done
chroot /mnt/chrootdir
grub-install /dev/sda # May not be required
update-grub2


Ok I have found the problem. It is rather stupid...

In tutorial they say to run:

./configure CFLAGS="-O3"

But the flag IS NOT 03 (zero three) but O3 (o three)
Thats all...


How do I perform an installation with RAID1 HDDs and two SSDs?

Ubuntu used to provide this alternate install CD, which offered all md raid functionality during the partitioning step of the installer. I cannot find this online anymore, but I suspect you can give a try to the Ubuntu Server installlation CD. You can install the Ubuntu desktop even from the Server installation - it is really the same distribution, just with different default package selections.

Ubuntu used to employ the Debian System installer, which offers all the RAID features. The server Installation CD probably still does something similar, though I am not up to date on that.

Also I would recommend to use one of your SSDs as /-Partition and mount the Bulk-Storage to /home or /srv, depending on your use. Symlinking /home and /srv together is also not unheard of. The reason is that the operating system can really profit from the speedup offered by the SSD, so it would be a waste to put it on the disks. Also if your SSD breaks you can always just reinstall the OS, the safety offerd by the RAID1 is much more important for your own data.


PHPMyAdmin - How to fix #1006 - Can't create database 'database_name' (errno: 13 "permission denied") in Ubuntu 20.04?

TO be able to create database you have to login to phpmyadmin as root or with the account that have required permission. first make sue you have started mysql by typeing
$service mysql start

To get started you can create a new user for your mysql. you can do that by
mysql>CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';

where newuser is the username. You can set that to the username of your accountwhuch make it easier to work with.and yes localhost is the server you are using and password is the password you want to set for mysql login.
Now you have creates a new user and it's time to make that user capable of doing stuffs. You can do so by
mysql>GRANT ALL PRIVILEGES ON *.* TO 'newuser'@'localhost';

here *.*means that we are granting the permission for every table of every database which also meanwe can create if we need. So now you should be able to create database by username newuser Just in case if you need to log into mysql from terminal then do
mysql -u newuser -p

During this proces I am assuming that you will run all these command as root.


How to stop Network Manager from continually prompting for wireless password

May I suggest that you run in a terminal

nm-tool

That will give you a list of wireless access points that are in range, the frequency that they are transmitting on and the signal strength.

Your wireless access point/router could be using the same frequency as another access point and if they are at the same or of similar strength it could explain why your connection is dropping. It may also mean that network manager after failing to connect to your access is now trying to connect to this other one. And that is why it is asking for a password. You have the right password for your access point but not for the access point that network manager is trying to connect to.

You may need to enter your router's set up program and select a different channel or frequency.


Can't get movie player to play on my TV via HDMI connection

It sounds like you have your desktop extended to your TV, meaning that Ubuntu is treating your two monitors as separate entities. You should be able to drag the movie player over to your TV (either by going past the right or left of your screen), and watch it that way. If you want both of your displays to show the same thing, simply open up Displays (it's a setting/program), and check the "Mirror Displays" option. I don't think you can mirror on displays that have different resolutions though.


Ubuntu 20.04 And up

Install GNOME Tweaks from the Ubuntu Software app.
Open GNOME Tweaks.
Go to the Fonts Category.
Change the Interface Text to a more larger font size. (11 or more)
Save the changes.

Other Methods:
Reinstall OS. reinstall gnome-shell. reinstall ubuntu-desktop.


Adjusting display geometry in a virtual machine?

Display Geometry Settings in Virtual Box
In Oracle Virtual Box you can adjust the virtual screen resolution after having installed the Guest Additions simply by dragging the window with the mouse or by choosing full screen mode. No need to do anything with xorg.conf. XServer 1.10 (included in   11.04) and thus Unity 3D runs only in Virtual Box >=4.0.6.
1. Use Mouse to adjust screen size
Adjusting the screen by resizing the Virtual Box Windows with the mouse allows for any screen resolution up to the host screen resolution.
2. Use predefinde standard screen sizes
If you need a fixed (standard) resolution you may also choose System Settings -> Monitors (for 11.04) or Displays (for 12.04) for a selection of fixed resolutions (here shown for 12.04):

For maximum host screen resolution you will need to run Virtual Box in Fullscreen mode (Host + F)
For a fixed host screen resolution we need to disable Auto-resize Guest Display (HOST+G) from Virtual Box Manager View menu.

3. Define new geometry with xrandr
If you need a fixed geometry that is not in the list of resolutions for monitors you will have to use xrandr to define a new resolution:
First we use gtf for calculating the modeline of possible resolutions:
gtf <xres> <yres> <refresh> [-x]

Give the desired values for x-resolution, y-resolution and refresh rate. The flag -x is default and can be omitted. For a portrait resolution 480x640 at 60 Hz you will get the following output:
$ gtf 480 640 60 -x
$ 480x640 @ 60.00 Hz (GTF) hsync: 39.78 kHz; pclk: 24.82 MHz Modeline "480x640_60.00" 24.82 480 504 552 624 640 641 644 663 -HSync +Vsync

From this we can copy & paste the modeline to add it to xrandr list of known resolutions:
xrandr --newmode "480x640_60.00" 24.82 480 504 552 624 640 641 644 663 -HSync +Vsync

and add this for the Virtual Box Monitor:
xrandr --addmode VBOX0 480x640_60.00

Replace VBOX0 with the appropriate monitor if you have setup Virtual Box with multiple monitors (or any other output name the driver reports).
We can now switch to the newly defined geometry as described above (2.).


How to check the list of packages and applications installed along with the name of the users that installed them.?

I've written a script that parses authentication logs. The basic idea that any installation attempt requires authentication from sudo and polkit.

The script doesn't list whether or not installation attempt was successful or not - only the fact that user attempted to install something ; this feature might be added in future. The reason for that is difficulty in parsing - authentication attempts do list commands attempted, but apt and dpkg logs actually list what has been successful but don't mention who installed what.

The script can differentiate whether it was done via command-line or gui tools ( with -c and -g flags) as well as filtering by user (the -u flag).

The script should be a used as a tool by administrators for auditing software installation attempts ; the actual fact of  successful installation can be verified through filtering of dpkg --get-selections

The script can also be found on   my github

<!-- language:bash -->

#!/usr/bin/env bash
#
###########################################################
# Author: Serg Kolo , contact: 1047481448@qq.com
# Date: April 4, 2016
# Purpose: filtering installation attempts
# Written for:
# Tested on:  Ubuntu 14.04 LTS
###########################################################
# Copyright: Serg Kolo , 2016
#
#     Permission to use, copy, modify, and distribute this software is hereby granted
#     without fee, provided that  the copyright notice above and this permission statement
#     appear in all copies.
#
#     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
#     IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
#     FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
#     THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
#     LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
#     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
#     DEALINGS IN THE SOFTWARE.

ARGV0="$0"
ARGC=$#
print_usage()
{
cat << EOF
Usage: list_installs.sh [-c] [-g]  [-u username] [-h]

The script parses authentication logs and filters
installation attempts based on whether they've been
done through gui, command-line, or particular
user. Note that it lists all attempts at authentica-
tion for software installation. It doesn't show
whether or not the installation succeeded.

Installations done via gui tools typically use
polkit, so entries don't show exact item that
has been installed, only the tool used -
/usr/bin/software-center for example. Hence,
date-stamps still have to be cross checked with
apt history logs

Note that authentication logs (auth.log) are
rotated as outlined in /etc/logrotate.conf ,
typically every 4 weeks. This may need to be
tuned by your system's administrator to list
installs over longer periods of time
EOF

}
dump_logs()
{
  find /var/log/auth.log.*.gz | sort  -r -V | xargs zcat > "$1"
  cat /var/log/auth.log >> "$1"
}

generate_report()
{
  awk '$0~/.*apt-get.*/||/.*dpkg.*/||/.*org\.debian\.apt\.install-or-remove-packages.*/\
       {print $0;print "- - -"}' "$1"  > /tmp/report.tmp
  mv /tmp/report.tmp "$1"
}

gui_installs()
{
  awk '$0~/org\.debian\.apt\.install-or-remove-packages/\
       { printf "%s %s %s ",$1,$2,$3;\
         for(i=4;i<=NF;i++){\
            if($i~/unix-user/){\
               printf " %s ",$i; };\
            if($i~/action/){\
              printf "%s\n",$(i+1); next  }\
         }\
       }' "$1"
}

cmd_installs()
{
  awk '$0~/.*apt-get.*/||/.*dpkg.*/{\
       printf "%s %s %s ",$1,$2,$3 ;\
       for(i=1;i<=NF;i++){\
          if($i~/sudo/||/pkexec/){\
             printf " %s ",$(i+1)};\
          if($i~/COMMAND/){\
            for(j=i;j<=NF;j++)\
               printf "%s ",$j\
          }\
       };
       printf "\n"  }' "$1"
}

parse_args()
{
 local OPTIND opt
 # no leading : means errors reported(which is what i want)
 # : after letter means options takes args, no letter - no args
 while getopts "cgu:h" opt
 do
   case ${opt} in
     c) cmd_installs "$DUMPFILE"
        ;;
     g) gui_installs "$DUMPFILE"
        ;;
     u) UNAME="${OPTARG}"
        echo ">>> CMD INSTALLS <<<"
        cmd_installs "$DUMPFILE" | grep $UNAME
        echo ">>> GUI INSTALLS  <<<"
        gui_installs "$DUMPFILE" | grep $UNAME
        ;;
     h) print_usage
        ;;
    \?) echo "Invalid option: -$OPTARG" > /dev/stderr
        ;;
    esac
  done
  shift $((OPTIND-1))
}

main()
{
  local DUMPFILE="/tmp/auth.dump"
  dump_logs "$DUMPFILE"
  generate_report  "$DUMPFILE"
  parse_args "$@"
  rm "$DUMPFILE"
}
main "$@"


What are the types of user group in Ubuntu?

Open a terminal by pressing Ctrl+Alt+T.

In the terminal, type the following command, then press Enter:

sudo adduser USERNAME

This will create a new user (replace USERNAME with the new user's username). It will ask you to enter a password for the new user, as well as a bunch of other optional information (full name, phone number, etc). Now, add that user to the sudo group:

sudo adduser USERNAME sudo

(again, replace USERNAME with the new user's username). This will allow the new user to run any command as root by typing:

sudo COMMAND

in the terminal, and then entering the new user's password.


Guest Additions copy & paste does not work on Ubuntu server

For a GUI-less server the shared clipboard functionality of Virtual Box can not work. A text-based server does not have a clipboard.

We may still want to install guest additions in an Ubuntu server for the following features they provide:

Shared folders using vboxsf filesystem
Time sync with the host
generic host-guest communication via VBoxManage guestproperty
automatic guest logon (passing credentials on booting the VM)

Installing guest additions needs access to build tools such as gcc or make.

Also see: How do I install Guest Additions in a VirtualBox VM?

For copy and pasting commands from the host to the guest I would recommend an SSH session, which would also give you many additional features for remote guest control.


How to create Windows like taskbar toolbar to access desired folder and subfolder fast?

There is an application called LauncherFolders (see the linked article for information) that should work. I've used it and it works wonderfully.

http://www.noobslab.com/2014/09/install-launchfolders-for-unity.html


Download the iso image from here:
http://releases.ubuntu.com/12.04/ubuntu-12.04.5-desktop-amd64.iso. It would be around 800MB
Download unetbootin from the given link: http://unetbootin.sourceforge.net/
When asks for iso location, point to the location where your download iso.
Then click OK button, and wait it till it does it work, when it's done, you've bootable flash drive.


The package list, as it names indicates, is the list of all packages contained in all the repositories in your sources.list configuration files. Most of the package managers (including APT) uses packages list.
This lists reside in the /var/lib/apt/lists/ directory and apt systems update them whenever you update the lists (please, note that there is a difference between update and upgrade) apt will fetch the lists from the repositories and store it locally for future uses. Whereas you run any command in apt this list are loaded an processed and your commands (like install, remove, upgrade).
Reference:

https://www.debian.org/doc/manuals/debian-reference/ch02.en.html


Sounds like your software source is CD/DVD... you should probably want to use the internet. Open Ubuntu Software Center, then place your mouse cursor on the top of the screen. A menu should appear with the options File, Edit, etc. Click Edit >> Software Source. In the very first tab you just need to disable the bottom option "install from CD".

Have a look at the official documentation if you have trouble: https://help.ubuntu.com/community/Repositories/Ubuntu


installing pip3 (for python3) on ubuntu 16.04 LTS using a proxy

The first procedure you followed is correct

sudo apt-get -y install python3-pip

But before installing try to update using command

sudo apt-get update

If first did not work then you can also do this using curl

curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
python3 get-pip.py --user

Then to verify installation try

pip3 --help

For checking version :

pip3 --version


Before installing software.

sudo apt update updates the list of available packages and their versions, but it does not install or upgrade any packages.


Can't get my Linksys USB wifi adapter to work

By chance this question has been asked before, and a good explanation of your problems exists here: https://askubuntu.com/a/203339/174139

It seems like you will need to employ ndiswrapper to apply a Broadcom Windows XP Driver to your system. Unfortunately you will need an internet connection to download that driver, unless you have a copy on the CD that came with the AE1200.


WIFI not working Acer Aspire 3690 - BCM4311

First of all, ndiswrapper is not required. Let's remove it:

sudo apt-get purge ndiswrapper-common
sudo rm -rf /etc/ndiswrapper

Make sure that the needed driver is loaded:

lsmod | grep b43

If not, let's load it:

sudo modprobe b43

If it didn't load automatically, it is probably blacklisted somewhere; check:

ls /etc/modprobe.d

Once you post the result, we'll find and remove the blacklist.

Finally, be certain the wireless switch or key combination is set to enable wireless:

rfkill list all


Static IP address issue with Ubuntu Server 12.04

While configuring static ip address , You can configure nameserver by dns-nameservers as shown in below. You don't need to configure /etc/resolvconf/resolv.conf.d/base.
Here is my contents of /etc/network/interfaces.

    auto eth0

    iface eth0 inet static
            address 192.168.11.21
            netmask 255.255.255.0
            network 192.168.11.0
            broadcast 192.168.11.255
            gateway 192.168.11.1
            dns-nameservers 192.168.11.1


You shall not use useradd, but use adduser instead. However, if you insist on using useradd, here is what you should do:

sudo useradd -Ng sftponly -G sftponly -ms /bin/false "$USER"

The -g option only changes the /etc/passwd file, making "sftponly" the primary (login) group ID of the user. The -G option modifies /etc/groups.


How can I remount a disk partion and clear its data?

guiverc's comment was a good help. I used the following steps:

delete the partition with Gparted
reinstall GRUB
boot a live system | boot from USB stick with Ubuntu ISO
use Gparted to resize the disk space
reboot


Prevent Nautilus from generating thumbnails for video files larger than 5 MB?

This is a known bug affecting all the distros (not Ubuntu specific), but it seems to be much more a feature.

What the developers said:

"This is intentional, because creating a preview for a video file some GB large is not more expensive than creating one for a 1MB video. This is also true for e.g. PDF files, but not for e.g. pictures, which is why we have that preference."


How to use wget to download a file which can be downloaded by firefox' default downloader?

Some websites or servers block wget (and similar tools) in order to only allow downloads from a browser. You can trick the website into thinking that you are an actual browser. There are many examples available on google. Here is a particularly complete one taken from askapache. To find alternatives just google wget pretend browser.

wget
  --referer="http://www.google.com"
  --user-agent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"
  --header="Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5"
  --header="Accept-Language: en-us,en;q=0.5"
  --header="Accept-Encoding: gzip,deflate"
  --header="Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7"
  --header="Keep-Alive: 300"
  -dnv [THE URL; in your case: https://code.ros.org/trac/wg-ros-pkg/raw-attachment]/ticket/5069/rein_cmakelists2.patch

This is one command, though I put it on several lines to increase readability. You can make it an alias to make it easier to use.


First check if the Ubuntu Unity interface isn't still installed by clicking on the Ubuntu logo next to your name in the log-in screen. Maybe the Unity interface is still installed.

This post explains exactly how to change between different versions of *buntu. The easiest way would be to install Ubuntu Desktop before removing Xubuntu Desktop (if you want to remove it, you can  also keep both Ubuntu and Xubuntu installed so you can switch at will, but you will have a lot of (double) software installed and use more HDD space.)


Make sure your console starts in framebuffer mode.
Add your user to 'video' group:
Install mplayer sudo apt-get install mplayer
Run mplayer -vo fbdev video.avi

I was able to run a videofile in framebuffer with a default installation if Ubuntu 11.10


This is from: https://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html#SECURITY

security (G)

This option affects how clients respond to Samba and is one of the most important settings in the smb.conf file.

The default is security = user, as this is the most common setting, used for a standalone file server or a DC.

The alternatives are security = ads or security = domain , which support joining Samba to a Windows domain

You should use security = user and map to guest if you want to mainly setup shares without a password (guest shares). This is commonly used for a shared printer server.

The different settings will now be explained.

SECURITY = AUTO

This is the default security setting in Samba, and causes Samba to consult the server role parameter (if set) to determine the security mode.

SECURITY = USER

If server role is not specified, this is the default security setting in Samba. With user-level security a client must first "log-on" with a valid username and password (which can be mapped using the username map parameter). Encrypted passwords (see the encrypted passwords parameter) can also be used in this security mode. Parameters such as user and guest only if set  are then applied and may change the UNIX user to use on this connection, but only after the user has been successfully authenticated.

Note that the name of the resource being requested is not sent to the server until after the server has successfully authenticated the client. This is why guest shares don't work in user level security without allowing the server to automatically map unknown users into the guest account. See the map to guest parameter for details on doing this.

SECURITY = DOMAIN

This mode will only work correctly if net(8) has been used to add this machine into a Windows NT Domain. It expects the encrypted passwords parameter to be set to yes. In this mode Samba will try to validate the username/password by passing it to a Windows NT Primary or Backup Domain Controller, in exactly the same way that a Windows NT Server would do.

Note that a valid UNIX user must still exist as well as the account on the Domain Controller to allow Samba to have a valid UNIX account to map file access to.

Note that from the client's point of view security = domain is the same as security = user. It only affects how the server deals with the authentication, it does not in any way affect what the client sees.

Note that the name of the resource being requested is not sent to the server until after the server has successfully authenticated the client. This is why guest shares don't work in user level security without allowing the server to automatically map unknown users into the guest account. See the map to guest parameter for details on doing this.

See also the password server parameter and the encrypted passwords parameter.

Note that the name of the resource being requested is not sent to the server until after the server has successfully authenticated the client. This is why guest shares don't work in user level security without allowing the server to automatically map unknown users into the guest account. See the map to guest parameter for details on doing this.

See also the password server parameter and the encrypted passwords parameter.

SECURITY = ADS

In this mode, Samba will act as a domain member in an ADS realm. To operate in this mode, the machine running Samba will need to have Kerberos installed and configured and Samba will need to be joined to the ADS realm using the net utility.

Note that this mode does NOT make Samba operate as a Active Directory Domain Controller.

Read the chapter about Domain Membership in the HOWTO for details.

Default: security = USER

Example: security = DOMAIN


Files Shown in Terminal not Show on Desktop

Files that start with a . are hidden from the graphical interface.

To view them, just open up your file browser and go to 'Edit'->'Preferences' and check 'Show hidden files and backup files'.

You can also toggle the hidden files using Ctrl+H

EDIT:

To get the hidden files to show up in terminal, use:

cd
ls -al

cd takes you back to your home folder while ls -al lists (the -l flag) all files (the -a flag) hidden or not.


Want to delete all the backup data in the deja dup folder but I have forgotten the password

You can just remove all the files in the back-up location, encrypted or not. There's no need to know the decryption key or anything about a data set to destroy it.


How much space is used by a package in rc state?

The config files should be listed in /var/lib/dpkg/info/<package>.conffiles. For example, with the dpkg package:

$ cat /var/lib/dpkg/info/dpkg.conffiles
/etc/alternatives/README
/etc/cron.daily/dpkg
/etc/dpkg/dpkg.cfg
/etc/logrotate.d/dpkg

If there aren't too many files, you can use xargs and du:

$ xargs -a /var/lib/dpkg/info/dpkg.conffiles du -c
4       /etc/alternatives/README
4       /etc/cron.daily/dpkg
4       /etc/dpkg/dpkg.cfg
4       /etc/logrotate.d/dpkg
16      total

If there are too many files, you'll see multiple total lines.


What you are seeing is missing dependencies with unity and compiz. Type apt-get build-dep compiz, then apt-get build-dep unity. Should clear that problem up after a reboot. Now me I have the wallpaper/effects but no taskbars side or upper! So if anyone knows how to clear that up, would be grateful!!! Running multiple desktops Gnome 3.8, KDE, LXDE, XFCE etc.


What does the "apt-get dselect-upgrade" command do?

As others have pointed out, it "follows dselect choices". One nice thing about this, is one can feed a list of packages selections to dpkg:

dpkg --clear-selections
dpkg --set-selections < package_choice_list

then do "apt-get dselect-upgrade" and it will remove anything not in the list, and install everything in the list. I don't think any other package tool can do that. It gives one a way to ensure "these and only these" packages are installed, which is very convenient.


How to switch to full-width Latin characters with ibus-libpinyin?

So long as you haven't modified the shortcuts, you'll need to use: Ctrl+Shift+F. Think "F" for "Full Width" if you need a simple way to remember


Can I use Ubuntu to diagnose hard drive or RAM problems in Windows?

You have an option for both without the need to install anything else:

Checking your RAM (MemTest)

Simply boot your LiveCD, LiveDVD or LiveUSB and on the first menu you will see the option for Checking you Memory RAM (This option will not show on EFI boot enabled systems. For an explanation of this behavior please visit the MemTest86 Support Page and a Bug Report already present since 2011):

This is most likely the BEST app to check your memory. Simply wait until the first line that says PASS gets to 100% (The one that says 4% on the image below). It will repeat itself but with one pass should be enough:

If you do have a bad memory, you will get at least one RED row on the bottom half of the app. If you get at least one, then you have some serious Memory problems. In the image below, the user has MANY memory problems and should immediately change the RAM:

I suggest to test each memory individually if you do find a memory error. This way you will know which memory slot is the culprit and can simply change that one.

Checking you HDD or SDD

In the LiveCD, LiveDVD or LiveUSB and without any additional installation you have the Disk application. Simply open Dash and type disk, you will see the "Disk Utility" app:

Open it and it will look something like this:

Now select your HDD or SDD and then select the Gear icons to the right. From that menu select the SMART option:

Here you can see the state of the disk, Temperature, Powered on time and any errors it has, any FAILS it has and you can even check it for problems with the Start Self-Test button below:

So as you can see the LiveCD, LiveDVD or LiveUSB comes in handy when you want to do some diagnostics on the computer.


Le he quitado la tarjeta micro-SD y ya funciona correctamente.

I have removed the micro-SD card and it is already working correctly.


How can I recover data from an unmountable drive, and copy it to a new drive?

I suggest you to first create a disk image, then try a recover. This because you need to put as much data as possible in a safe place, especially when the drive is showing hardware failures (like clicks and noises).

For this you can use the ubiquitous dd tool. Something like this:

dd if=/dev/sdx of=./disk.img bs=512 conv=noerror,sync status=progress

where sdx is the device name as seen by Linux.
Check that you have enough free storage to create the disk image that will be as bis as the maximum disk capacity.
As an option, especially if your drive is showing hardware failures, is to use safecopy (you'd need to fist install it from the repos).

safecopy uses multiple passes to copy the disk with increasingly "deeper" means in order to extract as much data as possible. With non-broken hardware it's as fast as dd.

Once you have your image you can go on with tools like testdisk and foremost or scalpel, all available from official repos along with man pages.


How is /etc/default/grub generated during installation?

/etc/default/grub is created by the grub-pc post-installation script. You can probably regenerate in using

dpkg-reconfigure grub-pc

although I haven't tested it.


Make Home folder accesible to different installations

you can try this on superuser mode (root, or use sudo user), but it is not recommanded (low security level) :

chmod +r /path/to/your/old/folder -R
cp /path/to/your/old/folder /path/to/your/new/folder -R

or You can try this but also it is not recommanded (low security level):

chown nobody.nogroup /path/to/your/old/folder -R

or you can create linux user with same uid and gid in this case you can read your folder without problem.


sudo apt-get install xscreensaver-gl-extra

There's a nice once called Flurry but it's quite intensive on the computer and not a very energy-efficient method of not using your computer.

Here's what it looks like:

Edit. There's a whole load more in xscreensaver-data-extra too if you want something different.


How can I enable autologin for my user account when the option is not there?

Found the cause of this one. I fired up a new blank VM with a view to installing Ubuntu on it and seeing if the issue persisted in a fresh install.
During the install process, on the "Who are you?" screen you get the option to "Log in automatically". You also get the option to "Encrypt my home folder".
I have encryption enabled on the original VM. It appears that you cannot use automatic login if you are using home folder encryption. (The installer will not let you select them both together, it automatically deselects the auto login if you select encryption and vice versa).
I found this post about deactivating home folder encryption. http://ubuntuforums.org/showthread.php?t=1134121
From my original account i did the following:
I opened a terminal (Ctrl-Alt-T).
I issued sudo su to become root.
I issued cp -rp /home/user /home/user.backup to take an unencrypted copy of the home directory (replacing user with my actual username).
while doing the copy i received the error message:

cp: cannot stat /home/tom/.gvfs': Permission denied

I just ignored it. Everything seemed to be copied ok.
I issued gedit /etc/default/grub so I could comment out the lines

GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true

I saved, exited gedit and issued update-grub to update GRUB.
I rebooted the VM and selected

Ubuntu, with Linux 3.2.0-26-generic-pae (recovery mode)

from the boot menu. When the Recovery Menu appeared I selected "root".
From the prompt I issued mount -rw -o remount / to remount the root partition with read/write permissions.
I issued rm -rf /home/user to delete the home folder (replacing user with my actual username).
I did not use apt-get to remove ecryptfs-utils as I might want to encrypt the home folder of another user account at a later date.
I issued cp -rp /home/user.backup /home/user to recreate the home directory from the unencrypted backup (replacing user with my actual username).
I issued rm /home/user/.ecryptfs and rm /home/user/.Private to remove the symlinks (replacing user with my actual username).
I issued rm -r /home/.ecryptfs/user to remove the encrypted home folder (replacing user with my actual username).
I issued reboot now to reboot the VM. Doing this returns you to the Recovery Menu; if you wait a few moments it will reboot.
I selected

Ubuntu, with Linux 3.2.0-26-generic-pae

from the boot menu (i.e. to boot normally).
Once booted I went into User Accounts. The auto-login option was now available. I unlocked, cleared up the test accounts, enabled auto-login and rebooted. It worked.
I used gedit to edit /etc/default/grub and return it to normal. (Don't forget to update-grub after editing.)


Can I install Ubuntu into a Windows Dynamic Volume?

It is not possible to install Ubuntu on a dynamic volume/logical partition, you need a primary partition to install Ubuntu. Have you tried instead, installing Ubuntu on Virtual Box? I can assure you the results will be much better.


Dual boot Windows 7 and Ubuntu on an Acer Aspire Ultrabook S3-391

there is no "damage" of hidden recovery-partition possible (partition of M$) - yes, it is possible to delete the recovery-partition - but it can be re-awakened by simple bios-update before you reinstall then after bios-update with Windows 7 (only necessary when you want to give up Linux/Unix installation) - but warning here, dont do bios-update of UEFI-Bios ! - when anything is working fine with installed Linux already before. a bios-update is not ultimately necessary and has no effect to performance. so no need "to fix somthing, where nothing is broken".


The program's name is seahorse. If you can't find it in the menus, run seahorse from a terminal.

Right click on the keyring you want to change the password for, and select "Change Password":


Disable title bar in non full window mode in Unity Ubuntu 16.04

You can use the following command:

gsettings set com.canonical.Unity integrated-menus true

It will set application menu on title bar.

Instead, if you want to have all applications menu on the top bar change true value to false.

Update: if you are not confident with command line, you can use the graphic interface:
open to System Settings, then select Appearance, select Behavior tab and you can change the option you are looking for in the Show the menus for a window area.


How do I bypass the "Password needs to be longer" warning while setting a new password?

Set long throwaway password and then type this in terminal to change it to shorter one sudo passwd <user>
It should allow short password this way


How do I fix a bad /etc/fstab if the hard disk read-only?

I mounted the partition using mount -o remount,rw /dev/sda5 /
in the Ubuntu recovery terminal and then edited the file to fix the problem. I restarted the computer and that fixed it.


First read the whole answer. The first part shows you your errors and the second part shows you that alien is not necessary.

First Part

Use -d to create a DEB file

alien -d packagename.rpm

or

alien packagename.rpm

from man alien

-d, --to-deb
    Make debian packages. This is the default.

-g, --generate
    Generate a temporary directory suitable for building a package from,
    but do not actually create the package. This is useful if you want to
    move files around in the package before building it. The package can be
    built from this temporary directory by running "debian/rules binary",
    if you were creating a Debian package, or by running "rpmbuild -bb
    <packagename>.spec" if you were creating a Red Hat package.

Second Part

To install Oracle Java you don't need alien and a RPM file.  Simply use the following commands.

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer


Grub file can't be saved after modification

grub is a system owned application so you need to use sudo to edit the file:

sudo -H gedit /etc/default/grub

If you omit sudo -H you can view the file but not save any changes.

After editing the file you need to run:

sudo update-grub

This will compile the changes you made to /etc/default/grub and compile them with grub functions to create a new /boot/grub/grub.cfg which is the actual file parsed at boot time.

Note: Related question today: How do I edit configuration files?


How to enter part of a command automatically, after another command executed?

If like me you have set a HISTSIZE value to 10000+, the output of the grep command could be quite large to parse.

Instead I would suggest to use the reverse-i-search and i-search bash features:

  reverse-search-history (Ctrl+r)

  Search backward starting at the current line and moving ‘up’ through the history as necessary. This is an incremental search.

  forward-search-history (Ctrl+s)

  Search forward starting at the current line and moving ‘down’ through the the history as necessary. This is an incremental search.

Note that to work properly you may have to disable XON/XOFF flow control, just type: stty -ixon

Source: Unable to forward search Bash history similarly as with CTRL-r


How can I get a program I run in Wine to lock to my launcher?

You can start apps with wine through the comand wine start /Unix "/absolute/path/to/file.exe" or wine start 'C:\absolute\path\to\file.exe'. And you can create program links even in dash to find by creating a new *.desktop in the /usr/share/applictions folder.

So, do that and write into that file:

[Desktop Entry]
Name=Evernote
Icon=/path/to/icon
Type=Application
Exec=wine start '[PATH]'

If you can't find the icon, possibly it is packed into one of the *.exe files, search it (e.g. this http://findicons.com/files/icons/2653/android_icons_2/600/evernote.png), save it in PNG format (make sure you cut away white corners, this simply looks more right) and use it's location as icon path.

This should do it, displaying the icon and showing up in dash search so you should be able to keep it in the starter when you run it. Comment if somethings not working, maybe we have to wrap path or command into quotation marks.


It's actually quite easy to print from a terminal, if you have a printer configured as a /dev/lp device.

You can quite simply:

cat somefile.ps > /dev/lp

or

cat morestuff.txt | lpr

You can read all about printing from the command line here.


It is possible that for security reasons, /tmp is a specific filesystem and is mounted with noexec, to prevent executing any file that is on /tmp. The command above would remount /tmp without the noexec, allowing the execution of files.

This said, on my Ubuntu, /tmp is in / so is not a filesystem by itself.

You have likely been given an incorrect answer. Is the question asked on the SE network?


Can I jump versions or do I need to make my way up the upgrade chain?

You can only jump from LTS to LTS.

  If I have to go up the chain can I download the in between versions and burn them to a disc?

Yes. But I would bot bother...

My advice would be...

use a live cd to boot and mount your systems partitions.
backup all your private files OR put all your private data to a data partition if you have one.
Format system (but not the partition you saved your private data).
Install 12.04 or 12.10. During the part where your can partition if you put private data on to a partition, only add the partition and create a mount point (make sure you do not format it).

Also: always check if you can copy files from a backup back to your system before you start deleting files.


First of all, If the store techs have said that the hard drive is done (busted), then how are you planning to install any operating system on it despite Ubuntu?

Secondly, I cannot exactly predict whether this is something to meddle with hardware or software issue as I'm not physically presented to diagnose the issue.

But before that I'd suggest you to refer "A flashing question mark appears when you start your Mac" KB article from the official Apple website itself to acknowledge. And also, Apple support community, to find out similar threads.

Tip: I cannot confirm whether this would work as I've never tested it on a Mac. But make sure you've created a proper bootable USB with proper instruction. Then plugin the USB, hold down the option key while switching on the system to boot into the menu selection. If you're able, then have a look at How to install Ubuntu on MacBook using USB Stick.

Hope this helps!


Try downloading the latest BIOS manually from Lenovo site. If that fails, then try forcing a reset on your computer by holding down the power button for 5 to 15 seconds. Otherwise, try reinstalling the OS. I know of no actual way to clear the cache of a system app, but that does not mean
it does not exist. There may be another solution from a root terminal, but that can get tricky.


Solution from ryanjna...@gmail.com
  http://code.google.com/p/reaver-wps/issues/detail?id=203

Stop the Network-Manager

Using Upstart

sudo stop network-manager

Using Systemd

sudo systemctl stop NetworkManager.service

Set yourself up a very basic wpa_supplicant.conf in /etc/wpa_supplicant.conf. This command will overwrite any pre-exsiting wpa_supplicant.conf file!:

echo -e "ctrl_interface=/var/run/wpa_supplicant\nctrl_interface_group=0\nupdate_config=1" | sudo tee /etc/wpa_supplicant.conf

Start wpa_supplicant in daemon mode:

sudo wpa_supplicant -B -Dwext -iwlan0 -c/etc/wpa_supplicant.conf

Run sudo wpa_cli. This will start a interactive wpa_cli session.

Verify that it's working by issuing command status.
You should see wpa_state=INACTIVE
Issue scan to scan for existing access-points.
Issue scan_result after a few seconds to show the results from your scan
Add our BSSID and PIN:

 wps_reg xx:xx:xx:xx:xx:xx 12345678

Where xx:xx:xx:xx:xx:xx is your BSSID from your scan results.
You should see an "OK".  Wait a few more seconds as wpa_supplicant picks up the BSSID and tries to associate and perform key negotiation. What you want to see is CTRL-EVENT-CONNECTED, which will indicate that the PIN was accepted and that you're now associated.
Type the command save, which should output another "OK".  This will update the wpa_supplicant.conf file, as specified from the command line, with a static configuration for this new network.
Now exit wpa_cli by hitting Ctrl D

Run sudo dhclient wlan0 to get IP from the AP (assuming DHCPd were enabled).
Verify with cat /etc/wpa_supplicant.conf your newly updated config-file.

If all went well, you should have a line under this new network titled psk.

Good luck!


Have you tried sudo apt autoremove as suggested in the linked answer to remove packages that are not dependent on by others?

The wireshark package is a meta-package. It depends on wireshark-qt (or wireshark-gtk). If you remove a meta-package, it will not automatically remove dependent packages such as wireshark-qt. The latter packages include the GUI and tools such as tshark which is likely how you observed that the "Wireshark" program is not removed even though the wireshark package was removed.

If sudo apt autoremove still did not remove the Wireshark packages, try sudo apt purge wireshark-qt wireshark-gtk, optionally followed by another sudo apt --purge autoremove. The --purge option ensures that configuration files are removed as well.


How can I restore Ubuntu's original splash text on startup?

Try this:

sudo apt-get purge plymouth-theme-kubuntu-*
sudo apt-get install --reinstall plymouth-theme-ubuntu-logo


Ubuntu 14.04 installer does not detect Windows on drive, missing "Install alongside" option

This is now kinda tricky because your windows installation was not recognized correctly. Make sure you fully shut windows down before installing Ubuntu (no Hybernate mode etc. (!)). You could start from the DVD again and run the live session and try installing Ubuntu from there.

The only problem I see is that you don't have any left over (empty) harddrive or partition so you can't install Ubuntu into it's own space.

Another option is installing Ubuntu on a (fast!) USB stick or switch completely which means backing up all your files and then click on

  Erase disk and install Ubuntu


How Do I Hide an LVM Physical Volume from the Devices Section on the Nautilus Side Pane?

If you edit your /etc/fstab file and change the mounting point to somewhere outside /media (eg. /mnt), the logical volume(s) won't show on the Nautilus Side Pane.


How to uninstall Foxit Reader from Ubuntu 18.04?

I encountered the same problem and solved it by using
./maintenancetool

, which is located in your foxitreader directory.
~/opt/foxitsoftware/foxitreader
It removes all the files including the file associations (e.g. for *.pdf).


How to enable Unity Launcher on startup?

So if I understand well, your computer launch gnome automatically and you want it to launch unity? So on your login screen, you should see a little circle on the right of your pseudo, click on it and just choose Unity 2D.


Display CLI program on HDMI connected monitor while connected via SSH

Try redirecting output of your script to /dev/tty1. However, there may be permissions issues...


Lubuntu 19.04 Screensaver locks during video playback

Some programs are not really handling correctly the prevention of the screensaver, so I found really handy to use Caffeine whenever I was in trouble.

Can be easily installed as:

sudo apt-get install caffeine

There is also an indicator included in the program(caffeine-indicator) so you can make it run on startup so that you have the indicator be displayed in the tray to enable it whenever you want


Script to combine movie audio tracks in order to learn a language

If you want to learn a new language there is an easier method: play the English audio and display the subtitles in your native language.

That's how I learned (and am still learning):

Français
English
Deutsch
Afrikaans
по-русски
...


This is the procedure for editing fstab from a live usb

sudo mkdir /media/mount
sudo mount /dev/sd__ /media/mount
sudo nano /media/mount/etc/fstab

sd___ is sda1 or whatever the system partition is


ubuntu-sdk depends on qtcreator-plugin-ubuntu-cordova. Latter needs cordova-ubuntu-2.8, cordova-ubuntu-2.8-dev, qtcreator-plugin-ubuntu, qtcreator-plugin-ubuntu-cordova-common.

This unmet dependancy problem could have been aroused, because qtcreator-plugin-ubuntu-cordova cannot be installed.

So run :

sudo apt-get install ubuntu-sdk qtcreator-plugin-ubuntu-cordova cordova-ubuntu-2.8 cordova-ubuntu-2.8-dev qtcreator-plugin-ubuntu qtcreator-plugin-ubuntu-cordova-common


Can't access vgaswitcheroo file, access denied?

I know this is late but I just stumbled across this problem, and thought posting the solution up for future readers is the best thing to do.

The above answer by Ugo is correct but you literally need to be root, not some user with root privileges.

So the simple answer is type:

sudo su

and you should see the terminal switch from displaying user_name@machine_name to root@machine_name.

Now all vgaswitcheroo related edits should work.


Tgif is a graphics program used for graphics, perhaps its incorporated into abaqus.
Also source:

TGIF is a versatile but simple drawing program. As compared to Adobe Photoshop or PowerPoint, TGIF focuses on letting you do simple things quickly and easily, rather than making everything a sophisticated and complex process. After using TGIF routinely for many years, I have found that probably 95% of the time, the more elaborate programs were really overkill for the job I wanted to do.
The progress of the export will be shown in the Message window. The name of the output file will consist of the base name of the current file (ie. minus the .obj extension) with an extension indicating the format. For example, if the TGIF file was named 'schema_template.obj', and you export as a GIF image, the ouput filename would be 'schema_template.gif'.  You can export to EPS (.eps), PostScript (.ps), X-bitmap (.xbm), EPSI (.epsi), GIF (.gif), and HTML fomats. Some installations of TGIF also allow PNG (.png) and JPEG formats (.jpg).

Tgif files are stored in the .obj format before being changed to other graphics format say .gif, png, jpg, ps, gif etc.
See here and here for tgif.
To install do:
sudo apt-get install tgif

#or

sudo apt install tgif


Replacing Mint 15 With Ubuntu gnome 13.04

Depends if you did a separate partition for your /home, then in the manual instalation in the cd/usb images just install ubuntu over mint and select to not format /home.

If you did not creat a separate partition for home you will have to copy all of it or just the data you are interested.


Ubuntu 14.04 online accounts integration

From the (semi-)official  wiki (emphasis mine):

  This time saving comes at a cost: the mental complexity of dealing with a separate thing, “Online Accounts”. Therefore, Online Accounts should be involved only where it is reasonably likely to save time. So it should not be used to handle special-purpose accounts that are only ever used for one app; that would make the overall experience more complex for no gain.

Note that the page mainly deals with the mobile implementation; but the general advice applies to the desktop one too. I would ask you to reconsider whether you really need to integrate with UOA.

If you do decide to go ahead with it, though; AFAIK, the user must first have installed an app that registers that is utilizes some service; then you can create a new account for that service in the Settings section.

Unfortunately, I don't think it allows 3-rd party apps to integrate arbitrary services yet (the circular data consumption would make for a 'kitchen sink', as it's called).


Installing Lubuntu with ended support for old laptop

Have a look at https://help.ubuntu.com/community/Installation/MinimalCD and you'll find a number of images that are smaller than 100mb.

Are you sure you don't have a DVD drive? I run lubuntu 16.04 LTS on a 2005 thinkpad t43 (and it came with cd/dvd combo). My t43 cpu can't boot the x86_64 version and the i386 iso isn't available in 18.04, but you can still upgrade from 16.04 to 18.04 once installed (if necessary).  My t43 installed, and I run Lubuntu 16.04 LTS happily (with the option to upgrade to 18.04 should I sometime wish to)

If you install the minimal install; you can then add what you want (be it lubuntu-desktop or other..)

I would definitely go this route (or another to use a supported version), over using an unsupported, unpatched OS unless it's never going to be connected to the internet, nor share files with other machines (via LAN) etc. Better safe than sorry, because you forgot for a second..


Ubuntu 12.04 LTS server not allowing incoming connections when using wlan0

I found it.

Apparently, firestarter is installed on Ubuntu 12.04 either by default or as a dependency or recommendation to something I normally install. It was present on two different 12.04 machines but I don't remember installing it. Also never heard about it anywhere.

Firestarter only considers one of your network connections your internet gateway, and by default that's the wifi. So it sets up your linux firewall to block all incoming connections for wifi, but not ethernet, because it considers ethernet to be your local network.

The tricky part is that ufw and gufw, which seem to have replaced firestarter as Ubuntu's recommended firewall, have their own set of iptables rules, so they don't even notice firestarter is there and can't switch it off.

To get rid of the firestarter rules temporarily, launch firestarter and click the stop button.

To get rid of firestarter and its rules permanently, do:

sudo apt-get remove firestarter

You can now either leave the firewall as it is and possible disable samba when you're on public wifi, or you can set up a couple of rules of your own with ufw or gufw. I just left if off and plan to switch on gufw by hand if I go on public wifi.


lack of /bin/bash shell for user causes "login incorrect" for ftp with filezilla

steeldriver answered this one but I can't figure out how to vote him up or mark his comment as the answer (maybe I don't have the reputation) https://askubuntu.com/users/178692/steeldriver The answer is here: https://linux-tips.com/t/users-with-bin-false-shell-to-login-on-vsftpd/200


Please remove the flash player you installed and install the following package in a terminal

sudo apt-get install ubuntu-restricted-extras

This contains a flash plug-in for any browser exept Chrome/Chromium which has its own installed by default.


This has to do with Avahi, a Zeroconf implementation which advertises hostnames on the local network.

You can get started with Avahi on your server by installing the daemon:

sudo apt-get install avahi-daemon

From that point, you should be ready to go. Check out the docs in /usr/share/doc/avahi-daemon/ if you have additional trouble.


Gallium is the OPEN SOURCE DRIVER as ATI does not make more legacy drivers for our "old" architecture


UEFI is typically the preferred method if your cooperating operating system (in this case, Windows 10) is also installed in that method. One way you could tell is if you are able to configure Secure Boot in your BIOS.

For backward compatibility, most UEFI implementations also support booting from MBR-partitioned disks, through the Compatibility Support Module (CSM) that provides legacy BIOS compatibility. So you can think of that other option as a kind of fail-safe in case your system has issues with using the newer standard of UEFI. [https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface]


How can I can clone or ghost my system drive to restore it to a bigger HD?

Clonezilla is the closest free option to Ghost.

The underlying tools it uses, partimage and ntfsclone, understand the underlying filesystem.  So unlike a simple low-level copy (dd) which copies all bytes, they only copy the used space on the filesystem and its metadata.  This results in a much smaller disk image.


No. But if I understand correctly, the update of mdadm has replaced your configuration. It should've asked you if you wanted to keep the old one or replace it. If that is the case, then you can either use "sudo dpkg-reconfigure mdadm" or edit /etc/initramfs-tools/conf.d/mdadm so that BOOT_DEGRADED=true.


Run shell script to take output of a file and convert it into Excel format

Using Perl + ssconvert (in the gnumeric package):

perl -F'\012' -00ane 'BEGIN {$, = ","; $\ = "\n"; print("ID,Name,Age,Education")} my @f; foreach(@F) {s/.*?: +//; push(@f, $_)} print(@f)' test1.txt test2.txt | ssconvert fd://0 output.xls

The Perl command reads test1.txt and test2.txt using blank lines as record separators and a newline characters as field separators; it prints the header (Id,Name,Age,Education) and for each record and for each field strips everything before the first character following the sequence of spaces following the first : character from each field and prints the record using commas as field separators and a newline character as record separators (i.e., it converts test1.txt and test2.txt to a CSV):

% cat test1.txt
ID : 1
Name: xxxx
Age: 33
Education: Mtech

ID: 2
Name: yyyy
Age: 22
Education: bsc
% cat test2.txt
ID : 3
Name: xxxx
Age: 33
Education: Mtech

ID: 4
Name: yyyy
Age: 22
Education: bsc
% perl -F'\012' -00ane 'BEGIN {$, = ","; $\ = "\n"; print("ID,Name,Age,Education")} my @f; foreach(@F) {s/.*?: +//; push(@f, $_)} print(@f)' test1.txt test2.txt
ID,Name,Age,Education
1,xxxx,33,Mtech
2,yyyy,22,bsc
3,xxxx,33,Mtech
4,yyyy,22,bsc

The ssconvert command reads from STDIN and converts the file to an Excel spreadsheet.

If installing gnumeric to obtain ssconvert is not an option, you could use just the Perl command and import the CSV into Excel / whatever:

perl -F'\012' -00ane 'BEGIN {$, = ","; $\ = "\n"; print("ID,Name,Age,Education")} my @f; foreach(@F) {s/.*?: +//; push(@f, $_)} print(@f)' test1.txt test2.txt >output.csv


What could have caused a corrupted partition?

This is surely that your hard disk is failing. No other reason can damage both operative systems. Do a back up of your data and buy a new hard drive.


Mount with VirtualBox erased home directory?

Just run

sudo umount ~

to unmount the drive. See this question about mount overwriting directories.

In the future, you should make a new directory and then mount to there. For example

sudo mkdir /media/Share

sudo mount -t vboxsf VBShare /media/Share.


Can I install remastersys on Ubuntu 15.10? What repository should I install?

You may add this ppa to your sources, and it also works in Ubuntu ver. 16.04
https://launchpad.net/~kranich/+archive/ubuntu/remastersys


Wine does not properly support multiple users in the Linux sense.  "Bad things" happen if two different users attempt to use the same Wine Prefix (a wine installation such as ~/.wine) at the same time.

However, if this isn't something you need to worry about then you will want to create a folder with permissions accessible by both users, and then create a symlink to it as ~/.wine.


Very small package for apt-get experimentation?

rolldice
it has man pages but just takes a couple seconds to install and purge.


You can ignore the warnings about needing Jack running.

What I now have running is MIDI file playback via Rosegarden and QSynth.

The process as of Ubuntu 17.10 is largely the same as here, but follow these steps:

install QSynth apt-get install fluidsynth
install a soundfont library apt-get install fluid-soundfont-gs
configure QSynth to Enable MIDI Input by checking the box in Setup > MIDI
configure QSynth to use alsa Audio Driver under Setup > Audio
configure QSynth to use the soundfont under Setup > Soundfonts; point to /usr/share/sounds/sf2/FluidR3_GM.sf2 or your soundfont location
allow QSynth to restart when it prompts you
install Rosegarden apt-get install rosegarden
with QSynth open, launch Rosegarden
Tell Rosegarden to play through QSynth Studio > Manage MIDI Devices and set the General MIDI Device to whatever QSynth broadcasts as its MIDI input option, ie 129:0 Synth input port or similar.


How to change the path to the folder of the XML syntax files? (gedit)

As per the developer documentation, You can add custom language definitions under the $XDG_DATA_HOME/gtksourceview-2.0/language-specs directory (or replace 2.0 with 3.0, for gtksourceview-3.0). The $XDG_DATA_HOME variable defaults to $HOME/.local/share/.

It should also read these files from a gtksourceview-2.0/language-specs/ sub-directory underneath any path specified in the $XDG_DATA_DIRS path environment variable.


Is there a way to burn Ubuntu on a CD ROM?

You should install Ubuntu Minimal from the iso, you can download it here:
https://help.ubuntu.com/community/Installation/MinimalCD

Then, once logged on the console, set the network, and install the desktop you need:

for Ubuntu, sudo apt-get install ubuntu-desktop
on an old laptop, try Xubuntu, sudo apt-get install xubuntu-desktop


You can install Codeblocks from Ubuntu repository. This will make your life easier by installing all the dependencies. So open a terminal and type:

sudo apt-get install -y Codeblocks

You may have to enable universe repository to install this. Read How do I enable the "Universe" repository?


scan for wireless device in ubuntu 14.04

TR;DR: use nmcli dev status to get a list of which interfaces are connected to the network, and then use ping google.com -c 4 -I ifacex(where ifacex is actual interface name with number) to test if they are actually connected. To reconnect wireless interfaces nmcli nm wifi off; sleep 1; nmcli nm wifi on and let it automatically reconnect.

The simplest way to do so is through nmcli dev status. This command outputs the list of available interfaces on your system and tells you whether they are connected or not. Sample output from my system

DEVICE     TYPE              STATE
eth0       802-3-ethernet    unavailable
wlan0      802-11-wireless   connected

If you'd wanna list only the devices which state is connected, then do
nmcli dev status | awk '/connected/ {print $1}'. Here we match only lines that have 'connected' string in them, and print their name. In my case, it would give wlan0 only. If you'd have both eth0 and wlan0 connected, sample output would be

wlan0

eth0

Now , on my system network manager is kind of buggy. It may report device as connected, but in actuality it is disconnected.
You could test wlan0 interface with ping google.com -c 4 -I wlan0. This sends 4 packets to google.com from interface wlan0. Now, I could also do
nmcli dev status | awk '/connected/ {print $1}' | xargs ping google.com -c 4 -I , which will get the name of my wlan0 interface and stick it on the end of ping command as -I argument. Sample output

PING google.com (216.58.217.46) from 192.168.0.68 wlan0: 56(84) bytes of data.
64 bytes from den03s10-in-f14.1e100.net (216.58.217.46): icmp_seq=1 ttl=57 time=44.0 ms
64 bytes from den03s10-in-f14.1e100.net (216.58.217.46): icmp_seq=2 ttl=57 time=40.0 ms
64 bytes from den03s10-in-f14.1e100.net (216.58.217.46): icmp_seq=3 ttl=57 time=48.0 ms
64 bytes from den03s10-in-f14.1e100.net (216.58.217.46): icmp_seq=4 ttl=57 time=40.0 ms

--- google.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3016ms
rtt min/avg/max/mdev = 40.000/43.000/48.000/3.316 ms

Often users might have dns issue, which means your machine cannot translate google.com to actual ip address (computers deal only in ip addresses, like phones only deal with phone numbers). In that case, you'd better run ping 8.8.8.8 -c 4 -I wlan0 && ping google.com -c 4 -I wlan0, where it will test if your machine has connection to the web AND resolves domain names.

Now, what if you have more than one connected interface ? Personally I'd test each interface with ping separately, without relying on that one-liner, but because I am having so much fun with scripting recently, here's another one-liner:

nmcli dev status | awk '/connected/ {print $1}' | xargs -n 1 ping google.com -c 4 -I

This one , basically finds names of connected interfaces, and executes ping command with each one. Since I don't have multiple devices connected, I'll just show you how it looks when I awk gets each item from first column, so note , the first output will be wrong, second is eth0, and third wlan0
nmcli dev status | awk '{print $1}' | xargs -n 1 ping google.com -c 4 -I

ping: SO_BINDTODEVICE: Invalid argument
ping: Warning: source address might be selected on device other than eth0.
PING google.com (216.58.217.46) from 192.168.0.68 eth0: 56(84) bytes of data.
From sergiy-Satellite-L455D.local (192.168.0.68) icmp_seq=1 Destination Host Unreachable
From sergiy-Satellite-L455D.local (192.168.0.68) icmp_seq=2 Destination Host Unreachable
From sergiy-Satellite-L455D.local (192.168.0.68) icmp_seq=3 Destination Host Unreachable
From sergiy-Satellite-L455D.local (192.168.0.68) icmp_seq=4 Destination Host Unreachable

--- google.com ping statistics ---
4 packets transmitted, 0 received, +4 errors, 100% packet loss, time 3152ms
pipe 3
PING google.com (216.58.217.46) from 192.168.0.68 wlan0: 56(84) bytes of data.
64 bytes from den03s10-in-f14.1e100.net (216.58.217.46): icmp_seq=1 ttl=57 time=44.0 ms
64 bytes from den03s10-in-f14.1e100.net (216.58.217.46): icmp_seq=2 ttl=57 time=48.0 ms
64 bytes from den03s10-in-f14.1e100.net (216.58.217.46): icmp_seq=3 ttl=57 time=40.0 ms
64 bytes from den03s10-in-f14.1e100.net (216.58.217.46): icmp_seq=4 ttl=57 time=40.0 ms

--- google.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3016ms
rtt min/avg/max/mdev = 40.000/43.000/48.000/3.316 ms

And as it should, we see eth0 is disconnected, wlan0 is connected.

Another thing that you could use is nm-tool. This guy gives you long report about each one of your interfaces, with settings. We could cut that down to only the list of interfaces and their statuses with nm-tool |  tr '-' ' ' | awk '/Device/,/State/ {print $1,$2}' . Here we substitute the annoying - character with space, and just get the text from Device to State strings.

Device: eth0
Type: Wired
Driver: r8169
State: unavailable
Device: wlan0
Type: 802.11
Driver: r8180
State: connected

What else ?
whois,nslookup and dig are  lookup utilities for domain names and ip addresses. If you can use them to find out info about a domain or ip address, you're connected. They won't tell you the interface, but nice to actually test the connectivity.

In conclusion: There's more than one way to skin a cat, as you know. The very first command nmcli dev status and ping is all you really need to test your connections, and ping is the "real MVP" on any system, so to speak. Now, if you wanna get fancy, learn some new command line tricks, by all means study the one-liners I've posted here ! The power of Ubuntu and Linux in general lies in command line

Additions:

Other's have appropriately noted that restarting network manager with sudo service network-manager restart will do the job most of the time. By default all connections are set to get autoconnected when network manager is in range. I use this method a lot !

What else can be done ? nmcli nm wifi off; sleep 1; nmcli nm wifi on. This will turn off wifi , pause for a second, and turn on wifi again; and your network should automatically reconnect.


The are so many ways to compile java files. You only need to install JDK in your system

You can install openJDK or the official libraries from Oracle.

To know if you have already installed JDK in your system open a terminal and type:

java -version

If you get a response with your version you can skip the next steps

But if you see something like "The program 'java' can be found in the following packages... " you can just type:

sudo apt-get install openjdk-6-jdk

If you want the official packages from Oracle you have to write:

First, grab Oracle Java 7 directly from Oracle Java download page:
Make sure you download 32 bit (Linux x86 ~ jdk-7u21-linux-i586.tar.gz) or 64 bit (Linux x64 ~ jdk-7u21-linux-x64.tar.gz) JDK version in .tar.gz format.
Open a terminal and type the following command to list your files

  sudo mkdir -p /usr/lib/jvm/

  sudo tar xvf ~/Downloads/jdk-[YOUR JDK VERSION]-linux-x64.tar.gz -C
  /usr/lib/jvm

Set or update the JAVA_HOME and PATH shell variables as follows:

  export JAVA_HOME="/usr/lib/jvm/jdk1.[YOUR JDK VERSION]"
  export PATH="$PATH:$JAVA_HOME/bin"

Check if you have already installed correctly bu typing java -version again.

Now you will be able to compile file from your command line positioning the prompt in your java folder and using this syntax:

javac HelloWorld.java

You can also use any IDE like Eclipse or netbeans to make it easier.


If you work your way through the following posts, you will see how I resolved the same issue for my canon MP240, (running 64 bit ubuntu 12.04).  My Canon printer is working very nicely now.  I suggest you look first at my original post describing the issue here...

https://www.ultimateeditionoz.com/forum/viewtopic.php?f=142&t=4453

Then go to the solution, I suggest you start at the bottom of this rather long post and work your way back

https://www.ultimateeditionoz.com/forum/viewtopic.php?f=23&t=3567&p=33450#p33450

It should all be self explanatory.  Good Luck.


How to Backup a PostgreSQL Database From a Docker Container Using DBeaver?

I tried to accomplish this the same way you did, and had the same problem. Unfortunately, I did not find a way to resolve the issue with DBeaver, so this may not be what you are looking for, but this answer got me what I needed: https://stackoverflow.com/a/29913462/9843399. Here it is with slight editing:

Backup your database

docker exec -t <your-db-container> pg_dumpall -c -U postgres > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql

Restore your database

cat your_dump.sql | docker exec -i <your-db-container> psql -U postgres

(Note: I had to recreate my schema before the restore worked properly. On my version you can do this in DBeaver like: click your db > right-click on "Schemas" > click "Create New Schema")


Can I use a Dual Boot and VM with the same installation?

I can't see why this should be impossible. Let's break down the steps:

VirtualBox on Windows probably uses a file on the Windows filesystem to store the guest (Ubuntu) virtual HDD. Learn how to use a partition instead.
Once, you have a real Ubuntu partition, set up a bootloader (grub) or modify the bootloader you already have.
Now, boot into Ubuntu. Ubuntu should recognize your hardware (which is different from the emulated hardware when running inside VirtualBox). If your hardware is supported, see if VirtualBox guest additions (graphics, networking) cause any trouble. Check whether networking needs work.
Go back to Windows and see if Ubuntu under VirtualBox still works.
Be very careful with hibernating Ubuntu.


TL;DR: copy the /root folder outside chroot into the chroot directory

The <(...) operator is known as process substitution and is a way to run command, output of which goes into anonymous pipe. That's what /dev/fd/63 is. The idea is to allow external command ( here it's bash ) to treat  another commands output as if it was a file. Generally the form would be to use  < to redirect that pseudo-file object into bash's input stream.

bash < <(wget -q0 https://raw.githubusercontent.com/ubports/unity8-desktop-install-tools/master/install.sh)

This is generally no different from wget https://stuff.com/blah | bash. In both cases, it's generally not recommended to use such commands unless you're hundred percent sure the script you're downloading isn't from sketchy source and isn't malware.

However, since you've mentioned running command in chroot and the script outputs No such file or directory root, and because bash allows running scripts as bash script.sh here your script is being executed, but there's no directory named root in your chroot. You could just fix it via sudo cp -R /root  chrootdir. For better results I'd suggest just reading the script first, see what it needs, and copy that to the chroot folder, and only then run the script locally within the folder. No need to run wget multiple times

So the script works. Errors in shell scripting generally in form  <shell>: <command user typed>: error message so the script being temporarily stored as /dev/fd/63 and runs, it just doesn't find what it needs.

See also,

What's the difference between <<, <<< and < < in bash?
Why does the error message for two colons as a command (::) in bash have three colons, but a single colon give no output?


What file is the package description in?

The package description is taken from the file debian/control in the source package, which contains various metadata about the package including name, version and description. For example, if you wanted to access the description for the coreutils package, you could do:

$ apt-get source coreutils

to download the source package into the current directory (and unpack it), then:

$ vi coreutils-8.5/debian/control

to view and edit the package control file.


Why can't I send file and photo in Telegram?

Your Telegram app probably doesn't have access to your storage. Go to the Telegram settings , then go to the permissions and turn storage access on .
And if the options aren't available in telegram, then open Ubuntu Software centre and access the permission list from there.
in recent updates this is the procedure to be followed


Two networks connections, one for internet

You need to add a static route for the local network.

First install nmcli, if it isn't installed already. From a terminal run:

sudo apt install nmcli

Now create the static route:

sudo nmcli connection modify <name> +ipv4.routes <destination> ipv4.gateway <gateway>

Where name can be found by running nmcli c show, destination is the local subnet and gateway would most likely be the router.

For example, say I have a local network of 10.0.20.0/24 connected to router3 (10.0.20.1). Router1 (192.168.1.1) is my wireless connection gateway and Router2 (172.31.1.1) is my ethernet connection gateway. I would run the following to gain connectivity to the 10.0.20.0/24 network. Also, the name of the lan interface is enp0s3:

sudo nmcli connection modify enp0s3 +ipv4.routes 10.0.20.0/24 ipv4.gateway 172.31.1.1

You may not have such a complex network and the local network may be all you need to access, in this case the command would look like:

sudo nmcli connection modify enp0s3 +ipv4.routes 172.31.1.0/24 ipv4.gateway 172.31.1.1


What happens if I attempt to delete Ubuntu itself while logged in?

I did try this out on a live USB for answering a question on Quora some time ago (there's another great answer there by Eric Bowersox).

First attempt on an installed system where I was confident nothing would happen:

# cd /
# rm -rf /
rm: it is dangerous to operate recursively on `/'
rm: use --no-preserve-root to override this failsafe
# rm -rf .
rm: cannot remove directory: `.'
#

So, I tried it on a live USB (quoting from my original post):

  Eric Bowersox inspired me to try it out on a live USB (without
  persistence). Like he said, a huge number of errors about files
  currently being used, plus another huge set of errors about the
  read-only file system being used ended up with parts of the GUI
  vanishing in stages: first the icons in the Unity launcher, then the
  icon for the HUD, then icons in the system tray. When it all ended
  (remarkably quickly), only the terminal could focused, clicking
  anywhere else didn't work. I could open anything else, not even the
  preferences of the terminal. Menus of the localization and the clock
  applets opened, but didn't work.

  Switching to the other ttys worked once (I didn't get around to trying
  any commands), but once I switched back to the GUI, nothing worked.

  Here's how it looked then:

  Nothing worked at this point. Except for the power button and the
  Magic SysRq keys.

Deleting the shared libraries or rm itself shouldn't cause any problems, since both would have been loaded into memory when rm started.


gnome-software on Ubuntu 16.04 doesn't work

Perform these steps to Fix gnome-software/ubuntu-software

Rename or remove the ~/.local/share/gnome-software.  In the steps below it's removed and will be recreated when you start gnome-software.  It currently has a list of what has been installed.
The first line will ensure the locked up instances are removed from memory.  Might not be necessary.

$ killall gnome-software
$ rm -r ~/.local/share/gnome-software

Now run ubuntu-software or gnome-software from the Unity Launch Button.