Z-A 2017

Z to A Troubleshoots and Tips   2017——-

https://paperswithcode.com/area/computer-vision

 

 

Upgrade issue with libreoffice

 

 

These errors often arise due to bad profile configuration. Rename the profile folder using the following cmd:

 cd ~/.config && mv libreoffice libreoffice.old

New profile is generated automatically…

 

 

Broken Package Solution

 

  • Make sure that your PPA is set up.
  • Remove the broken package via the following command:
    sudo dpkg --remove --force-remove-reinstreq <pkg>
    
  • Install the package again:
    sudo apt-get install <pkg>
    

 

 

 

 

I’ve installed ubuntu-desktop on Ubuntu 16.04 Gnome and I picked lightdm and now once I restart, I get this error message when I press CTRL + ALT + F2:

A start job is running for Hold until boot process finishes up (Xmin Xs/no limit)

This goes on for 20 minutes+. What do I do to fix this problem or even troubleshoot?

You can fix this in following way, it worked for me. FYI : I had upgraded from 14.04 to 16.04.

Go in your safe mode by hitting SHIFT key or ESC. select networking , then drop to root prompt. Then run following commands.

sudo apt-get remove plymouth
sudo apt-get remove xserver-xorg-video-intel

Now, reboot,

When you reboot, still you may get black or purple screen,

Press Ctrl+Alt+F1 and login with your username and password.

Then run following commands.

GDM ie Gnome display manager was also causing problems for me, so following step was essential for me

I switched to lightdm from gdm3 as display manager.

sudo apt-get install lightdm
sudo dpkg-reconfigure lightdm

When you are prompted, select default display manager as lightdm

Now I was back with desktop , without dash or unity but only icons and wallpaper. now run this.

sudo apt-get install ubuntu-desktop

Now, reboot after this.

The desktop is back!

now, you can install intel graphic drivers again,

sudo apt-get install xserver-xorg-video-intel

Reboot now. Its done!

Reference : http://askubuntu.com/questions/760825/cannot-boot-system-due-to-start-job-running-for-hold

___________

 

Greetings,
pl visit the  link , https://usesthis.com/interviews/richard.stallman
and (RMS) currently using Trisquel GNU/Linux – Run free! ,
How I do my computing by rms ;
https://stallman.org/stallman-computing.html
https://trisquel.info/

Happy gnu year

https://help.ubuntu.com/community

 Topic 1 :    Ns2 and Ns3 Installation

ns2 installation (on rhel5/CentOS5):     Courtesy : Vipin Gupta
step 1: download the latest version of ns2 simulator. one possible download link is
step 2: copy the “ns-allinone-2.35.tar.gz” into “/usr/src/” dir.
step 3: install the “dependencies” packages using “yum” command as shown.
# yum install tk* *tcl* autoconf automake gcc* libX* *c++* libXmu*
step 4: go to “/usr/src/” dir & “extract” contents from “ns-allinone-2.35.tar.gz” file with “tar” command.
# cd /usr/src/
# tar xvfz ns-allinone-2.35.tar.gz
step 5: on extraction, one dir “ns-allinone-2.35” will get created under “/usr/src/”. go to this dir & run
“./install” command. it may take 5-10 minutes for installation depending upon your system configuration.
step 6: create one file “ns2.sh” in “/etc/profile.d/” dir with contents as shown. or download it from
following site “http://linuxexpert.in”. the contents of file can be viewed by using “tail” or “cat” command.
if you have downloaded the “ns2.sh” file from above site. copy that file into “/etc/profile.d/” dir as shown.
in our case we downloaded the file into “usb” device. & then copied it to “/etc/profile.d/” dir by first
mounting “usb” device & then copying the file.
“umount” device & run the command
# source /etc/profile.d/ns2.sh

before running the above command, change the permissions of the file “ns2.sh”.
# chmod 755 /etc/profile.d/ns2.sh
(just remember, we are performing all actions as user “root”)
now you can test the “ns2” simulator as shown. you should be in “GUI” mode to test the simulator.
as can be seen, it is running perfectly

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

 

