Ubuntu 20.04 Installation stuck, dual boot with Win10 in the same SSD I have a Window 10 installed on a SSD, and previously there was also the Ubuntu 18.04 dual boot in the same SSD. I formatted the Ubuntu 18.04 partition, and hoping to do a fresh install of the new ubuntu 20.04.

However, I am stuck during the installation, right after picking the partition for root and for /home, I have tried many times, sometimes it's "Removing Conflicting Operating System Files", sometimes it's "Creating ext4 for /home", and there is really something loading, but it takes forever (4 - 5 hours) for it to run and still not finishing...

The only unusual thing I have noticed is that during the installation Ubuntu did not recognize I have the Windows 10 OS installed. I looked online and ran the error checking on C:, then do the chkdsk cmd on C:, but the installation still could not detect the win10 OS.

I have also tried disabling fast boot of windows 10, removing the Virtual machines which have dynamic memory enabled and all the corresponding files, but none of them work. I have also tried to install Kubuntu, but similar problem appears.

I now have 3 live USBs, 2 with Ubuntu 20.04 from different downloads, and 1 with Kubuntu. Please help.

Thanks.

There is an error message saying that "the attempt to mount a filesystem with type vfat in SCSI3 (0,0,0), partition #1 (SDA) at /boot/efi failed" , right after I have performed the partitioning, there are 2 options , go back to the partition table or continue, and I clicked continue.

You need to boot up from graphical safe mode. It is a graphical problem at this time. You should try under the ubuntu (graphic safe) option . It will work fine  i tried so much laptops but its stuck. But graphical safe mode will solve everything


How do I search my command-line history for commands I used before? Other than viewing the history, is there a way to filter my history?

Say I want to search for a command that started with "ssh"?

Press Ctrl+R and type ssh. Ctrl+R will start search from most recent command to old one (reverse-search). If you have more than one command which starts with ssh, Press Ctrl+R again and again until you find the match.

Once you've found the match you can press Enter to execute the command or left / right cursor to just select the text of the command.

There is no default reverse option for Ctrl+R to invert the direction of the search but here you will find some suggestions about it.

I like to grep my history instead of Ctrl+R backwards search. That's because you can only see one line with Ctrl+R. With grep you get more of an overall view of your last interaction with a command etc.
I have the following in my .bashrc . It lets you search the command history by typing hiss KEYWORD . Call it what you like. I like to hiss^^ . Don't forget to reload your .bashrc file with source ~/.bashrc
hiss () { history | grep "$@"; }


How do I enable Wireless networking with an Atheros 9485 device? I have an Asus vivobook with Windows 8 preinstalled and tried dual boot with ubuntu. I'm new to linux and this was my first install. I installed ubuntu 12.10 but I couldn't connect to wireless network. did some googling and tried some suggestions but now I don't even have the choice to enable wireless networking. I can only connect to the internet by wired connection.

Get rid off from the Network manager on Ubuntu. Before doing it, first, install Wicd Network manager by sudo apt-get install wicd, then remove the connection manager sudo apt-get remove --purge network-manager-gnome network-manager. check if you have any settings on /etc/network/interfaces just keep

   auto lo
iface lo inet loopback

then Wicd should give you what you want


Wifi apparently connected, but webpages won't load I'm running the latest Ubuntu 14.04.3, and my issue today is that my Wifi connection sometimes becomes really slow, and eventually disconnects. I tried googling around to see if I can get any good answers, but nothing fixed my issue. I found a thread that used a diagnostic tool (wireless-info on github), which might help you guys figure out if there's anything wrong with my current system/drivers. This is what the diagnostic tool found. http://paste.ubuntu.com/12041942/
Is there anything I can do about this? I'd love to get this issue fixed. Thanks!

There are no less than eleven SSIDs in range with the same name. In your message log, we see your wireless device roaming from among them.

I suggest you ask your wireless to bind to your access point. Right-click the Network Manager icon, select Edit Connections. Fill in the MAC address for your access point; find it with:

sudo iwlist wlan0 scan

For example:

Cell 05 - Address: 00:13:19:F2:2E:D0
                Channel:6
                Frequency:2.437 GHz (Channel 6)
                Quality=66/70  Signal level=-88 dBm
                Encryption key:on
                ESSID:"UCInet Mobile Access"

Use the address (MAC address) you found for the strongest access point to place in BSSID in Network Manager:

Save and close.

You could maybe try this from the terminal:

   rfkill list up
   lspci wlan0
   rfkill list up

and then this:

   sudo -i
   gedit /etc/networkmanager/ifupdown/ifupdown.conf

and then write in this line at the bottom:

wirde properties=true

and it might work fine this way.


Keyboard shortcut (accels) forgotten after reboot? Following on from my question here:

Keyboard shortcut for "open a terminal here"

I have found that my accels are forgotten after a reboot and have to be assigned again.  Why is this, and how can I make them 'stick' permanently?

I had similar problem sometime ago... There the problem was that I had a profile started at startup, and I had to save changes to that profile - in order to make changes permanent.

The root cause of your issues is that Gnome in general and Nautilus in particular are not designed to be easily configurable.

I'd recommend to try using a more fully featured file browser and DE.


Ubuntu 16.04 won't run from USB because of internal error I am trying to run Ubuntu 16.04 from USB that passes Ubuntu disk defect check but it keeps having an internal error. Current OS windows 10 came with ASUS G11cd.

Try switching the USB stick to a different USB port -- especially if you have both USB 2.0 and 3.0 ports on your computer. Sometimes one will work long enough to start a boot, but stop being able to read the stick partway through.

You can also try going into your bios and enabling Legacy USB.

As per our discussion in the comments, burn Ubuntu to a DVD and you won't have any trouble booting it. If you need help burning a DVD, please refer to:

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


Is it safe to upgrade Wubi install from 12.04LTS to 14.04LTS? I have 12.04LTS installed in wubi and want to know if and how I can upgrade to 14.04LTS.
I do not want a new installation, as that would totally disrupt my current activities and programming.

Simply running sudo do-release-upgrade -d from the terminal prompt will take care of it for you. Try to run it from the console on the computer you're upgrading, since if you do it via a terminal session from another system (via ssh or something similar) if the upgrade has issues, or your connection drops, recovering could be problematic.

It worked for me, but not before without issues, as my ssh session timed out multiple times duing the upgrade.  I discovered the best way to handle it was to run screen, then run the do-release-upgrade -d from within screen, that way, if you do loose your connection, a simple screen -d will give you back your previous screens, all nice and orderly as they should be.

I did the 12.04 LTS upgrade to 14.04 LTS, but then (accidentally) wound upgrading again to the latest unicorn release too, as I wound typing do-release-upgrade -d again, with my scrollback buffer, so now I'm running a full-blown test release, and having issues, but that's not the fault of the initial do-release-upgrade run.

I hope this helps.


I have a swap partition but no swap space I have a 27.8G swap partition; though I have no swap space, I'd like to change that.

Here is the pertinent output from top.

KiB Swap:  0 total,  0 free,  0 used

I believe I may have turned it off with the swapoff --all. That being said the swapon --all exits with swapon: /dev/sda6: swapon failed: Invalid argument.

Here is the swap entry in my /etc/fstab

# swap was on /dev/sdb6 during installation
UUID=aa0cdc90-ef01-446b-a6a2-fac368d16aca none swap defaults 0 0

I affirmed the UUID of my partition with the one in /etc/fstab.
Below is the output from blkid.

sudo blkid /dev/sda6
/dev/sda6: UUID="aa0cdc90-ef01-446b-a6a2-fac368d16aca" TYPE="swap" PARTUUID="6ddd3267-3895-40e5-9acc-56bfbc58039b"

My swap partiton is on /dev/sda6 not /dev/sdb6.
I presume /dev/sdb6 was the bootable USB I used to install the system.
This is a dual-booted, single-drive system.

Thanks in advance for your help.

I think the swap space may have never been turned on since initialising the OS.

The problem was solved by running mkswap and then swapon on the partition.

Have you ever changed it? Maybe you didn't set your swap. Personally, I recommend you use Gparted to edit your swap again.

You can install Gparted in your terminal or I have written an answer here - How to install Gparted(iso). After that, the swap won't show up because it is not active.

Type:

sudo gedit /etc/fstab

add:

/swap/swapfile  swap      swap    defaults   0       0

reboot, and see if it is all right:

cat /proc/swaps


Is there a native Picasa version for Linux? How can I install it? How can I install Google Picasa 3.9 or whatever the latest version is.

I don't want the Wine version, I want the native Linux version.

I'm trying to avoid using programs via Wine because it is very buggy.

There is and there never was a native Picasa for Linux version.

What Google always did  was to wrap Picasa in a nice package containing Picasa and a custom version of Wine.

If you want to install Picasa in Linux it always has to use Wine, either installed by you or using the packages from Google that contain Wine. In the end its your choice and will lead to the same.

Because the Linux installation is just a Wine wrapper with the Windows binaries, Google has discontinued the support for Linux and the last available package in their repositories is for Ubuntu 11.10, version 3.0.

Google explains that if a Linux user needs to use Picasa he can use the Wine version installed in Ubuntu to run the Windows binaries, making no sense to invest time developing something extra.

Google wrong on their blog on April 20, 2012:

  "(...)today, we’re deprecating Picasa for Linux and will not be maintaining it moving forward.”
  (source)

They also explain that maintaining the package for Linux is becoming harder since and that is costing them time compared with Windows releases.

For instruction on how to install Picasa 3.9 in your system please have a look at

How would I install Picasa 3.9?

There are guides on that post that will help install Picasa 3.9 in your system, either by installing Wine and then Picasa with it, or by updating the Google package from version 3.0 to version 3.9.

I think you can't install Picasa 3.9 without wine. I store Picasa 3.8 in my PC. And installed it besides Picasa 3.9 (using Wine).

And I work with Picasa 3.9 by using Wine and it works good.


How to upgrading to new release automatically or download the release iso once it's released? All of you know that within few hours, Ubuntu 14.04 is going to be released.

What can I do to upgrade my system automatically when Ubuntu 14.04 is arrived?

And also What can I do to download a single Ubuntu 14.04 desktop-64-bit iso file or all the trusty images automatically when it was arrived(available for download)?

I extremely recommend against. Upgrading from a version to the next can take several hours, block your system, wait for your intervention, be interrupted by power loss, leave your system unbootable, etc.

When upgrading you should make sure that you have the time and a backup plan in case something go wrong. The upgrades to the next version are not automatic for this reason, there is several things that can go wrong.

Hm, hard one. I guess you could make a script that tries to do a wget to the location where the ISO will probably arrive once it's released:

wget http://releases.ubuntu.com/releases/14.04/ubuntu-14.04-desktop-amd64.iso

You might need to change the ISO name to the architecture of your system (amd64 or i386)

Just script it and put it on a cron job every 15 minutes or so. :P


Webcam recognised by cheese but not by Skype I recently connected an old Microsoft Webcam to my Ubuntu desktop.  Whilst the camera works fine with Cheese, it isn't recognised by Skype/Zoom.  Is there something I am missing???

I should have mentioned that strangely the audio part of Skype appears to be recognising the USB camera but the video/camera part does not.

I've had an issue like that before and i had to change the in-app settings on Skype then restart the app to fix it
-edit-

Open the Skype app
Ctrl+comma to open up the settings section
Go to Audio & Video
Activate your camera


htpasswd executable is missing I'm running 13.10.  Clean install.  Ran:
sudo apt-get install apache2

