Tuesday, October 24, 2017

Can't login to Ubuntu 14.04

I installed Ubuntu 14.04 (dual boot with Win 7) and it was working fine. But suddenly one fine day I can't login to my user account, when I log it just flashes and then it goes back to the login screen. But the odd thing is that I can log with the guest account.


I have 2 accounts one owner account/user account and another one created for the installation of Oracle. Only the guest account can login.


From the login screen, I have pressed Ctrl+Alt+F1 to get to a prompt, and login but the same thing happened there too, I entered the correct username and credentials but it flashed and goes back to the login screen.

command line - How can I clear the console window after grep fills the screen?


Is there a way to clear up what is displayed on the shell console (in ubuntu linux) in just a single key or two? When I get flood of lines from grep and that exceeds the height of the window, I want to quickly scroll back to the position where I typed the command after the prompt. I can do so if I had opened a fresh terminal before I type the command, and just go to the initial position. But if keep using the same terminal window, I have to manually find the position. Ctrl+l is not an answer because it just scrolls, and the contents of the terminal remains. I cannot use less because the colored output of grep does not show up.



You can actually stick with using less - try this:


grep --color=always foo * | less -r

That will tell grep to ignore that its output is being piped, and the "-r" on less tells it to pass through raw control characters, which in this case are the color codes.


How to recover the root password on ubuntu server


I lost my root/super user password on Ubuntu server.
I tried to boot in a recovery mode and select option drop to root shell.


But it is always asks for:


Give root password for maintenance (or type Control-D to continue)

and I don't remember it.



Try Control-D when it prompts you for the root password. If that doesn't work, then try this:


http://www.howtogeek.com/howto/linux/reset-your-forgotten-ubuntu-password-in-2-minutes-or-less/


Then scroll down to "Alternate Root Shell Method".


networking - Laptop wireless card help? BCM4311


Okay I have an Acer Aspire 5517, it have bcm 4311 802 wireless card,Ubuntu 12.04.3 LTS


Network controller: Broadcom Corporation BCM4312 802.11b/g LP-PHY (rev 01)


Here is the output of sudo lshw


  *-network
description: Ethernet interface
product: AR8132 Fast Ethernet
vendor: Atheros Communications Inc.
physical id: 0
bus info: pci@0000:08:00.0
logical name: eth0
version: c0
serial: 00:26:22:15:75:4d
size: 100Mbit/s
capacity: 100Mbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress vpd bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=atl1c driverversion=1.0.1.1-NAPI duplex=full ip=192.168.1.101 latency=0 link=yes multicast=yes port=twisted pair speed=100Mbit/s
resources: irq:43 memory:d1000000-d103ffff ioport:2000(size=128)

I tried this Installing Broadcom Wireless Drivers didn't work.
For chili55 I did this


    laptop@laptop-Aspire-5517:~$ lspci
00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] RS780 Host Bridge
00:01.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] RS780/RS880 PCI to PCI bridge (int gfx)
00:04.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] RS780/RS880 PCI to PCI bridge (PCIE port 0)
00:05.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] RS780/RS880 PCI to PCI bridge (PCIE port 1)
00:11.0 SATA controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode]
00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
00:12.1 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0 USB OHCI1 Controller
00:12.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 SMBus Controller (rev 3c)
00:14.1 IDE interface: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 IDE Controller
00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 Azalia (Intel HDA)
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 LPC host controller
00:14.4 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 PCI to PCI Bridge
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] K8 [Athlon64/Opteron] Address Map
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] K8 [Athlon64/Opteron] DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] K8 [Athlon64/Opteron] Miscellaneous Control
01:05.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RS780M [Mobility Radeon HD 3200]
02:00.0 Network controller: Broadcom Corporation BCM4312 802.11b/g LP-PHY (rev 01)
08:00.0 Ethernet controller: Qualcomm Atheros AR8132 Fast Ethernet (rev c0)
$sudo apt-get remove --purge bcmwl-kernel-source
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?


I am assuming, although you have been unable to confirm it, that this command:


lspci -nn

...shows your wireless device as 14e4:4315. If that is not true, please post the result. If it is true, please get a temporary wired ethernet connection and do:


sudo apt-get remove --purge bcmwl-kernel-source

If it is not installed, that's fine, just proceed with the next steps:


sudo apt-get install firmware-b43-lpphy-installer

Reboot and tell us if your wireless is working as expected.


package management - How to correct source-list entry for fetching debs from desired location? (Apt Offline Repository)


I am currently trying to install software offline (studying this question) and want to use Offline Repository according to this answer.


I followed steps like:



  1. put all debs in /var/my-local-repo

  2. sudo bash -c 'dpkg-scanpackages /var/my-local-repo /dev/null > /var/my-local-repo/Packages' (note: dpkg-dev is already installed to perform this action)

  3. set repository as root by echo "deb file:/var/my-local-repo ./" > /etc/apt/sources.list.d/my-local.list and sudo apt-get update


But when I tried to install package, following errors display:


Below is example output from terminal while installing synaptic:


$ sudo apt-get install synaptic
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
docbook-xml libcairo-perl libept1.4.12 libglib-perl libgtk2-perl
libpango-perl librarian0 rarian-compat sgml-data
Suggested packages:
docbook docbook-dsssl docbook-xsl docbook-defguide libfont-freetype-perl
libgtk2-perl-doc perlsgml w3-recs opensp libxml2-utils dwww menu deborphan
tasksel
The following NEW packages will be installed:
docbook-xml libcairo-perl libept1.4.12 libglib-perl libgtk2-perl
libpango-perl librarian0 rarian-compat sgml-data synaptic
0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/3,437 kB of archives.
After this operation, 17.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
WARNING: The following packages cannot be authenticated!
libept1.4.12 sgml-data docbook-xml libcairo-perl libglib-perl libpango-perl
libgtk2-perl synaptic librarian0 rarian-compat
Install these packages without verification? [y/N] Y
Err file:/var/my-local-repo/ ./ libept1.4.12 1.0.12
File not found
Err file:/var/my-local-repo/ ./ sgml-data 2.0.9-1
File not found
Err file:/var/my-local-repo/ ./ docbook-xml 4.5-7.2
File not found
Err file:/var/my-local-repo/ ./ libcairo-perl 1.104-1
File not found
Err file:/var/my-local-repo/ ./ libglib-perl 3:1.304-1
File not found
Err file:/var/my-local-repo/ ./ libpango-perl 1.224-2
File not found
Err file:/var/my-local-repo/ ./ libgtk2-perl 2:1.249-2
File not found
Err file:/var/my-local-repo/ ./ synaptic 0.81.1
File not found
Err file:/var/my-local-repo/ ./ librarian0 0.8.1-5ubuntu1
File not found
Err file:/var/my-local-repo/ ./ rarian-compat 0.8.1-5ubuntu1
File not found
E: Failed to fetch file:/var/my-local-repo//var/my-local-repo/libept1.4.12_1.0.12_i386.deb File not found
E: Failed to fetch file:/var/my-local-repo//var/my-local-repo/sgml-data_2.0.9-1_all.deb File not found
E: Failed to fetch file:/var/my-local-repo//var/my-local-repo/docbook-xml_4.5-7.2_all.deb File not found
E: Failed to fetch file:/var/my-local-repo//var/my-local-repo/libcairo-perl_1.104-1_i386.deb File not found
E: Failed to fetch file:/var/my-local-repo//var/my-local-repo/libglib-perl_3%3a1.304-1_i386.deb File not found
E: Failed to fetch file:/var/my-local-repo//var/my-local-repo/libpango-perl_1.224-2_i386.deb File not found
E: Failed to fetch file:/var/my-local-repo//var/my-local-repo/libgtk2-perl_2%3a1.249-2_i386.deb File not found
E: Failed to fetch file:/var/my-local-repo//var/my-local-repo/synaptic_0.81.1_i386.deb File not found
E: Failed to fetch file:/var/my-local-repo//var/my-local-repo/librarian0_0.8.1-5ubuntu1_i386.deb File not found
E: Failed to fetch file:/var/my-local-repo//var/my-local-repo/rarian-compat_0.8.1-5ubuntu1_i386.deb File not found
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Here we can see that apt tries to fetch debs from /var/my-local-repo//var/my-local-repo/ instead of var/my-local-repo/


And if I move all debs into /var/my-local-repo/var/my-local-repo/ (by creating subdirectories) then after apt works fine and package is installed!
And synaptic working fine.


So, My question is Why Apt fetching debs from wrong location or/and What correction is needed in echo "deb file:/var/my-local-repo ./"?



Found solution/correction myself after 1 to 2 days and correction needed which is working as follows:


Way-1:-


If Packages.gz file is created by following command:


dpkg-scanpackages /var/my-local-repo | gzip > Packages.gz

Then It has all debs location information like follows:



Filename: /var/my-loca-repo/synaptic_0.81.1_i386.deb



Way-2 (recommended):-


If Packages.gz file is created by following command:
(In other words After changing to that directory containing all debs)


dpkg-scanpackages . | gzip > ./Packages.gz

Then It has all debs location information like follows:



Filename: ./synaptic_0.81.1_i386.deb





Now if Packages.gz is create by Way-1 then required correction in repository .list is:


deb file:/// var/my-local-repo/ or deb file:// /var/my-local-repo/


But it is recommended to create Packages.gz by Way-2 then no correction is needed and right repository to be in .list is:


deb file:///var/my-local-repo/ ./ or deb file:/var/my-local-repo/ ./




Earlier I created Packages.gz by Way-1 and set repository for 2nd way that's why apt tries to fetch debs from directory which is not desired.


But Now I understand the reason and used 2nd way for creating Packages.gz by dpkg-scanpackages and final commands are:


For generating Packages.gz:


dpkg-scanpackages . | gzip > ./Packages.gz

For setting repository:


sudo su
echo "deb file:/var/my-local-repo ./" > /etc/apt/sources.list.d/my-local.list
sudo apt-get update

And then package installed successfully as below:


$ sudo apt-get install synaptic
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
docbook-xml libcairo-perl libept1.4.12 libglib-perl libgtk2-perl
libpango-perl librarian0 rarian-compat sgml-data
Suggested packages:
docbook docbook-dsssl docbook-xsl docbook-defguide libfont-freetype-perl
libgtk2-perl-doc perlsgml w3-recs opensp libxml2-utils dwww menu deborphan
tasksel
The following NEW packages will be installed:
docbook-xml libcairo-perl libept1.4.12 libglib-perl libgtk2-perl
libpango-perl librarian0 rarian-compat sgml-data synaptic
0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/3,437 kB of archives.
After this operation, 17.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
WARNING: The following packages cannot be authenticated!
libept1.4.12 sgml-data docbook-xml libcairo-perl libglib-perl libpango-perl
libgtk2-perl synaptic librarian0 rarian-compat
Install these packages without verification? [y/N] Y
Selecting previously unselected package libept1.4.12:i386.
(Reading database ... 174777 files and directories currently installed.)
Preparing to unpack .../libept1.4.12_1.0.12_i386.deb ...
Unpacking libept1.4.12:i386 (1.0.12) ...
Selecting previously unselected package sgml-data.
Preparing to unpack .../sgml-data_2.0.9-1_all.deb ...
Unpacking sgml-data (2.0.9-1) ...
Selecting previously unselected package docbook-xml.
Preparing to unpack .../docbook-xml_4.5-7.2_all.deb ...
Unpacking docbook-xml (4.5-7.2) ...
Selecting previously unselected package libcairo-perl.
Preparing to unpack .../libcairo-perl_1.104-1_i386.deb ...
Unpacking libcairo-perl (1.104-1) ...
Selecting previously unselected package libglib-perl.
Preparing to unpack .../libglib-perl_3%3a1.304-1_i386.deb ...
Unpacking libglib-perl (3:1.304-1) ...
Selecting previously unselected package libpango-perl.
Preparing to unpack .../libpango-perl_1.224-2_i386.deb ...
Unpacking libpango-perl (1.224-2) ...
Selecting previously unselected package libgtk2-perl.
Preparing to unpack .../libgtk2-perl_2%3a1.249-2_i386.deb ...
Unpacking libgtk2-perl (2:1.249-2) ...
Selecting previously unselected package synaptic.
Preparing to unpack .../synaptic_0.81.1_i386.deb ...
Unpacking synaptic (0.81.1) ...
Selecting previously unselected package librarian0.
Preparing to unpack .../librarian0_0.8.1-5ubuntu1_i386.deb ...
Unpacking librarian0 (0.8.1-5ubuntu1) ...
Selecting previously unselected package rarian-compat.
Preparing to unpack .../rarian-compat_0.8.1-5ubuntu1_i386.deb ...
Unpacking rarian-compat (0.8.1-5ubuntu1) ...
Processing triggers for sgml-base (1.26+nmu4ubuntu1) ...
Processing triggers for man-db (2.6.7.1-1) ...
Processing triggers for gnome-menus (3.10.1-0ubuntu2) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu1) ...
Processing triggers for bamfdaemon (0.5.1+14.04.20140409-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.54ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.13-1) ...
Processing triggers for doc-base (0.10.5) ...
Scrollkeeper was installed, forcing re-registration of all documents.
Unregistering 33 doc-base files, re-registering 33 doc-base files...
Registering documents with scrollkeeper...
Setting up libept1.4.12:i386 (1.0.12) ...
Setting up sgml-data (2.0.9-1) ...
Setting up libcairo-perl (1.104-1) ...
Setting up libglib-perl (3:1.304-1) ...
Setting up libpango-perl (1.224-2) ...
Setting up libgtk2-perl (2:1.249-2) ...
Setting up synaptic (0.81.1) ...
Setting up librarian0 (0.8.1-5ubuntu1) ...
Processing triggers for sgml-base (1.26+nmu4ubuntu1) ...
Setting up docbook-xml (4.5-7.2) ...
Processing triggers for sgml-base (1.26+nmu4ubuntu1) ...
Setting up rarian-compat (0.8.1-5ubuntu1) ...
Processing triggers for libc-bin (2.19-0ubuntu6) ...

macbook - How to make users with UID under 1000 appear in LightDM?




I've been trying to set this up, but I can't find a solution. It's neccessary, because the machine Ubuntu is on is a Macbook and needs to have access to the files of the Mac user. Is there any way to get this to work?



Lightdm has the config file /etc/lightdm/users.conf which you can edit to set a minimum UID. The default is 500. It also sets hidden users and certain shells that if a user has are hidden. Try editing that file and restarting lightdm.



[UserAccounts]
minimum-uid=500
hidden-users=nobody nobody4 noaccess
hidden-shells=/bin/false /usr/sbin/nologin


Monday, October 23, 2017

Installing WinUSB on Ubuntu 14.04

I am unable to install WinUSB in Ubuntu 14.04 using command:


sudo apt-get install winusb


What is the correct way to install WinUSB in Ubuntu 14.04? Or is there any other application available to create Windows bootable USB in Ubuntu 14.04?

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...