ns3 on Ubuntu  :  Courtesy   Dr Gaurav Kumar

 

Open a terminal and run the following commands to install the list of required packages (you may not need all the packages):

sudo apt-get install gcc g++ python              
sudo apt-get install gcc g++ python python-dev
sudo apt-get install mercurial
sudo apt-get install bzr
sudo apt-get install gdb valgrind 
sudo apt-get install gsl-bin libgsl0-dev libgsl0ldbl
sudo apt-get install flex bison libfl-dev
sudo apt-get install g++-3.4 gcc-3.4
sudo apt-get install tcpdump
sudo apt-get install sqlite sqlite3 libsqlite3-dev
sudo apt-get install libxml2 libxml2-dev
sudo apt-get install libgtk2.0-0 libgtk2.0-dev
sudo apt-get install vtun lxc
sudo apt-get install uncrustify
sudo apt-get install doxygen graphviz imagemagick sudo apt-get install texlive texlive-extra-utils texlive-latex-extra
sudo apt-get install python-sphinx dia
sudo apt-get install python-pygraphviz python-kiwi python-pygoocanvas libgoocanvas-dev
sudo apt-get install libboost-signals-dev libboost-filesystem-dev
sudo apt-get install openmpi*
 

You can either download and build development version or get a tarball directly and untar it.  I would recommend you to choose the second option initially.

Option 1: Using Mercurial

cd
mkdir repos
cd repos
hg clone http://code.nsnam.org/ns-3-allinone

Option 2: Downloading NS-3 using a tarball

cd
mkdir tarballs
cd tarballs wget
http://www.nsnam.org/release/ns-allinone-3.13.tar.bz2
tar xjf ns-allinone-3.13.tar.bz2
 
 

To build your NS-3, run the following command:

./build.py

Configuration with Waf:

./waf distclean
./waf configure    // (or use this > ./waf configure –enable-examples –enable-tests)
./waf build

Now, test your installation using:

./test.py   // or use this ( if you want to test core modules only) > ./test.py -c core
 

Get ready to run your  program. You need waf (a python based framework designed for configuring, compiling and installing applications). Use the following command to run your program:

./waf – -run filename

Your program must be in /scratch directory, because when you run waf they are build at the same time. For example, I am copying a myfirst.cc from a example directory to scratch directory to run the program. Go to your ns directory and run the command to copy, configure and run:

 
cp examples/tutorial/first.cc scratch/myfirst.cc
./waf
./waf –run scratch/myfirst

If you do everything correctly, you should be able to see the following in your command line.

Waf: Entering directory ‘/home/user/repos/ns-3-allinone/ns-3-dev/build’
Waf: Leaving directory ‘/home/userrepos/ns-3-allinone/ns-3-dev/build’
’build’ finished successfully (1.175s)
Sent 1024 bytes to 10.1.1.2
Received 1024 bytes from 10.1.1.1
Received 1024 bytes from 10.1.1.2

If you have something to visualize run the command : ./waf –run scratch/your_program –visualize, and to plot your output

use: ./waf –run scratch/your_program | gnuplot

Install NS2 (ns-allinone-2.35) on Ubuntu 14.04

[Step 1]

Before install NS2, you have to install some essential softwares:

sudo apt-get install tcl8.5-dev tk8.5-dev
sudo apt-get install build-essential autoconf automake
sudo apt-get install perl xgraph libxt-dev libx11-dev libxmu-dev

[Step 2]

Download NS2 source file from from ns2 site.
Then you will get a file named “ns-allinone-2.35.tar.gz“

[Step 3]

Unpack ns-allinone-2.35.tar.gz to your home directory. (/home/kumargaurav is my home directory, you SHOULD change it to your own!)

tar -zxvf ns-allinone-2.35.tar.gz -C /home/kumargaurav

[Step 4]

Install NS2:

cd /home/kumargaurav/ns-allinone-2.35
sudo ./install

————————At the End it will show like this——————–
Please put /home/kumargaurav/ns-allinone-2.35/bin:/home/kumargaurav/ns-allinone-2.35/tcl8.5.10/unix:/home/kumargaurav/ns-allinone-2.35/tk8.5.10/unix
into your PATH environment; so that you’ll be able to run itm/tclsh/wish/xgraph.

IMPORTANT NOTICES:

(1) You MUST put /home/kumargaurav/ns-allinone-2.35/otcl-1.14, /home/kumargaurav/ns-allinone-2.35/lib,
into your LD_LIBRARY_PATH environment variable.
If it complains about X libraries, add path to your X libraries
into LD_LIBRARY_PATH.
If you are using csh, you can set it like:
setenv LD_LIBRARY_PATH <paths>
If you are using sh, you can set it like:
export LD_LIBRARY_PATH=<paths>

(2) You MUST put /home/kumargaurav/ns-allinone-2.35/tcl8.5.10/library into your TCL_LIBRARY environmental
variable. Otherwise ns/nam will complain during startup.
—————————————————————————————–

[Step 5]

5.1) Modify .bahrc

vi /home/kumargaurav/.bashrc
5.2) Go to the last line and add the scripts below:
export PATH=$PATH:/home/stan/ns-allinone-2.35/bin:/home/kumargaurav/ns-allinone-2.35/tcl8.5.10/unix:/home/kumargaurav/ns-allinone-2.35/tk8.5.10/unix
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/kumargaurav/ns-allinone-2.35/otcl-1.14:/home/kumargaurav/ns-allinone-2.35/lib
export TCL_LIBRARY=$TCL_LIBRARY:/home/kumargaurav/ns-allinone-2.35/tcl8.5.10/library
6.3) Enable the path setting:
#======================
# Part III: Verifying
#======================

1.1 After these steps, you can now run the ns validation suite with
cd ns-2.35; ./validate

For trouble shooting, please first read ns problems page
http://www.isi.edu/nsnam/ns/ns-problems.html. Also search the ns mailing list archive
for related posts.

—————————————–
It shows like this
—————————————
INITIALIZE THE LIST xListHead
Loading connection pattern…
Loading scenario file…
Load complete…
Starting Simulation…
channel.cc:sendUp – Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 550.0
SORTING LISTS …DONE!
NS EXITING…
finishing..
Test output agrees with reference output
All test output agrees with reference output.
Wed Sep 5 22:10:33 IST 2012
These messages are NOT errors and can be ignored:
warning: using backward compatibility mode
This test is not implemented in backward compatibility mode
validate overall report: some tests failed:
./test-all-newreno ./test-all-tcpOptions ./test-all-tcpVariants ./test-all-aimd ./test-all-frto ./test-all-quickstart ./test-all-manual-routing ./test-all-links
to re-run a specific test, cd tcl/test; ./test-all-TEST-NAME
_________________________________________________________________

append in .bashrc

# LD_LIBRARY_PATH

OTCL_LIB=/home/kumargaurav/ns-allinone-2.35/otcl-1.14

NS2_LIB=/home/kumargaurav/ns-allinone-2.35/lib

X11_LIB=/usr/X11R6/lib

USR_LOCAL_LIB=/usr/local/lib

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB

# TCL_LIBRARY

TCL_LIB=/home/kumargaurav/ns-allinone-2.35/tcl8.5.10/library

USR_LIB=/usr/lib

export TCL_LIBRARY=$TCL_LIB:$USR_LIB

# PATH

XGRAPH=/home/kumargaurav/ns-allinone-2.35/bin:/home/kumargaurav/ns-allinone-2.35/tcl8.5.10/unix:/home/kumargaurav/ns-allinone-2.35/tk8.5.10/unix

NS=/home/kumargaurav/ns-allinone-2.35/ns-2.35/