I would expect that I would have htpasswd in the /usr/sbin directory along with the apache2 executable.  I don't.

I can provide any info necessary.

Perhaps you have apache2-utils not installed.
Try searching apache-utils in software manager or with command line:

sudo apt-get install apache2-utils

username@host:~$ htpasswd
The program 'htpasswd' can be found in the following packages:
 * apache2-utils
 * mini-httpd
Try: sudo apt-get install <selected package>

The error message is obvious. sudo apt-get install apache2-utils should solve your problem with missing htpasswd binary.


Installation guide for 14.04.3 desktop I just downloaded Ubuntu-14.04.3-desktop-amd64.
Can you guide me through the installation process.

I have no idea how to go forward with this. Also, I'm using Windows 8 and would like to dual boot with Ubuntu desktop.

Thanks in advance..!

STEPS:

First of all you have to set up you partitions, I recommend using minitool partition manager (link: http://filehippo.com/download_minitool_partition_wizard_home_edition/),
making the partitions. Make an ext-4 partition (say 100gb), this is where all your files will go, and make a linux-swap partition(say 4gb)(optional) the computer will use this as virtual memory in other words it acts as ram.
Next download rufus usb creator (link: https://rufus.akeo.ie/) and select "bootable disk using: iso image" and provide the route to it, select your image (the ubuntu iso file), select your drive (the usb stick) press ok and wait until the process is completed.

4.One all is done (you have successfully created the partitions and the bootable usb stick is ready) shutoff the computer. Press the power button and immediately press the esc key repeatedly until a menu pops up (this may vary depending on your machine). Select boot options and then another menu showing all drives should pop up. Select your usb stick and then the grub menu should pop up. choose install (ensure that secure boot and fast boot are disabled).

5.One the installation interface loads the first few steps should be simple enough for you. When you reach the section that asks you to choose the installation option (where it says "install alongside windows"... etc) choose "something else" at the bottom. Here double click on the ext-4 partition, select the format checkbox and set mount point as "/" which means root, then hit ok.

6.From here on the rest of the installation process should be simple enough for the noobiest of users. Good Luck!!

Please refer to this guide
Few points:

If you have Windows 8 installed in EFI mode, install ubuntu in EFI
mode.
Disable secure boot in BIOS
Disable fast boot and hiberantion in Windows
Use utility like this
Use boot-repair if needed.
If you are new to Linux , make sure you create some unused space
from Windows disk partition utility.
Last but not the least - install Linux only in unused space.
Your wifi card may not work initially so be connected via LAN cable
Keep a second laptop/computer handy to do some R&D(or ask question
here in askubuntu) in case you are stuck


Read / Write permissions in /opt directory I installed Android Studio in my /opt directory without a hitch and have been using it. Recently, though, Android Studio informed me of an update. It won't perform the update, however, because it says it doesn't have Read / Write permissions in the opt directory where it's installed.

Can anyone recommend the best remedy for this situation?  I would prefer not to move my installation to another directory. I also don't know that I want to change permissions on the directory, though I might be tempted to do so for the update, then revert it back.

Error message:

Studio does not have write access to /opt/android-studio. Please run it by a privileged user to update

I changed the owner of the android studio directory from root to my user account and it worked. Here is the command, where $USER will change by itself to your current active user:

sudo chown -R $USER:$USER /opt/android-studio

sudo chmod -R 777 your_android_studio_location_path/

For example (in my Ubuntu 16.04):

sudo chmod -R 777 /home/igor/Android/


How do I fetch only numbers in grep? I have file like this :

 other lines . . .
 blah blah blah (:34)

I wish to find the occurrence of numbers in the above file. I came up with:

grep [0-9] filename

But that is printing the whole:

blah blah blah (:34)

Rather I want only 34. Is there any way to do so?

You can use grep -E to access the extended regular expression syntax( Same as egrep)

I have created a testfile with below contents:

>cat testfile
this is some text
with some random lines

again some text
ok now going for numbers (:32)
ok now going for numbers (:12)
ok now going for numbers (:132)
ok now going for numbers (:1324)

Now to grep the numbers alone from the text you can use

>grep -Eo '[0-9]{1,4}' testfile
32
12
132
1324

will be output.

Here "-o" is used to only output the matching segment of the line, rather than the full contents of the line.

The squiggly brackets (e.g. { and }) indicate the number of instances of the match. {1,4} requires that the previous character or character class must occur at least once, but no more than four times.

Hope this helps

I would use curl to access your file locally or remotely, then I would grep lines with numbers wrapped in (: ) then cut those pieces off and write to file

the accepted answer ignores there could be numbers in the previous lines of the file, it does work for the example data, but what if the file was remote?

Local

curl file:///home/$USER/Public/input.txt  | grep -o '(:.*)' | cut -d ":" -f 2 | cut -d ")" -f 1 > output.txt

In this example output.txt in your current folder will be written over, we are accessing input.txt from your Public folder.

Remote

curl https://yoursite.com/Public/input.txt  | grep -o '(:.*)' | cut -d ":" -f 2 | cut -d ")" -f 1 > output.txt

In this example output.txt in your current folder will be written over, we are accessing input.txt from https://yoursite.com/Public/.


Installation doesn't begin I downloaded Ubuntu-16.04-desktop-amd64.iso from Ubuntu's downloadable torrent and wrote it on a 4GB flashdrive using rufus-2.8 on a Windows 7.

So I get to the BIOS and set to boot from the USB. On boot, I get to a screen where there's nothing but sort of a keyboard with the letter "H" next to a person within a little circle. If I do nothing or take too long to press H, system just stops responding.

Restarting and quickly pressing H, a language menu shows up and I select Português do Brasil, my mother tongue. Then is shown 5 options - Try without installing, install, check disk, test memory and boot from 1st HD.

No matter what what option I choose, there's a _ sign in the top left corner, blinking non-stop. After that nothing happens. On previous attempts, with different versions, same happens.

This is my system:
Intel(R) Core(TM)2 DUo CPU  T6600 @ 2.20GHz
4,00GB RAM
Windows 7 Starter SP1

I've had the same problem one time a go when .ISO was corrupted. Try to download it once again, or check MD5sum.


How to automount NTFS partitions? I have two NTFS partitions, and I don't want to mount them manually every-time I start Ubuntu.

How can I do this?
Is there a tool or a code to use?
If so, is it safe to automount? specially when they are being used by another OS?

The most straightforward way that will work on most Linux systems is to add them to your fstab. But there are others. Each has their own headline in this answer.
Note:
If you get an error massage saying something about "root" or "permissions" it is because for most mounting options you will need root privileges. In Unity you can achieve that by prepending gksudo (graphical applications) or sudo to the usual command and typing your password. So, e.g. in case of ntfs-config you press Alt+F2 and type gksudo ntfs-config.

Gigolo
Gigolo
Gigolo works hand in hand with Nautilus' remote file system and mounting capabilities. You need to add the partitions to your Nautilus bookmarks (Nautilus is Ubuntu's default file manager). After that you will find them in Gigolo. The rest is said in another answer of mine.

Fstab
Edit: Since guessing from your comments you are not that acquainted with linux I will explain the procedure in more detail:
The fstab-method is cleaner and more basic than gui-tools or Gigolo. It will also work on other systems even those that are text-mode only. In principle you don't need to install anything. For each ntfs-partition you will have to add one line to the file called /etc/fstab. For me the line I added looks like this:
#Windows-Partition
UUID=<xxxxx> /media/win ntfs rw,auto,users,exec,nls=utf8,umask=003,gid=46,uid=1000    0   0

The part that says UUID=<xxxxx> tells your system which partition to mount. If you follow this procedure and have duplicate devices showing up, replace UUID=<xxxx> with /dev/disk/by-uuid/<xxxxx>.  Each partition has it's own unique UUID. Spaces are important, so best copy&paste the line. Replace auto by noauto to manually mount. Users should be in the group plugdev.
Note that if this line is at the very end of your file there should be a newline after it. Mount will complain if you don't have it.
Finding the UUID:

Open Disk Utility and identify the proper partitions by their size (e.g. 120 GB), file system (e.g. ntfs) and name. Note their "Device:" file (e.g. /dev/sdb1). Instead you can run the following command in a Terminal such as gnome-terminal:
sudo fdisk -l

You can find out the UUID of your partitions by running sudo blkid in shell. The output looks somewhat like this:
confus@confusion:~$ sudo blkid
[sudo] password for confus:
/dev/sda1: LABEL="boot" UUID="cc425c68-704f-4836-9123-bbb3aea64471" TYPE="ext2"
/dev/sda2: UUID="1c8b1489-e111-481c-89f2-743203c3ee7d" TYPE="crypto_LUKS"
/dev/sda3: UUID="7258CB9858CB598D" TYPE="ntfs"
/dev/sda4: LABEL="HP_TOOLS" UUID="1405-0A4C" TYPE="vfat"
/dev/mapper/lukslvm: UUID="xZSNtR-MocS-dLMk-vOWa-Ay65-wS9b-GqaNhV" TYPE="LVM2_member"
/dev/mapper/vgubuntu-swap: UUID="f415f3b9-4e4d-48b1-99c2-605e16532f9e" TYPE="swap"
/dev/mapper/vgubuntu-root: UUID="62a862b4-e6c8-4efd-90b5-55eab8e83e39" TYPE="ext4"

The correct UUID will have the proper device file in front of it and TYPE="ntfs" after. So for me the UUID is "7258CB9858CB598D". For you this number will be different. Also I have only one NTFS partition. Subitute my UUID in the lines you add to fstab by the one you found this way.
Setting the mount point
Now the mount point. For each partition this will be different. I chose /media/win. You can choose whatever you like. It just has to be an existing empty directory. You could just as well create the directory /home/yourusername/windows1 and then put it in your fstab.
The other parameters in my line
ntfs tells the fstab that it is an ntfs-type partition.
rw,auto,user,exec,nls=utf8,umask=003,gid=46,uid=1000    0   0 is beyond the scope of this answer. Just use those values as they are. They should be fine. It you're interested, you can read an explanation of these parameters in the link I provided earlier.
When you added the lines and did all of the stuff I described, save the file and run sudo mount -a in shell. If you can access your partitions through their mount points and no errors are printed out, then all went well. If not check for typos and obvious errors. Don't reboot if sudo mount -a displays errors! With errors a reboot might fail.
Finding your user and group id
You can find out your user and group id with the id command.
confus@confusion:~$ id
uid=1000(confus) gid=1000(confus) groups=1000(confus),4(adm),7(lp),20(dialout),24(cdrom),46(plugdev),112(lpadmin),120(admin),122(sambashare)

ntfs-config
A graphical tool ntfs-config  is also available but not necessary (and its current version doesn't work in Natty Narwhal - suppose that will be fixed soon). Besides you might lose old settings in your fstab with this tool (e.g. mounting the cache in the memory), because it overwrites the /etc/fstab file instead of appending things.

This is a safe way of going about things. I don't think it's particular risky having a purely data Windows partition auto-mounting at boot. But I would leave the partition the OS is installed on in a noauto set-up.

You'll need the ntfs-3g package.

First find the UUIDs of the partitions in question by doing in a terminal:

$ sudo blkid

Now you need to edit your /etc/fstab to configure whether these two partitions will auto-mount or not. In a terminal do:

$ gksudo gedit /etc/fstab

You may already have a couple of lines for the NTFS partitions. If not you'll need to make some. They'll look something like this (depending on mount points and UUIDs):

UUID=76E4F702E4F6C401  /media/windowsOS    ntfs-3g  noauto,defaults,locale=en_US.utf8  0  0
UUID=76E4F702E4F6C402  /media/windowsdata  ntfs-3g  defaults,locale=en_US.utf8         0  0

Note the noauto option. This means that partition won't automatically mount at boot. You'll need to manually mount it when you want access to it.


Unity greeter background on Xubuntu 12.04 I'm running Xubuntu 12.04 and using the Unity greeter with LightDM. Everything works well except for I can never change the background. I've tried editing the .conf file, editing the gsettings as the lightdm user, even compiling an override file for com.canonical.unity-greeter. All of these fail, and I end with a dark purple background. I was able to get rid of the grid using gsettings, but that's about it. I've enabled switching user backgrounds, but that never works. I'm wondering whether this is Xfce/Xubuntu specific, or a bug.

Install dconf-editor from the Software Center and then "change" your background editing the  entry in dconf. That way it will read correctly your background (probably xfce and gnome store the "background" value in different ways, so this way you are telling lightdm where is the background in the "gnome" way.
I'm trying this right now

First install dconf-editor
Then change your background picture.
at least . be happy ;)


CTRL+ALT+T not working I'm using Ubuntu 12.04, and till day before yesterday, the shortcut was working perfectly. But when today I pressed it, it didn't open terminal.
The terminal app still works. I am on GNOME3 3.4.2, and I updated recently using apt-get install gnome-shell

The Keyboard shortcuts window shows no problem -

Pls. help, what should I do now?

This is a bug of Gnome Shell. The default shortcut will not work. But a new shortcut will work as usual.

Go to Keyboard > Shortcuts > Custom Shortcuts. Click on  + to add a new shortcut,

At the place of Name use Gnome terminal. In place of Command use the following string,

gnome-terminal --profile=Default --geometry=95x35+250+60

Now assign the key combination (Ctrl+Alt+T) on clicking on it. Afterwards the shortcut should work.

When you're missing your Windows task, go to Keyboard Settings and click on Shortcut Menu. Then, click Windows and select the first options or use Alt+Escape.


Terminal: sudo: apt-get: command not found Lately some really bad things have been happening with my computer, having to do with lack of icons and all kinds of bad things going with my graphical interface. All the bad things in the appeal are accompanied by a certain disability of my terminal. I'm using 12.04 with Gnome Classic view with no effects.

Let's have a sudo apt-get update.

I get sudo: apt-get: command not found message. And it is the way it goes with all my apt-get commands.

What can it mean? How to fix this, especially concerning all the other problems I'm experiencing?

The short answer:

Re-install Ubuntu from a Live CD or USB.

The long version:

The long version would be a waste of your time: your system will never be clean, but if you insist you could try:

copying everything (missing) except for the /home folder from the Live CD/USB to your HDD.

OR

do a re-install/repair over the broken system again with the Live CD / USB stick.

OR

download the deb file for apt-get and install as explained on above posts.

I would definitely go for a fresh new install as there are so many things to do and so little time.

http://packages.ubuntu.com/trusty/i386/apt/download

this page will give you the answer.

download the apt-XXX.deb
then install it: sudo dpkg -i agt-XXX.deb
restart you system will be better;


How do I turn off Caps Lock (the lock, not the key) by command line? For some reason my laptop is stuck in Caps Lock.  I have the Caps Lock key mapped by xmodmap to hyper_l, so I don't have a caps_lock key to turn it off.  Is there a way I can turn it off by command line?  It would be nice if I could reset the lock state without resetting my computer, especially for future reference.  This has happened before, but I would like to know now how to do it properly this time.

I don't know of any command line tool for that in Ubuntu. (For Num Lock, there is numlockx .) Here's a one-liner that you can copy-paste into a terminal window:

python -c 'from ctypes import *; X11 = cdll.LoadLibrary("libX11.so.6"); display = X11.XOpenDisplay(None); X11.XkbLockModifiers(display, c_uint(0x0100), c_uint(2), c_uint(0)); X11.XCloseDisplay(display)'

Here it is again in a more expanded form. We use the Python ctypes library to call C functions from the X library directly. The function XkbLockModifiers changes the state of the keyboard locks, on the core keyboard (XkbUseCoreKbd = 0x0100), affecting Caps Lock (2), setting it to 0 (off).

#!/usr/bin/env python
from ctypes import *
X11 = cdll.LoadLibrary("libX11.so.6")
display = X11.XOpenDisplay(None)
X11.XkbLockModifiers(display, c_uint(0x0100), c_uint(2), c_uint(0))
X11.XCloseDisplay(display)

If you have a stuck modifier, change 2 to the mask of the modifiers you want to turn off. The modifiers are 1=Shift, 2=Lock (Caps Lock), 4=Control, 8=Mod1, 16=Mod2, 32=Mod3, 64=Mod4, 128=Mod5. Run xmodmap -pm to see what Mod1 through Mod5 correspond to. For example, to turn off all modifiers, call X11.XkbLockModifiers(display, c_uint(0x0100), c_uint(255), c_uint(0)). To turn on Num Lock which is on Mod2 and at the same time turn off Caps Lock, call X11.XkbLockModifiers(display, c_uint(0x0100), c_uint(2 | 16), c_uint(16)).

Here's a C version if you want to make a small binary instead of invoking Python. Compile with gcc -O -Wall -o caps_lock_off caps_lock_off.c -lX11, with the packages build-essentials and libx11-dev installed.

#include <stdio.h>
#include <X11/X.h>
#include <X11/XKBlib.h>
int main()
{
    Display *display = XOpenDisplay(NULL);
    if (display == NULL) {
        fprintf(stderr, "Couldn't open display\n");
        return 2;
    }
    Bool sent = XkbLockModifiers(display, XkbUseCoreKbd, LockMask, 0);
    if (!sent) {
        fprintf(stderr, "Couldn't send LatchLockState\n");
        return 1;
    }
#ifdef REPORT_STATE
    XkbStateRec xkb_state;
    Status status = XkbGetState(display, XkbUseCoreKbd, &xkb_state);
    if (status) {
        fprintf(stderr, "XkbGetState returned %d\n", status);
        return 1;
    }
    printf("state.group=%02x\n", xkb_state.group);
    printf("state.locked_group=%02x\n", xkb_state.locked_group);
    printf("state.base_group=%02x\n", xkb_state.base_group);
    printf("state.latched_group=%02x\n", xkb_state.latched_group);
    printf("state.mods=%02x\n", xkb_state.mods);
    printf("state.base_mods=%02x\n", xkb_state.base_mods);
    printf("state.latched_mods=%02x\n", xkb_state.latched_mods);
    printf("state.locked_mods=%02x\n", xkb_state.locked_mods);
    printf("state.compat_state=%02x\n", xkb_state.compat_state);
    printf("state.grab_mods=%02x\n", xkb_state.grab_mods);
    printf("state.compat_grab_mods=%02x\n", xkb_state.compat_grab_mods);
    printf("state.lookup_mods=%02x\n", xkb_state.lookup_mods);
    printf("state.compat_lookup_mods=%02x\n", xkb_state.compat_lookup_mods);
    printf("state.ptr_buttons=%02x\n", xkb_state.ptr_buttons);
#endif
    int err = XCloseDisplay(display);
    if (err) {
        fprintf(stderr, "XCloseDisplay returned %d\n", err);
        return 1;
    }
    return 0;
}

Also possibly of interest is a way to temporarily ignore Caps Lock:

xkbset nullify lock

After this, Caps Lock will effectively be permanently off, until you reenable it with xkbset nullify -lock.

I had this problem and was able to fix it by using the OnBoard keyboard (in Ubuntu Mate, under Universal Access).

Once turned on you should see the CapsLock key is red, or somehow indicated that it is locked on.  Then you can press to toggle off.


How to get my software into Ubuntu? As a developer of free software, I want to get my application into Ubuntu.

Should I provide a source tarball and ask for packaging? Or should I create a package myself? Should I target Ubuntu directly, or should I try to get into Debian and then into Ubuntu automatically?

There are a number of paths that a package can take to enter Ubuntu. The overview of Ubuntu development targeted at "upstream" developers like yourself might be a useful place to start, but I'll try to give you some pointers as well.

Through Debian

Generally, if you are publishing free and open source software going through Debian first is the best path. This way ensures that your package will have a dedicated maintainer. It also will reach the largest number of users as it will be available in not just Debian and Ubuntu but all of their derivatives as well. Some useful links for requesting/providing new packages in Debian:

Work-Needing and Prospective
Packages - Information on how to
file "Intent to Package" and "Request
for Package" bugs as well as list of
open ITPs and RFPs.
Debian Mentors
FAQ - debian-mentors is for the
mentoring of new and prospective
Debian Developers. It is where you can
find a sponsor to upload your package to the archive.
Debian Developer's Reference - Debian Developer's Reference's section on new packages. The entire document is invaluable for both Ubuntu and Debian packagers.

Directly into Ubuntu

In some cases, it might make sense to go directly into Ubuntu first. Some helpful links:

The Ubuntu App Developer site - for lightweight desktop applications, you can submit them directly on the My Apps section of developer.ubuntu.com, the App Review Board will review them and they will be published in the Software Center.
Packaging Guide - an introduction to how to package for Ubuntu.
REVU - a web-based tool to which Ubuntu contributors can upload new packages for review by Ubuntu Developers for inclusion into Ubuntu.
Sponsorship Process - After entering Ubuntu, you can maintain your package through the sponsorship process.

Personal Package Archives

Beyond the official Ubuntu and Debian channels, Launchpad offers you the ability to distribute Debian packages directly to your users through its Personal Package Archives or PPAs for short. One particularly useful aspect of a PPA is that you can provide daily builds of your software for testing purposes.

You can wait for some time because the Ubuntu devs have set up a new repository for Ubuntu 10.10 called extras.ubuntu.com for application developers to submit packages.The app will have to pass through application review first though.


What to use to quickly cut Audio/Video If just need to crop Audio/Video from a longer track, what can I use? I tried OpenShot, but I find the export video slow, perhaps its compling all the "layers" into a new movie? Perhaps I just need a simple "crop" tool for audio/video will surfice?

Avidemux (From PPA) - http://avidemux.sourceforge.net/
OpenShot (From PPA) - https://launchpad.net/openshot/ http://www.openshot.org/ppa/
Pitivi (From PPA) - http://www.pitivi.org/?go=download

I was going to mention commands like ffmpeg or avconv (The new one) which can OBVIOUSLY split files into groups. For example:

FFMPEG

ffmpeg -ss 00:00:00 -t 00:30:00 -i input.avi -vcodec copy -acodec copy output1.avi
ffmpeg -ss 00:30:00 -t 00:30:00 -i input.avi -vcodec copy -acodec copy output2.avi
ffmpeg -ss 01:00:00 -t 00:30:00 -i input.avi -vcodec copy -acodec copy output3.avi

Or

ffmpeg -ss 0 -t 100 -i source.m4v -vcodec copy -acodec copy part1.m4v
ffmpeg -ss 100 -t 100 -i source.m4v -vcodec copy -acodec copy part2.m4v
ffmpeg -ss 200 -t 100 -i source.m4v -vcodec copy -acodec copy part3.m4v
ffmpeg -ss 300 -t 100 -i source.m4v -vcodec copy -acodec copy part4.m4v

AVCONV

avconv -i input.avi -vcodec copy -acodec copy -ss 00:00:00 -t 00:30:00 output1.avi
avconv -i input.avi -vcodec copy -acodec copy -ss 00:30:00 -t 00:30:00 output2.avi
avconv -i input.avi -vcodec copy -acodec copy -ss 01:00:00 -t 00:30:00 output3.avi

Or

avconv -ss 0 -i source.m4v -t 100 -vcodec copy -acodec copy part1.m4v
avconv -ss 100 -i source.m4v -t 100 -vcodec copy -acodec copy part2.m4v
avconv -ss 200 -i source.m4v -t 100 -vcodec copy -acodec copy part3.m4v
avconv -ss 300 -i source.m4v -t 100 -vcodec copy -acodec copy part4.m4v

Or do some script like here: http://icephoenix.us/notes-for-myself/auto-splitting-video-file-in-equal-chunks-with-ffmpeg-and-python/

I always use Kdenlive.
Just import the video, drag it onto the timeline, click on the spot where you want to split it, right-click it, and choose cut. Then remove the part you don't need.


Broadcom wifi issue on 14.04 Lubuntu I have a brand new 14.04 LTS Lubuntu install on a Dell Inspiron 8600 which is getting wired internet connection, but not wifi. I've attempted some of the previous resolves for this, but seem now to have created a larger problem. At boot up, I get a system error message the detail of which reads

KernelOops, kernelBUG at include/net/cfg80211.h:3150!

I had previously tried to follow the instructions to deal with the legacy wifi issue.

Specifically the section dealing with Installing b43/b43 legacy firmware, but ran up against error messages trying to with the sudo apt-get update command, which ended in the error

E: dpkg was interrupted, you must manually run "sudo dpkg --configure -a"

When I do this, it appears to run a process relating to the Broadcom card, and appears to complete, but ends in Segmentation Fault.

Earlier in the process, I also had experience of the apt command meeting what appears to be an open lock issue, hence I explored Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?, though I cannot tell if I resolved this issue, given the repeated Segmentation fault in response to the sudo dpkg --configure -a command.

With regard to the Broadcom driver, Software and Updates seemed to have installed the Broadcom STA driver and had it in use according to the additional driver info, but wifi was not working, nonetheless.

You could take a look at the additional drivers page,
if you search additional drivers in unity. (Sorry, did not notice you were using Lubuntu, just search for additional drivers.)
There you will come across the different drivers that may be used, which came in handy for me because Ubuntu did not use any driver for my wifi at all.
For me it was just a simple flip from no driver to the broadcom driver.

Hope this will help.


KDEConnect for Ubuntu Is there an app in Ubuntu that provides the same integration with Android phones as KDEConnect?

Now that KDE is a framework it mightn't have the same impact of installing libs into my Ubuntu install as it used.to but if there was something designed that would be better.

As of August 2017, you can use kdeconnect on Unity if you install kde-connect indicator. To do that:

sudo add-apt-repository ppa:webupd8team/indicator-kdeconnect
sudo apt update
sudo apt install indicator-kdeconnect

Ubuntu supports KDE services, but you may need to check the checkbox in Startup Apps to activate KDE services. Then you can install kdeconnect indicator, and then you will be able to install kdeconnect on your Android device to transfer stuff from the phone.


Is this hardware configuration Ubuntu 10.04 compatible? I am ready to buy these components for my new linux workstation. I am a software developer and I would like to create a multimonitor workstation like this one

1 - KVR1333D3N9K2/8  Kingston Kit 2*4GB DDR3-1333 PC3-10666 Unbuffered
1 - ST500DM002       Seagate Barracuda 7200.12 500Gb 7200rpm 16Mb SataIII 3.5"
1 - BX80623I52500K   Intel Core i5 2500K 3.30GHz Cache 6MB Sandy Bridge LGA1155 BOX
1 - CAFA70           Corsair Cooling CAFA70 CPU Dual Cooler Intel sk1366/1156/775 AMD AM2/AM3
1 - RS700-AMBAD3-EU  Cooler Master SILENT PRO M700 700Watt EPS/ATX12V Modulare 20/24+4/8+6/8pin PFC Attivo 80+ Bronze
2 - ZT-50401-10L     Zotac NVIDIA GeForce GTX550 Ti 1GB Gddr5 192bit 2*Dvi/HDMI/DP PCi-Ex
1 - SABERTOOTH/P67   Asus SABERTOOTH P67 i7/i5/i3 SLI/CrossFire DDR3 GLan USB 3.0 sk1155 ATX

Edit:

I have bought these components:

Hard Disk Interno Western Digital Caviar Green 500GB 3.5" Intellipower 32MB WD5000AADS
Case Midi Cooler Master Centurion 5 II ATX Nero
VGA Club 3d Radeon HD 6870 Core 900MHz Memory GDDR5 4200MHz 1GB 2xDVI HDMI 2xminiDisplayPort
Masterizzatore Interno Blu-Ray LG BH10LS30 10x BR/DVD/CD Sata Bulk nero
CPU Intel Core i5-2500K 3.30GHz Socket 1155 95W con GPU Sandy Bridge Boxed BX80623I52500K
Alimentatore PC Corsair Enthusiast Series TX650 V2 650W 80Plus Bronze
Scheda Madre Asrock H67DE3 Socket 1155 Intel H67 DDR3 SATA3 USB3 HDMI
RAM DDR3 Geil Value Plus GVP36GB1333C7TC 1333MHz 6GB (3x2GB) CL7-7-7-
ADATTATORE DA MINI DISPLAYPORT A HDMI, DVI E DISPLAYPORT
6 monitors Samsung SyncMaster 930BF
1 Supporto professionale per i 6 monitor

I have upgrade the Workstation adding 3 more monitors!
Look at https://vimeo.com/146922401

Nothing on that list of hardware should bring you problems running Ubuntu on.

Besides the rest of the hardware that should really not mater much, the graphics card is well supported in the latest nVidia drivers and the P67 chipset / Intel CPU are supported and should run without problems in any recent Linux distro.

Since the motherboard is running UEFI instead of a normal BIOS you probably will need to install the system with the alternate CD.

I am not sure how the support for UEFI motherboard's is in 11.10 but in 11.04 you needed a few extra tricks to make your system boot normally.

Its a UEFI problem, not the chipset. If your not comfortable with that point look for a motherboard that runs a more standart BIOS.

You can test compatibility before installing. Download the install image from ubuntu.com and burn it to a CD or USB (there are instructions on the download page).

The simply boot up from this CD or USB stick, and Ubuntu will run from it without touching your hard drive. You can check that everything seems to be working ok, and if you're satisfied click "install" to get the ball rolling.

Your Nvidia card will need proprietary drivers that you can't test when running from the live session, but will be available once you install. In the meantime your system will use a lower-specced open source driver called nouveau to drive the graphics card.


How to create a group and sets the permissions for different users? I would like to create group for some user

addgroup name

After that I would like to add some user to group

sudo adduser username groupname

And set the permissions for each group. There will be three groups:

Group administrators, with permission r,w,e
Group of users, they could copy, insert new file, but no rewrite and delete
Group of viewers, they could only read.

It will be for folder with subfolders. Could you help me with setting the permissions?

One way you could do that is by using the chmod command. It works like this:

chmod [OPTION]... MODE[,MODE]... FILE...

Then you could have the viewers group have other permission, the users group have regular permission, and the administrators group have root permissions.
I hope this helped with your problem!


How can I uninstall a nvidia driver completely ? As expected, Nvidia drivers have reduced my customizations. I can't login to Unity 3D session. I can't find any content to help me to uninstall the driver and I don't know what to do as I have never uninstalled them before.

For Ubuntu 12.04

Commands can be executed to terminal. You can open a terminal with Ctrl + Alt+T keys combo.

If you remove --purge the nvidia driver you will be OK. No need to blacklist something, but sometimes maybe a force-load of the nouveau module needed.

First uninstall completely the driver.

Search what packages from nvidia you have installed.

dpkg -l | grep -i nvidia

except the package nvidia-common all other packages should be purged.

If you want to be sure that you will purge everything related to nvidia you can give this command

sudo apt-get remove --purge '^nvidia-.*'

the .* in the end means (Purge everything that begins (^) with the name nvidia-)

BUT

above command will also remove the nvidia-common package and the nvidia-common package has as a dependency the ubuntu-desktop package.

So after above command you should also give the installation command for ubuntu-desktop package

sudo apt-get install ubuntu-desktop

Also sometimes the nouveau driver get blacklisted from nvidia driver. With purge command it should UN-blacklisted. If you want to be sure that nouveau will be load in boot, you can force-load it by add it to /etc/modules

echo 'nouveau' | sudo tee -a /etc/modules

Last , search for the xorg.conf file and remove it as well

sudo rm /etc/X11/xorg.conf

In summary

sudo apt-get remove --purge '^nvidia-.*'
sudo apt-get install ubuntu-desktop
sudo rm /etc/X11/xorg.conf
echo 'nouveau' | sudo tee -a /etc/modules

Although all above commands not needed, this is my way to completely purge the nvidia driver and use the open source nounveau.

To uninstall nVIDIA driver, open terminal by pressing (Ctrl+Alt+T) then type:

sudo apt-get purge nvidia-current


/dev/sda1: Inodes that were part of a corrupted orphan linked list found I was using my Ubuntu 2015.04 (with ecryptfs-encrypted user home) laptop normally when suddenly, the hard drive became read-only.

I rebooted and now it is stuck on this:

[    0.703206] ACPI PCC probe failed.
starting version 219
error: /dev/sdb: No medium found
error: /dev/sdb: No medium found
Welcome to emergency mode! After logging in, type "journalctl -xb" to view
system logs, "systemctl reboot" to reboot, "systemctl default or ^D to
try again to boot into default mode.
root@nico:~#

Interesting part of the system logs:

-- Unit systemd-fsckd.service has begun starting up.
system-fsck[475]: /dev/sda1 contains a file system with errors, check forced.
kernel: ACPI warning: \_SB_.PCIO.PEG_.VID_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
kernel: ACPI warning: \_SB_.PCIO.PEG_.VID_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
kernel: thinkpad_acpi: EC reports that Thermal Table has changed
system-fsck[475]: /dev/sda1: Inodes that were part of a corrupted orphan linked list found.
system-fsck[475]: /dev/sda1: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
system-fsck[475]: (i.e., without -a or -p options)
system-fsck[475]: fsck failed with error code 4.
system-fsck[475]: Running request emergency.target/start/replace
systemd[1]: system-fsck-root.service: main process exited, code=exited, status=1/FAILURE
systemd[1]: Failed to start File System Check on Root Device
-- Subject: Unit system-fsck-root.service has failed

I am not sure whether it is an ACPI or a disk problem. I tried updating to the latest BIOS my Lenovo Thinkpad T520, but it does not boot better.

How to fix this problem, or if the disk is dying how to at least export the data from my encrypted home to an external drive?

At the prompt, type fsck /dev/sda<number> and press enter (look for the <number> from your logs based on the directory that contains the file system errors)
Enter y to all the errors to fix them
exit

I've had the same issue. I've created a image file from a working Raspbian SDCard using Win32DiskImager. When I ran pishrink, the tool gave me the "orphaned inode list" error. So I followed the suggestion from Rocky Inde and executed fsck. It encountered and fixed some errors so I ran pishrink again and it worked! Thanks Rock Inde.

If you got this far and are still confused how to do it, I've created a script, partly based on pishrink, to fix these "orphaned inodes". You can check the script source at

https://github.com/gmenezesg/fix_orphaned_inode_list

Usage:

wget https://raw.githubusercontent.com/gmenezesg/fix_orphaned_inode_list/master/fix_orphaned_inode_list.sh

sudo chmod +x fix_orphaned_inode_list.sh

sudo ./fix_orphaned_inode_list.sh [imagefile.img]

Script:

#!/bin/bash

function cleanup() {
  if losetup $loopback &>/dev/null; then
        if [ "$verbose_mode" = true ]; then
        echo "### Running cleanup ###"
        fi
        losetup -d "$loopback"
  fi
}

verbose_mode=false

while getopts ":v" opt; do
  case "${opt}" in
    v) verbose_mode=true ;;
    *) usage ;;
  esac