NAM=/home/kumargaurav/ns-allinone-2.35/nam-1.15/

PATH=$PATH:$XGRAPH:$NS:$NAM

 

 

__________________

 

 

USB HP Printers

$ sudo -s
cd ~/Downloads/
chmod +x hplip-3.14.10.run
./hplip-3.14.10.run
$  hp-setup
or   apt-get install hplib
sudo -s
hp-setup

 

_______________

 

Own cloud and php

 

$ apt-get install php5-gd

 

_____________________

sudo apt-get install simplescreenrecorder-lib:i386

xhost +local:
su – user
thunderbird

http://www.getdeb.ne

http://www.pictriev.com/  face search engine

 

________________

Restore accidentally removed Packages

echo '#!/bin/bash' > restore
echo sudo apt-get install `grep Remove /var/log/apt/history.log | tail -1 | sed -e 's|Remove: ||g' -e 's|([^)]*)||g' -e 's|:[^ ]* ||g' -e 's|,||g'` >> restore
chmod +x restore 
./restore

_____________________________

Ubuntu Help

 

https://help.ubuntu.com/community

 

________________

Data Recovery Script

 

http://paste.ubuntu.com/10625643/

 

_____________________________

 

To use any DataCards on Ubuntu for Internet
$ sudo apt-get install wvdial

i) run these a) lsusb b) modprobe c)wvdial

ii) modprobe usbserial vendor =0x0eab product =0x9357
(check— $ lsusb for it)

iii) open editor for the file /etc/wvdial.conf and enter the following line save and cheers…

[Dialer Defaults]
Init1 = ATZ
Init2 = ATE0V1
Stupid Mode = Yes
Modem Type = Analog Modem
Baud = 115200
New PPPD = yes
Modem = /dev/ttyUSB0
ISDN = 0
Phone = “#777″ // this is for dialing e.g for reliance
Password =
Username =

* To avoid modprobe everytime system boots write a simple script i.e on a simple text file and save it by any name say internet , make it executable by chmod +x internet and save this file in /usr/bin or in /bin after that just run internet ( it will work like custom command) enjoy….
#! /bin/bash
echo pwd | sudo -S modprobe usbserial vendor =0x0eab product = 0x9357
echo pwd | sudo -S wvdial

// where pwd is your sudo password

___________________________________________________________________
3) For drivers -: Run $ jockey-gtk

_______________________________________

4) Update or Migrate Ubunu from old version to new version , issue of the multiple softwares installed need to install again here is the tip from ubuntu forum

1) dpkg –get-selections > ~/my-packages

2) sudo dpkg –set-selections < ~/my-packages && sudo apt-get dselect-upgrade

* It will install all the packages from repository and not which were installed manually
Also do sudo cp /etc/apt/sources.list ~/sources.list.backup

 

___________________

 

Recover GRUB BOOT Loader after installing Windows

Follow the easy steps to recover the grub boot loader after reinstalling Windows OS. Boot the PC from Live LINUX CD and issue the following commands on the console and get the grub loader back.

sudo grub

find /boot/grub/stage1

root ( HD0,1)

change the values 0,1 according to you disk layout and the partition where Linux is installed.

setup (hd0)

quit

Reboot the machine and the grub loader is installed.:)

Setup LTSP – Remote Boot  PXE Enabled Thin Clients of PXE enabled PC/Laptops