done
shift $((OPTIND-1))

usage() { echo "Usage: $0 [-v] imagefile.img"; exit -1; }

if [ "$verbose_mode" = true ]; then
echo "### Mapping arguments ###"
fi

img="$1"

if [ "$verbose_mode" = true ]; then
echo "### Usage checks ###"
fi

if [[ -z "$img" ]]; then
  usage
fi
if [[ ! -f "$img" ]]; then
  echo "ERROR: $img is not a file..."
  exit -2
fi
if (( EUID != 0 )); then
  echo "ERROR: You need to be running as root."
  exit -3
fi

echo "#Check that what we need is installed"
for command in parted losetup tune2fs md5sum e2fsck resize2fs; do
  which $command 2>&1 >/dev/null
  if (( $? != 0 )); then
    echo "ERROR: $command is not installed."
    exit -4
  fi
done

if [ "$verbose_mode" = true ]; then
echo "### Setting cleanup at script exit ###"
fi
trap cleanup ERR EXIT

beforesize=$(ls -lh "$img" | cut -d ' ' -f 5)
parted_output=$(parted -ms "$img" unit B print | tail -n 1)
partnum=$(echo "$parted_output" | cut -d ':' -f 1)
partstart=$(echo "$parted_output" | cut -d ':' -f 2 | tr -d 'B')
loopback=$(losetup -f --show -o $partstart "$img")
tune2fs_output=$(tune2fs -l "$loopback")
currentsize=$(echo "$tune2fs_output" | grep '^Block count:' | tr -d ' ' | cut -d ':' -f 2)
blocksize=$(echo "$tune2fs_output" | grep '^Block size:' | tr -d ' ' | cut -d ':' -f 2)

fsck -y "$loopback"


Passenger (mod-rails) can't find libopenssl-ruby Trying to build an nginx server with Phusion Passenger on Ubuntu 11.10 (hurray for the new version!).  Running "passenger-install-nginx-module" outputs the following error:

* OpenSSL support for Ruby... not found

With the following suggestion to fix it:

* To install OpenSSL support for Ruby:
  Please run apt-get install libopenssl-ruby as root.

Running "sudo apt-get install libopenssl-ruby" yields the following output:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libruby' instead of 'libopenssl-ruby'
libruby is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

A little research shows that libruby is a virtual package that provides libopenssl-ruby as part of the package.  However, the passenger-install-nginx-module script still can't find it, and keeps throwing the same error.  Help me, please!  I'm in a little over my head on this one, and the google-the-error-code method that usually works is failing me today.

You need to change to your ruby ext/openssl/ directory, then run

ruby extconf.rb
make
make install

then try passenger-install-nginx-module again

No. I got so mad at Ubuntu that I switched to Windows 7. I realized that I was spending more time setting up tools than I was actually producing code. I've since moved on to other projects, and still only use Windows 7.


How do I delete Ubuntu installed with Windows system dual-boot? Possible Duplicate:
  How to remove Ubuntu and put Windows back on?

I have installed Ubuntu alongside Windows XP on a different partition and I want to delete Ubuntu while retaining the Windows XP. I don't want that my Windows gets damaged in the process. How can I do this?

From the picture it seems you have Windows on the C: (NTFS) partition, as it is labeled "System". Then Windows and Ubuntu are on separate partitions. To delete Ubuntu you just have to format both partitions labeled as "Unknown", and no harm to both your C: and D: partitions will be done.


Ubuntu starts to work slowly in a year Yesterday, I reinstalled ubuntu because it started to work slowly, with lags. And I figured that I catch myself doing the same every year or so. My ubuntu starts to work slowly in about a year.

There is definitely a pattern here.

Has anyone experienced the same?

Is there a fix for this without reinstalling the system?

df result:

Filesystem     1K-blocks      Used Available Use% Mounted on
udev             4085444         4   4085440   1% /dev
tmpfs             819012      1292    817720   1% /run
/dev/sda5       45047220  41445028   1290872  97% /
none                   4         0         4   0% /sys/fs/cgroup
none                5120         0      5120   0% /run/lock
none             4095052    244364   3850688   6% /run/shm
none              102400        68    102332   1% /run/user
/dev/sda3      359194556 340096324  19098232  95% /media/jahongir/CA38409038407E07

fdisk -l result:

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x1baf0215

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      206847      102400    7       HPFS/NTFS/exFAT
/dev/sda2          206848   157571071    78682112    7  HPFS/NTFS/exFAT
/dev/sda3       157571072   875960189   359194559    7    HPFS/NTFS/exFAT
/dev/sda4       875960318   976771071    50405377    5  Extended
Partition 4 does not start on physical sector boundary.
/dev/sda5       875960320   967757823    45898752   83  Linux
/dev/sda6       967759872   976771071     4505600   82  Linux swap /     Solaris

I have 8GM RAM.

After discussion in the comments, I determined that there are two major problems causing the slowness described.

The two hard disk partitions are FULL. sda5 (root) is at 97% full. The user needs to delete old files, clean up old kernels, and uninstall unneeded applications, etc.
The second problem, and just as big a problem as the first, is that the extended partition (sda4) that contain his Ubuntu installation, is not aligned properly. This really causes some problems. This is too big a topic to discuss here, or guide the user through fixing. It may involve as much as reinstalling Ubuntu and the data all over again, on aligned partitions (probably easist), or as little as making adjustments to the start/end of the partitions (not to be taken lightly).

Cheers, Al

You are right, it depends on the fact we fill the system with new files and programs.

There are some tricks you can use. But at least this two:

First, control startup applications. To view them, run the following command in a terminal:

sudo sed -i ‘s/NoDisplay=true/NoDisplay=false/g’ /etc/xdg/autostart/*.desktop

Second, install preload, which helps you to better performance optimizion the loading:

sudo apt-get install preload


How to open ~/.pam_environment? I wanted to set environment variables JAVA_HOME and PATH. So I wanted to open ~/.pam_environment since it is the best place to set environment variables relevant to a particular user according to the link https://help.ubuntu.com/community/EnvironmentVariables.
The link states:

Session-wide environment variables
Environment variable settings that should affect just a particular user (rather then the >system as a whole) should be set into:
~/.pam_environment - This file is specifically meant for setting a user's
environment. It is not a script file, but rather consists of assignment expressions, one per line.

The problem I have is that I am not able to open the file ~/.pam_environment by using the command gedit ~/.pam_environment.
I do not know whether this is the right way to open this file, please point me in the right direction.

Note that .pam_environment does not use the normal syntax. You should strictly follow the pam_env.conf syntax.

In particular if you want to set the JAVA_HOME and PATH variables you can put this content into your .pam_environment:

JAVA_HOME DEFAULT=<the-path-to-java-home
PATH DEFAULT=${PATH}:extend/the:path

Following Rinzwind answer will most likely brick your login[1]. In which case you can re login into a TTY  using Ctrl + Alt + F1 and remove the .pam_environment file with the command:

/bin/rm ~/.pam_environment

[1] At least on my computer with Kubuntu 12.04

I was having a similar issue with this. Specifically the concept of locating, or otherwise creating, the .pam_environment file.

This is the route I followed, courtesy of Deepu Mohan Puthrote's blog post (Link below):

Step One: In your GUI (Graphical User Interface) Locate the file in your 'home' directory called '.pam_environment.' NOTE: Pam_environment is a hidden file, to make it and other files/directories visible press 'Ctrl+H.' If pam_environment does not exist, continue to step two. If pam_environment does exists, skip to step three.

Step Two: This is how you create your pam_environment file. Open your CLI (bash, terminal, or whatever you want to call it) and make sure you are in your home directory (I.e /home/yourname), you can do this with the 'pwd' (print working directory) command. If you are not in your home directory, input 'cd' to revert to your home directory.

Now create the file in question with the following command:

touch ~/.pam_environment

Step Three: In your GUI, open '.pam_environment' in your home directory (remember to make hidden files visible if necessary). When opened, you can input the the commands into the text editor which will create your session wide environment.

For 'PATH' (which I was learning to set) I used something like:

PATH=$PATH:~/usr/sbin:/usr/bin/<----add your directory here ---->

Step Four: Now restart your computer and, if your computer is as old as mine, go make a cup of tea.

Now check that your change has worked. Open your CLI and run the command 'printenv PATH.' Unless I have failed you, you have just successfully created a session wide PATH variable; you should see the PATH variable, or a variant of, displayed on screen with the new value you have defined in your .pam_environment file.

For reference: http://tech.deepumohan.com/2012/12/how-to-set-environment-variable-in.html


chmod files only in all subdirectories Please someone assist me with chmod, I have the following file structure

-dir1
--file1
--file2
--dir1a
---file1a1
---file1a2
--dir1b
---file1b1
---file1b2

How do I chmod 655 to all files under dir1 and all subdir?
So all files will have 655 permission and all dir will remain as they were.

Thank you

Better to use

find . -type f -exec chmod 655 -- {} +

The other proposed solution from @sagarchalise will not work if filenames contain spaces or start with a dash.

I think going inside dir1 and

find . -type f | xargs chmod 655

will do the trick.


Ubuntu TaskBar is gone. Launcher is missing I recently updated (Feb 15, 2018) my Ubuntu 16.04 from the software manager. I don't remember what programs got updated, now my taskbar & launcher is gone.

Is there a way to fix this?

I've tried everything that's available from the internet, but none works.

Will upgrading to 17.10 fix my problem? I don't want to do fresh install from the start again :(

I have found a solution. apt-get fails to be able to handle the situation, but aptitude can handle it.

sudo aptitude install ubuntu-desktop

Note that the first solution offered by aptitude doesn't correct the problem, because that chooses not to install the package. I had to select no the first time, and then aptitude offered a second solution of downgrading the compiz packages that caused all the problems. The downgrade fixes the dependency problem, and then ubuntu-desktop and unity are reinstalled.


Cannot connect to google talk using empathy/pidgin after upgrading I can't seem to be able to connect to google talk using either pidgin or empathy after upgrading to Ubuntu 10.10 (fresh install).

I do not know why... empathy just writes "Connecting ..." forever and never connects. What can I do from there?

Google talk's web interface works just fine for me so I doubt it is a firewall issue.

EDIT: In fact sometimes it's able to connect (empathy), it just takes a LOOONG time (I'd say about 5 mins), longer than I am willing to wait. On the other hand, the web interface is able to connect in seconds.

I also faced this problem today. But it does connect, so this may actually be a bug in empathy/pidgin. Report it by typing this in a terminal:

  ubuntu-bug empathy

Replace empathy above with pidgin if you want to report a bug in pidgin.

Thanks!

I have faced the same problem today and after waste a couple of hours I found a solution and I posted it in my Blog:

http://rodrigoguarischi.wordpress.com/2011/10/17/fixing-empathy-bug-gtalk-contact-doesnt-appear/

I hope it helps


What files and directories can be excluded from a backup of the home directory? Duplicity does already a great job of making efficient backups, but I want still to minimize the amount of files being back-upped.

What files or directories can be excluded in a home directory? Please name these explicitly, wildcards allowed, paths are relative to the home directory.

Most of these files and directories are recreated if missing. They are mostly intended for lowering the startup time of an application (Firefox extensions cache), indicating locks (.gksu.lock), or containing session-specific information (e.g. ID of dbus session). Recent documents changes frequently and is generally not that sensible to backup.

These directories may be excluded:

.gvfs                           # contains mounted file systems?
.local/share/gvfs-metadata
.Private                        # contains the actual encrypted home directory
.dbus                           # session-specific
.cache
.Trash                          # do I need to say more?
.local/share/Trash
.cddb                           # cached info about audio CDs
.aptitude                       # cached packages lists

Flash-specific:

.adobe        # Cache for flash, maybe others?
.macromedia   # except for Flash persistence, there is no reason to keep this

Files:

.xsession-errors            # contains errors from the current graphical session
.recently-used              # recently used files
.recently-used.xbel
.thumbnails
.Xauthority                 # session-specific
.ICEauthority
.gksu.lock
.pulse                      # directory
.pulse-cookie
.esd_auth

KDE specific:

.kde/share/apps/RecentDocuments # Recent documents on KDE
.kde/share/apps/klipper         # Contains a history of the Klipper clipboard (KDE)
.kde/share/apps/okular/docdata  # you will loose saved scrolling positions of PDFs
.kde/share/apps/gwenview/recentfolders
.kde/share/apps/kmess/displaypics  # cached other users' profile pics
.kde/share/apps/kmess/customemoticons  # cached emoticons of others

Firefox-specific (see also Profile folder):

.mozilla/firefox/*/Cache
.mozilla/firefox/*/minidumps    # in case Fx crashes dumps will be stored in this
.mozilla/firefox/*/.parentlock       # session-specific
.mozilla/firefox/*/urlclassifier3.sqlite  # phishing database, recreated
.mozilla/firefox/*/blocklist.xml   # blacklisted extensions
.mozilla/firefox/*/extensions.sqlite  # extension database, recreated on startup
.mozilla/firefox/*/extensions.sqlite-journal
.mozilla/firefox/*/extensions.rdf
.mozilla/firefox/*/extensions.ini
.mozilla/firefox/*/extensions.cache
.mozilla/firefox/*/XUL.mfasl     # cached UI data, recreated
.mozilla/firefox/*/XPC.mfasl
.mozilla/firefox/*/xpti.dat
.mozilla/firefox/*/compreg.dat

Opera-specific (related question on Superuser.com: Is documentation available on files and directories in the Opera profile folder?):

.opera/temporary_downloads
.opera/cache
.opera/thumbnails
.opera/opcache
.opera/icons
.opera/application_cache
.opera/widgets/*/cache
.opera/lock

Komodo Edit:

.komodoedit/*/codeintel/db
.komodoedit/*/host-*/*/codeintel
.komodoedit/*/XRE/Cache
.komodoedit/*/XRE/.activatestate/komodo edit/Crash Reports
.komodoedit/*/XRE/.activatestate/komodo edit/*/Cache
.komodoedit/*/XRE/.activatestate/komodo edit/*/minidump
.komodoedit/*/XRE/.parentlock
.komodoedit/*/XRE/extensions.rdf
.komodoedit/*/XRE/extensions.ini
.komodoedit/*/XRE/extensions.cache
.komodoedit/*/XRE/XPC.mfasl
.komodoedit/*/XRE/XUL.mfasl
.komodoedit/*/XRE/xpti.dat
.komodoedit/*/XRE/pluginreg.dat
.komodoedit/*/XRE/compreg.dat
.komodoedit/*/XRE/*.sqlite-journal
.komodoedit/*/pystdout.log
.komodoedit/*/pystderr.log
.komodoedit/*/history.sqlite.bak
.komodoedit/*/running.lock
.komodoedit/*/mutex.lock
.komodoedit/*/*.xmlc
.komodoedit/*/startup-env.tmp
.komoeoedit/*/commandments.fifo
.komoeoedit/*/history.sqlite

GnuPG:

.gnupg/rnd
.gnupg/random_seed
.gnupg/.#*
.gnupg/*.lock
.gnupg/gpg-agent-info-*

Google Chrome:

.config/google-chrome/Default/Local Storage
.config/google-chrome/Default/Session Storage
.config/google-chrome/Default/Application Cache
.config/google-chrome/Default/History Index *

Other apps:

.pulse/icons                  # Pidgin
.java/deployment/cache        # Cached applets
.icedteaplugin
.icedtea
.gnome2/epiphany/favicon_cache
.dropbox                      # to avoid problems, let Dropbox re-create these
.dropbox-dist

I've recently been looking at doing this sort of thing, and I've noticed that many of the files in my home directory that I don't want to back up seem to not have group permissions set.  If the same holds on other systems, then a likely list of suspects might be obtained with:

find ~ -not -perm -g+r

(Although check the output, because although mine seemed mostly good, my e-mail inbox also appeared on the list, and I don't know how well it will work for others.)

This is particularly appealing to me, because my home directory is encrypted (including filenames), so a manual exclusions list would be a PITA, and instead I should be able to use group permissions to auto-generate an exclusion list.

(I know the thread is old, but I thought this might be useful to someone.)


Gigabit ethernet running at 10 BaseT speed I have FreeNAS running a SMB file server which I am accessing from Windows, Linux and macOS. File transfer speeds from Windows and macOS are great, around 100MB/sec. File transfer speed to Ubuntu 16.04.1 LTS is only 5.4MB/sec, which is slower than 100BaseT, and is probably 10BaseT.

I have run ifconfig/ethtool on my Ubuntu box, and it shows a speed of 1000BaseT Full Duplex, and ifconfig on FreeNAS box shows link speed and speed of 1GBit ???!!!

I believe both cards in both machines are Realtek 8169 PCI cards...

Any help much appreciated. I have restarted both machines and I am still getting the same speed...

Just so you know, I tried another cable and got 10MB/sec, but switched back to the old cable under macOS and got Gigabit. Rebooting into Ubuntu also gave me Gigabit, and I still have gigabit every OS I launch !!!


How to install the (latest version of) Nemo in Ubuntu 18.04 without cinnamon dependencies? In previous Ubuntu versions there was a Nemo version without cinnamon dependencies but the PPA does not (yet?) include a version for Ubuntu 18.04 Bionic Beaver.
 Is there another way to install the (latest version of) Nemo in Ubuntu 18.04 without cinnamon dependencies?

Doug provided a PPA for install the Nemo in Ubuntu 18.04 (only) without cinnamon dependencies (see his comment).
For newer Ubuntu versions: A unity session using Nemo in 20.04 can be set up to work reasonably well, especially if you use a modified nemo.desktop in the launcher (see Doug's comment).
He recommends to purge the installed nemo files before installing the new version. I did the following:
sudo apt purge cinnamon-desktop-data cinnamon-l10n gist hddtemp hwdata inxi libcinnamon-desktop4 libnemo-extension1 libxapp1 mesa-utils nemo nemo-data nemo-fileroller ruby-json xapps-common

Then added the PPA:
sudo add-apt-repository ppa:mc3man/bionic-noprop
sudo apt-get update

Then install Nemo:
sudo apt-get install nemo nemo-fileroller

To make Nemo the default file manager:
xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search

To handle the desktop just disable nautilus:
gsettings set org.gnome.desktop.background show-desktop-icons false

Reboot or log out
Thank you, Doug, for this great option.

[This was a comment but it was too long!]

I have doubts about this working as it used to. The versions of Nemo in the webupd8team repo and the standard Universe repo are the same, but the Universe repo (version 3.6.5-1) is marked ‘bionic’ whereas the webupd8team one (version 3.6.5-1~webupd8~artful01) is marked ‘artful’. My guess is that sudo apt install nemo would install the standard repo version (along with Cinnamon desktop).

You could use Package | Force Version… in Synaptic to force the webupd8team version. I’m not sure if sudo apt install nemo=3.6.5-1~webupd8~artful01 would work or not as apt-cache policy nemo doesn’t list it as a candidate (i.e. it’s the wrong release).

If you run apt-cache policy nemo what version does it show is installed?

EDIT: I decided to gradually create a new 18.04 install in a VM, rather than upgrading 16.04 in August, so I’ve just got back to looking at this. The Nemo version in the standard repos does not install the Cinnamon desktop (unlike Caja which does look like it installs Mate). In my (limited) testing so far it seems to run fine.


Ubuntu 12.04 lts heats laptop My Toshiba Satellite L630-104 (Intel Core i3 M330 @2.13 GHz, 3GB RAM), overheats badly using Ubuntu 12.04 LTS.
Am using Ubuntu in dual booting mode, heating doesn’t happen with window 7. Am new to Ubuntu & quite excited to use/learn but on couple of instance machine shut automatically due to overheat, it shoots up beyond 75C. After browsing for solution on internet, installed Jupiter/Gnome classis profile and now temperature ranges from 60 to 65. Is this healthy temperature, is there any other fix with which heating can be refused ?

If there is a graphic card like nvidia, AMD in your laptop., goto that company site and download and install those drivers for linux !

This will works !


Sound in VLC is out of sync After a minute or so all my sounds in different videos and formats gets late.

I've tried to reinstall VLC but it didn't help.
Please help I can't play any videos because of that.

It's late about 1-2 seconds.

All of the videos work perfectly in movie player!

VLC and audio lag issues are perhaps more common than they really should be.  Under Linux, pulse-audio seems to be a common thread.

However there doesnt appear to be a magic "fix" to cure all.

So here are a few things you could try:

Check that you haven't changed the Audio synchronisation: Tools - Track Synchronisation should be set to zero
Check that other preferences havent affected audio tracking: Tools > Preferences and click the Reset Preferences button
Use Alsa instead of Pulse-Audio for output:  From the VLC menu, choose Tools > Preferences > Audio. Change the Output from Default to Alsa
If using Natty - revert to using interrupt driven mode instead of time-scheduled mode

modify the following line in /etc/pulse/default.pa

load-module module-udev-detect

with :

load-module module-udev-detect tsched=0

Use Alsa instead of Pulse-Audio for output: From the VLC menu, choose Tools > Preferences > Audio. Change the Output from Default to Alsa
^ This works

I've had exactly the same problem for the last few weeks.

Although I don't have a fix there is a remedy in the menu. I go to Tools > Track Synchronization. This opens a new window. Under the Synchronization tab you'll find Audio/Video - Advance of audio over video - with a window and up and down arrows to offset the audio. I found arrowing -.003 or -.002 seconds is usually pretty close and watchable.

Even though this fixes it enough to watch videos for now, I hope future updates will fix the problem.


How do you limit root to no more than 1 login at a time? I took a practice test for a cert and one of the questions was "Limit root to no more 2 simultaneous logins, make this configuration persistent between restarts". I didn't even really know this was possible. Is this just for ssh or could you do this for all terminal access on the machine? If so, how?

One way would be to limit the terminals through which root login is allowed. This is done by editing /etc/securetty. Just let securetty contain any two TTYs and you're done.

Nevert tried this but would go the following way:

Make bin/bash and other shells unaccessible to root.
Create script that would run bash if not already running, otherwise exit.
Assign this script as root shell.


How do I search for available packages from the command-line? I have successfully installed some packages using the command line 'sudo apt-get install packagename' when I have known in advance that those packages are available.  But how can I search for or get a list of what is available in the repositories?

To search for a particular package by name or description:
From the command-line, use:
apt-cache search keyword

where the search keyword can be all or part of a package name or any words used in its description.
For example, apt-cache search proxy includes both these packages:

tinyproxy - A lightweight, non-caching, optionally anonymizing HTTP proxy
tircd - ircd proxy to the twitter API

Note: the list may be long, so you can pipe the output to less to make it scrollable one line or one screen at a time, i.e. apt-cache search something | less.

To get a list of ALL packages
apt-cache search .

Use Synaptic if you have X-forwarding enabled or are on a desktop
Synaptic is often a more convenient way to do this, but requires at least an X server on your end (unless you're running a desktop environment). Install with sudo apt-get install synaptic if necessary.

Synaptic on ssh'd server via X forwarding:

Synaptic running locally on Ubuntu Desktop:

Unfortunately I don't have enough rep to add this a comment on the main answer.
But I was trying to find g++- - alike packages with apt-cache search. It's important to know in this case that keyword is a regular expression so apt-cache search g++- will not have helpful results.
apt-cache search "g[+][+][-]" would be the way to go


can't login as mysql user root from normal user account in ubuntu 16.04 I just installed Ubuntu 16.04 LTS along with the packages php, mariadb and nginx. I ran mysql_secure_installation and changed the root password.

Now when I try to login to mysql using the root account while logged in Ubuntu as normal user account I get access denied.

When I login using sudo mysql, mysql doesn't even ask me password. If I run mysql_secure_installtion I see that old settings never got set permanently.

What am I doing wrong?

I recently upgrade my Ubuntu 15.04 to 16.04 and this has worked for me:

First, connect in sudo mysql

sudo mysql -u root

Check your accounts present in your db

SELECT User,Host FROM mysql.user;
+------------------+-----------+
| User             | Host      |
+------------------+-----------+
| admin            | localhost |
| debian-sys-maint | localhost |
| magento_user     | localhost |
| mysql.sys        | localhost |
| root             | localhost |

Delete current root@localhost account

mysql> DROP USER 'root'@'localhost';
Query OK, 0 rows affected (0,00 sec)

Recreate your user

mysql> CREATE USER 'root'@'%' IDENTIFIED BY '';
Query OK, 0 rows affected (0,00 sec)

Give permissions to your user (don't forget to flush privileges)

mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
Query OK, 0 rows affected (0,00 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0,01 sec)

Exit MySQL and try to reconnect without sudo.

I hope this will help someone :)

I had the same issue and running the following fixed it:

mysql_upgrade --force


Is it possible to boot a LiveCD of Ubuntu via PXE using HTTP (not NFS)? I've found a lot of blogs explaining how to boot the installer via PXE. And I've achieved it. But now I would like to boot a LiveCD. I've seen many blogs explaining how to do this using a (DHCP+TFTP+)NFS server, but my infrastructure only has a (DHCP+)HTTP server (the latter is used to store the pxelinux.0,kernel+initrd files and the isos mount points, too).
Are there some kernel parameters "equivalent" in HTTP to NFS's netboot=nfs nfsroot=serverIp:/mount/point ...???
Thanks!!

yes, ubuntu iso
     for test on windows i am use tftp32 and freenfs and vmware
          c:\tftpd32\ubuntu\ (unziped iso)
       path tftp32 c:\tftpd32\
       path nfs c:\tftp32\

LABEL Ubuntu linux Install
KERNEL ubuntu/casper/vmlinuz
APPEND root=/dev/nfs boot=casper only-ubiquity netboot=nfs nfsroot=192.168.0.1:/ubuntu ip=192.168.0.5:192.168.0.1:192.168.0.1:255.255.255.0:linux::none file=preseed/ubuntu.seed initrd=ubuntu/casper/initrd.lz quiet splash locale=ru_RU --

LABEL Ubuntu linux Live Boot
KERNEL ubuntu/casper/vmlinuz
APPEND root=/dev/nfs boot=casper netboot=nfs nfsroot=192.168.0.1:/ubuntu ip=192.168.0.5:192.168.0.1:192.168.0.1:255.255.255.0:linux::none file=preseed/ubuntu.seed initrd=ubuntu/casper/initrd.lz quiet splash locale=ru_RU --


How to configure the touchpad middle click? In almost all the large modern Linux distributions and in the last releases of Ubuntu-based distributions the touchpad was configured out of the box to have right, left and middle clicks and you could configure them easily. The middle click is usually done with a two or three-finger tap.

In Ubuntu 12.04 I haven't seen where to enable the middle click and it is not enabled by default.

You can make it work and persist in Ubuntu 12.04, even afer suspending, following these steps.

First, create a file with your script:

echo synclient TapButton3=2 > ~/touchpad_settings.sh

(You could place the script in another directory, e.g. /usr/bin or /etc, if you wanted it to be in a more "generic" place, in case you have multiple accounts in your ubuntu installation.)

Then make it executable:

chmod +x ~/touchpad_settings.sh

And finally, run the following command replacing "user" with your user name:

gsettings set org.gnome.settings-daemon.peripherals.input-devices hotplug-command "/home/user/touchpad_settings.sh"

Then reboot, or logout & login, or restart GNOME.

That's all!

For more information about this fix, go here.

I would recommend adding synclient TapButton2=2 and synclient TapButton3=3 to your ~/.bashrc configuration. To do this open a terminal and run:

$ echo synclient TapButton2=2 >> ~/.bashrc
$ echo synclient TapButton3=3 >> ~/.bashrc

Then reboot your computer.

The synclient commands do the following:

synclient TapButton2=2 will set the two-finger tap to a middle button click.
synclient TapButton3=3 will set the three-finger tap to a right button click.


Redirect stdout to file and stderr to file and to screen I am running valgrind to shake out bugs in my program.  Valgrind's memcheck prints to stderr.  What I want to do is a modification to this:

valgrind --tool=memcheck ./a.out >output 2>grindout

But, I also want valgrind output to display on screen.  So program's output all goes to file.  Valgrind output is placed in grindout and displayed to screen.  How do I do so?

thanks.

You're looking for the tee command. Unfortunately there's some trickery regarding redirecting stderr and stdout. The following should work:

valgrind --tool=memcheck ./a.out 3>&1 2>&3 >output | tee grindout

This redirects standard output to output, moves standard error to a new file descriptor 3, which points to stdout. tee takes this stdout-ified stderr and prints it both to your screen and to gridnout.

I had this same issue. The problem was caused by buffering. You can read more about there here: http://mywiki.wooledge.org/BashFAQ/009

This is the solution that worked for me:

stdbuf -o0 valgrind -v --tool=memcheck stdbuf -o0 ./a.out  2>&1 | stdbuf -o0 tee grindout

the 'stdbuf -o0' placed in front of each of the three programs that get executed causes them to turn off buffering.

The problem was never the the output wasn't being generated, nor was the problem that it wasn't going to the right place. The problem was that it wasn't getting there at the right time ( due to buffering )


Dividing an existing Ubuntu installation on two physical drives I am planning to add an SSD drive on my Ubuntu machine. At the moment the computer has a single hard drive, containing the whole install. What I would like to do, is to move the existing installation to the SSD (/ mount), excluding the /home folder, which I would like to keep on the current hard drive. The reason for this is, that the home folder would not fit on the SSD.

Is there a way that I could just copy everything except the /home folder to the SSD and then mount the current hard drive's home folder to /home (of course deleting all that stuff, that was copied on the SSD). Has anyone tried this? Do you think it's possible?

I would not like to make a new installation, as it will take a long time to reconfigure everything.

Not tested, but I would do it in this way if the SSD is at least the same size or bigger than HDD:
Let's name the SSD as /dev/sda and the HDD as /dev/sdb for simplicity.
Steps:

Plug in the SSD and the HDD and boot a live Ubuntu from a bootable media (CD-ROM, pendrive)

issue this command in a terminal: sudo dd if=/dev/sdb of=/dev/sda

when finished, mount /dev/sda and edit on it the /etc/fstab file by adding:
/dev/sdb1 /home           ext4     noatime,nodiratime,defaults        0       2

Enter the /home directory of mounted /dev/sda and erase everything there.

Now comes the hard part: mount /dev/sdb1 and erase everything except /home directory.

When cleaned, enter /home and move out the directories to the root of mounted /dev/sdb1

Erase the empty /home directory from /dev/sdb1

If /dev/sda was bigger than /dev/sdb, use gparted to resize the partition to fit the disk.

Reboot from /dev/sda

Enjoy.

first, you should partition your ssd using the existing system (fdisd)
Do not create filesystems on the newly created partitions, just use dd to copy the existing partitions to the partitions on the ssd. for example:

dd if=/dev/sda1 of=dev/sdb1

Fstab should be updated as wel to point to the new partitions.
and I would suggest to keep /var on your hdd if possible as it is frequently written to.


How do I make a window bigger than my screen? I want to resize my web browser to be a higher resolution than my screen.

I remember being able to do this in Windows 95 by setting the desktop resolution higher than the monitor resolution. How can I do it in Ubuntu?

This answer describes actually how to increase the whole desktop resolution beyond physical resolution and not only a specific window:

Panning viewport

If you want to have a panning viewport, i.e., a virtual screen that's bigger than your physical screen that moves when you move the mouse to the edge ("zoomed in" view) specify the desired physical resolution with --mode and the virtual screen size with --fb and panning area (typically same as virtual screen size) with --panning. For example,

xrandr --output VGA1 --rate 60 --mode 800x600 --fb 1280x1024 --panning 1280x1024*

on https://wiki.ubuntu.com/X/Config/Resolution

HTH

Try "sudo apt-get install compizconfig-settings-manager" ...that should get you compiz

After you installed it open the compiz and you will be shown up with this window
Go to the Accessibility->Magnifier and you can set your shortcut to make it work


How to PXE-boot from Ubuntu 10.04 Desktop edition? My aim is to Install the Ubuntu 10.04 desktop version on a remote machine using PXE-BOOT. I'm trying to apply the steps given in PXE-BOOT for Ubuntu 9.10
.  (I know this is for 9.10).

In "Step 8. Setting Up Boot Files", it says cp -a /media/cdrom/install/netboot/* /tftpboot/ but I wasn't able to find the netboot folder in my Ubuntu 10.04 Desktop CD. Does that folder only exist in Ubuntu Server edition? Is it possible to do this in the Desktop edition?

The second point of Step 8 in the guide you linked to says

  Download files with lftp:

lftp -c "open http://archive.ubuntu.com/ubuntu/dists/karmic/main/installer-i386/current/images/netboot/;

  mirror"

That clearly states that you had to download the netboot version of Ubuntu desktop. So you wouldn't find the netinstall version on your Desktop Edition disc.

More so, you can check out the tutorial on How to network boot (PXE) the Ubuntu Live Disc which is more directly addresses 10.04 and doing a network boot with any edition of Ubuntu. An excerpt from the tutorial is as follows:

  Copy the ISO into the /tftpboot/howtogeek/linux directory
  Create the mount point:

  sudo mkdir -p
     /tftpboot/howtogeek/linux/ubuntu/<version-of-ubuntu>
  Edit the fstab file to have the ISO auto-mounted at boot: sudo vim    /etc/fstab
  Append to “fstab” the ISO mount entry:

  /tftpboot/howtogeek/linux/ubuntu-11.04-desktop-amd64.iso
     /tftpboot/howtogeek/linux/ubuntu/11.04 udf,iso9660 user,loop 0 0

  Note: Despite representation, this is one unbroken line.
  Test that the mount point works by issuing: sudo mount -a
  If all went well, you should be able to list the contents of the ISO    by issuing:

  ls -lash /tftpboot/howtogeek/linux/ubuntu/11.04/

  Create an NFS share

  While the boot procedure starts by using PXE, the actual heavy lifting
  is done by the NFS share on the server. As we are basing this guide on
  our FOG server, the NFS components and some configurations have
  already been done for us by the FOG team, and all we have to do is add
  to them our Ubuntu share.

  Edit the “exports” file to add the new share: sudo vim /etc/exports
  Append to it the pointer to our ISO mount point:

  /tftpboot/howtogeek/linux/ubuntu/11.04/
     *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
  Restart the NFS service for the settings to take affect:

  sudo
     /etc/init.d/nfs-kernel-server restart

  PXE menu setup

  Edit the “Linux stuff” menu:

  sudo vim /tftpboot/howtogeek/menus/linux.cfg
  Append to it the following:

  LABEL Ubuntu Livecd 11.04 MENU DEFAULT KERNEL
     howtogeek/linux/ubuntu/11.04/casper/vmlinuz APPEND root=/dev/nfs
     boot=casper netboot=nfs
     nfsroot=<YOUR-SERVER-IP>:/tftpboot/howtogeek/linux/ubuntu/11.04
     initrd=howtogeek/linux/ubuntu/11.04/casper/initrd.lz quiet splash --

  The above may look messy at first glance but all you have to do is
  replace <YOUR-SERVER-IP> with the IP of your NFS/PXE server.

  For a clearer geek understanding, the text above will:

  Create a new PXE entry in the“Linux” sub-menu called “Ubuntu 11.04”.
  Because of the “MENU DEFAULT” parameter, this entry will be    automatically selected when entering the “Linux” sub-menu.
  Point the client to take the kernel + initrd files usinf TFTP from    the relative path in the /tftproot directory of
  howtogeek/linux/ubuntu…
  Point the initrd scripts to mount the root filesystem from the NFS    share on the absolute path of
  <YOUR-SERVER-IP>:/tftpboot/howtogeek…

It exists on the server CD and on the alternate CD. But not on the desktop version ^^

thi s is an interesting link to get a PXE working : http://ubuntuforums.org/showthread.php?t=1606910

my2c


How to make cover page using Libre Office? I'm trying to make a cover page using LibreOffice. But where is the cover option? I can't find it out.

Method 1

You can format the page as the First Page

When it is formatted as the first page, You can add some features.

Format > Page > Organizer>Next Style and select First Page

Method 2

You can edit it on the template called Master Document template.

With master document template, you can create the document as a Book.

So you can have Cover pages, Index pages, Preface pages etc.

You can download the master Document template from libreoffice.org as a .zip file.

You need to extracted .zip file.

Command : unzip [ZIP FILE] -d [DESTINATION FOLDER]

Then you need to open the template .odmfile with Libre Office.

Try this Google search: ... Google Search Listing

Here are a couple of links to try: ... A detailed PDF of how to make cover pages

....................................................................... Short Video on YouTube


How to remove Notes on Kubuntu I've been trying to find a way on how to remove notes on Kubuntu, unfortunately I couldn't.
When I right-click on the icon there's no option to remove the note.

I finally found the answer to this.  Click and hold on the body of the note, and a little vertical bar will appear to the right of the note.  The bar has a red x at the bottom.  Release your mouse, click the x, and good riddance to a really really really annoying app.

If you right-click on your bar, then click on Options and then on Parameters, you'll see another larger bar appear with options to modify the bar. Don't do anything. Just run your mouse over the application you want to close and you'll see a window with a red x in it. Click this and it will close the app.


Gwibber does not respect proxy settings Is there any way to make Gwibber respect the system proxy settings? Right now, if I try setting up a Facebook account from the "Broadcast Accounts..." option, it comes back with an "unable to load page" error.

This is a bug documented in launchpad:

https://bugs.launchpad.net/gwibber/+bug/259830

You can use "All Settings -> Network -> Network Proxy -> Manual" and then after setting the desired proxy, "Apply System Wide". This way all Ubuntu's network traffic including Gwibber's will tunnel through your desired proxy.


Can't install Ubuntu on Asus Rampage Extreme IV I'm having serious problems installing Ubuntu on my Asus Rampage IV Extreme/i7, in fact in any version of Linux at all.

Here are the steps I'm following:

Direct boot Kubuntu 13.10 from DVD - Sometimes installer starts, sometimes not (freeze on Kubuntu logo) - when it starts it installs just fine, after that login screen shows after login freeze while being on "hard drive" icon, however once it started don't know why...
Direct boot Ubuntu 13.10 - freeze and stop reading from CD at install screen (this one with passing dots).
12.04 - same thing in both cases.
Wubi 12.4 from Windows installed just to do it - install on Windows completes fine, after restart: "To show other install options press ESC now" then shows "0" and freezes.
Recommended by manufacturer 11.4 same thing.
OLE/openSUSE/other RedHat based - "waiting for hardware to initialize" or "starting udev..." before installation, then freezes.

Tried with different combinations of BIOS settings/install options like nomodprobe but nothing worked.

Is system incapable of handling any linux ?

EDIT - Specs:

Intel Core i7 4930K

Kingston HyperX DDR3 4x 8GB 1600 MHz CL9 XMP Beast

GeForce with CUDA GT210 Asus 1GB Silent HDMI & DVI (PCI-E) (DDR3)

WD VelociRaptor 500GB WD5000HHTZ (SATA/600,64MB) x2

Lite-ON DVD /-RW iHAS122-04 SATA

I have a bunch of questions/suggestions for clarification for you and others.

What do you mean by freeze? Sometimes linux could appear to be frozen but actually, it could just be a pci issue where no inputs are being accepts.

What part is freezing?

Have you tried USB installation over DVD installation? What are the steps you used to create the DVD(or USB)?

Here is a similar thread. Seems like you have a nVidia GPU, and it seems like your motherboard does not have an onboard display out. The solution mentioned is to use nomodeset when installing/booting to either liveCD or ubuntu itself. Of course this depends on what kind of freezing issues you are having.

Try to minimize possible hardware issues. I see that you have 2 HDD's attached. Disabling RAID may be worth a shot as well. The thread I linked also mentioned that there could be issues with multiple HDDs and noted it was better to isolate the linux installation on one drive though I do not understand the detailed logic behind that. Additionally, validate that your RAM is stable. Seems like there are hard freezing issues when the RAM is faulty. I see that you have 4 sticks. See what happens when you only use one. Note:  Use 64-bit distros. 32-bit has a RAM limit.

I did not see anything about IOMMU settings on this mother but check if you have this. Sometimes keyboard/mouse will not work because of this which may be causing the "freezing". Depending on where it freezes, it may be worth it to try an external mouse/keyboard. Avoid USB 3.0 if possible.

UEFI can also cause complications. Did you boot the installation device in UEFI mode?

I'd suggest adding more details to your post with these questions.

Try some kernel modificators:

lacpi=off
acpi=off
noapic
nolapic
nodmraid
nomodeset

you know what I mean. Play a little with one or some o them.
It worked for me.


My system screen goes black and displays Term Signal Killed? My computer will often just die randomly while I am using it. The screen goes black and sometimes displays the words TERM signal killed along with other things and sometimes it displays nothing. The writing stays on the screen momentarily before it disappears to just black. I then have to hold in the power button to turn it off and then re boot.

Here are the specs... help!

Ubuntu 10.04(lucid)
Kernel Linux 2.6.32-23-generic
GNOME 2.30.2
memory  495.7 MiB
processor Intel(R) Pentium(R) 4CPU 1.80GHz

If it locks up randomly and not associated with a particular process (program you are running) then two thoughts come to mind.  You could have a bit of flaky memory that doesn't always get spotted right away.  The easy way to find out is to run the memory test from the boot cd - I'd let it churn overnight.

The other issue is that it might be heat related.  Any chance your processor fan has stopped?

i think the problem is in your computer screen (i mean the hardware, not software). Be sure to check it up to technician. Btw did you got the same problem when use other OS like windows or something? If yes, then i assure you that's the hardware problem..


Need help in unlocking apt-get gparted Can someone walk me through getting gparted on my computer so that I can install a second hard drive. This is the error I get everytime I write in

$ apt-get install gparted.
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

Like heemayl said, you need so run sudo apt-get install gparted so that you run the apt-get command as root (adding sudo before a command in default ubuntu tells the computer that you want to run the command as root.)

Root in Linux gives you unlimited access to your computer, meaning that you can ruin pretty much anything you want, so use it with care.


Keyboard not responding after waking up from suspend [Ubuntu 18.04] My laptop is Sony Vaio SVE15114FXS. It used to work fine, no problem with networking and keyboard and mouse back to the days of 14.04

But now, with fresh installed 18.04, after waking up from suspend, wired-network is down and the keyboard is not responding. Only the touch pad is still working!

I solve the problem with networking by sudo apt install r8168-dkms. The keyboard remain unresolvable.

dmesg | grep i8042 gave this

[    0.974841] i8042: PNP: PS/2 Controller [PNP0303:PS2K,PNP0f13:PS2M] at 0x60,0x64 irq 1,12
[    0.977550] serio: i8042 KBD port at 0x60,0x64 irq 1
[    0.977554] serio: i8042 AUX port at 0x60,0x64 irq 12
[    0.996742] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input3
[    1.948806] input: SynPS/2 Synaptics TouchPad as /devices/platform/i8042/serio1/input/input5

So I tried all the solutions in which modifying the GRUB such as here and also reinstalled xserver-xorg-input-all. But no solution work!

what could possibly go wrong with my i8042 controller?

Saw the following in another forum:

Issue fixed by uninstalling Xscreensaver

$ sudo apt remove x-screensaver


Ubuntu froze then when restarting failed to load I took pic but too large to send. I’ll try to downscale later. This is what it said:

Running/Scripts/local-premonition.... done
Will now check root file systems .... fsck from util-Linux 2.31.1
[/sbin/fsck.ext4 (1) - - /dev/sda5j fsck.ext4 -a -CO /dev/sda5
/dev/sda5 contains a file system with errors, check forced.
Inodes  that were part of a corrupt orphan linked list found.

/dev/sda5: UNEXPECTED INCONSISTENCY;Run MANUALLY
     (i.e. , without -a or -p options)
fsck exited with status code 4
done
Failure: File system check of the root filesystem failed
The root filesystem on /dev/sda5 requires a manual fsck

I got that by running advanced recover options or whatever instead of general load Ubuntu. I have files on there I cannot lose and cannot even access through special software through my windows partition. I cannot just reinstall Ubuntu and lose those files. Please help ASAP. I have clients from my business with files on there. Never had this problem before

Lets first check your file system for errors.
For 17.10 or older...

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

For 18.04 or newer... (or if the above steps don't work for you)...

boot to a Ubuntu Live DVD/USB
open a terminal window by pressing Ctrl+Alt+T
type sudo fdisk -l
identify the /dev/sdXX device name for your "Linux Filesystem"
type sudo fsck -f /dev/sda5, replacing sdXX with the number you found earlier
repeat the fsck command if there were errors
type reboot

Then backup your important data!

Hold down the Shift key as you reboot, and select Advanced options, boot into single user mode ("Root shell"). Then,

fsck /dev/sda5

This may not repair the disk, or it may. See https://manpages.ubuntu.com/manpages/bionic/en/man8/fsck.8.html

Consider Backup when your system is working again.