We would first install the Required applications step by step and then configure them later.

  • 1.Install the Regular Ubuntu Desktop Distro, I am using ubuntu 9.04 for this howto.
  • 2.Once Installed, update the distro and install all the necessary updates.
  • 3.Once Done Install NFS kernel Server via this Command : sudo apt-get install nfs-kernel-server
  • 4.Install the DHCP SERVER on the same machine,make sure there is only one dhcp server running on the network else.it will cause a conflict.
  • 5.Set a static ip to the machine via /etc/network/interfaces file – i am using 192.168.0.1 as SERVER ip for this HOWTO.
  • 6.Now install the server module for LTSP running this command on terminal : – sudo apt-get install ltsp-server-standalone openssh-server ( this would install the LTSP Server and the openssh on the desktop.
  • 7.Now Create your Thin Client environment on the server with this command: sudo ltsp-build-client

The First command installs the LTSP SERVER and the Second command installs the module that  will provide/create  the environment  to run the remote disk less machines. ( Please be patient, the client module takes time to install as it fetches about 150 MB of files from the repos. )

Once the client installation is done run these 2 commands to create the ssh keys

sudo ltsp-update-sshkeys

sudo ltsp-update-image

Be sure to do it in that order.

We are now done with the installation. now comes the configuration part.

  • Open the /etc/default/tftpd-hpa and edit first line Run_Daemon to “Yes” in place of NO.Save and Exit.
  • Now Open the /etc/ltsp/dhcpd.conf and change some values to the file as below.
  • uncomment value next-server and put the server ip infromt of it ( next-server 192.168.0.1; )
  • add these two values below that :
  • allow booting;
  • allow bootp;
  • now go to the last line of the dhcpd.conf and it has a default value : filename (  “/ltsp/i386/nbi.img”;  )   change that to (  filename “pxelinux.0”;  )
  • Once done save and exit and restart the  dhcp server /etc/init.d/dhcp3-server restart
  • Once done now u can just Boot the diskless workstations and it should aautomatically find the  dhcp server get an IP address and load the Remote OS. and Login.

Hope the above step by step helps you to get the LTSP up and running in less than an Hours’s time.

Setup NIS – Server & Client

Recently got a project to teach students to setup NIS SERVER,there seems to be lotsa of information about setting up NIS Client and Server but no where do u find the exact step by step way to do it.  Everyone Seems to be doing the Hit and Trial Methods,Below I  have just  mentioned the steps to setup an NIS SERVER and Client in less than 30 mins doing exactly as mentioned step by step. I had used debian Ubuntu for the SERVER setup and Centos 5.4 for the Client. Configurations Mentioned here work the same for any Distro.

NIS SERVER :

  1. Install Portman Daemon.
  2. Install NIS Server.
  3. At the time of Installation Of NIS it will ask for the NISDOMAIN,enter ur hostname as the default NISDomain ( Eg.NISDOMAIN=HOMESERVER ).
  4. Edit /etc/default/nis and set NISSERVER=TRUE & comment NISCLIENT=true.
  5. Initialize the NIS files using the following command = /usr/lib/yp/ypinit -m.
  6. Once this is complete you can run /etc/init.d/nis start with no errors.
  7. Run  this command every time new user is added or removed to add to NIS db “make -C /var/yp”.
  8. Export the /home Dir of the NIS Server via NFS so it can be mapped on the client machines and they can use the same to login and store their data.

NIS CLIENT

  1. On the client, you need the yp-tools package, which depends on the ypbind package.
  2. First you must setup the NIS Domain Name,edit the /etc/yp.conf file, and point it to the appropriate server and domain name. Remember that the domain name must be the same that you set for the server. For example, add the following line: domain HOMESERVER server 192.168.1.100
  3. Start the NIS client service by entering:  /etc/init.d/ypbind start.
  4. Map the Exported /home folder of the NIS SERVER to the local Client Machine into /home folder only.Rename the Existing /home folder on the client machines to /home.old,Remove all local Accounts from the client machines except root, so that only NIS Accounts work.
  5. Once this process is done the accounts and personalized settings stored on the server are visible and available on any client machine and user can login by sitting on any of the clients retaining all his Files / Emails / Data / Bookmarks and Even Personalized UI settings…. .
  6. Test the NIS SERVER by running ssh on the  local workstation and  login via telnet or ssh to the workstation using the user/password from the nis server password list..

Bingo that is all and u are ready to rock with NIS.

Remember the user/pass in  NIS are sent in clear text format over the network and they are not encrypted…..

 

References linux expert wordpress

 

 

 

 

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: