Creating and using bare git repositories
Good for writing shared papers in LaTeX!
In the host which you want to keep the bare repo, login and do the following:
Here the host is students server of iit mandi and the group is students.
$ mkdir paper
$ cd paper/
$ git init --bare globalsip.git
$ cd globalsip.git/
$ chgrp -R students .
$ chmod -R g+rwX .
$ find . -type d -exec chmod g+s '{}' +
The above is a one-time init of the bare repo.
In the hosts where you want to keep the working directories, do the following:
git clone ssh://username1@hostname1//path/to/globalsip2016/paper/globalsip.git
You may need to run:
git config core.sharedRepository group
in your working directory.
git clone ssh://username2@hostname2//path/to/globalsip2016/paper/globalsip.git
Then use git as usual!
Source: http://stackoverflow.com/questions/6448242/git-push-error-insufficient-permission-for-adding-an-object-to-repository-datab
Taking screenshots in debian
This is from here: https://wiki.debian.org/ScreenShots
Just open a graphical terminal and type:
sleep 5; xwd -root | convert - capture.png
Mounting Nexus 7 on Debian
Mounting Nexus 7 on Debian
For some reason, the newer Android phones do not use the "usual" USB mass storage. They use something called media transfer protocol or MTP.
Read here:
http://www.legendiary.at/2013/01/27/the-hard-way-make-mtp-work-with-nexus-7-on-debian/
Anyway, to mount your new Android device (Android 4 and higher), you need to install jmptfs, which itself is based on fusermount.
See here:
https://wiki.archlinux.org/index.php/MTP
Do these steps after installing jmptfs.
Create a writeable mountpoint: eg.
mkdir ~/nexus
Connect your device and type:
$ jmtpfs nexus/
Copy stuff or whatever into the mounted device.
To unmount:
$ fusermount -u nexus
Mounting LVM partitions
To mount a device which uses logical volume manager (LVM), do the following:
# pvs
// Get info about physical volumes in the device
# lvdisplay volumeGroup // The volume group obtained from pvs
# vgchange -ay /dev/volumeGroup // Activate the volume
# mount /dev/volumeGroup/logicalVolume /mnt // mount the logical volume
Labels: Debian, LVM
Debian on Dell
Recently, I have had a couple of not-so-great experiences installing Debian on
new computers. The first was a new Dell Inspiron desktop (i5, 4GB, nvidia 1 GB, 1
TB). Recent PCs ship with the new UEFI interface. UEFI is a standard of firmware,
intending to replace BIOS. There are many posts online explaining about UEFI and
its various levels of support within Linux. From what I could make out, support
is somewhat sketchy, and it is possible that one runs into problems.
I always use Debian testing, and I was attempting to install the current testing
distribution (jessie.) I booted into the jessie-netinst-amd64 from a USB stick.
Installation went fine, until the end, when the installer asked about
installing the boot loader into the MBR. I responded 'yes', and the installation
completed as usual. But when I rebooted the machine, grub failed to load, and I
ended up with a broken system. Before starting the installation, the BIOS was in
UFI mode.
Apparently, the boot loader gets written into the USB stick (as mentioned
here.)
I tried a few things, but I could not recover the system (probably, there is a
way to do it, by going into rescue mode.) I made a few attempts, but not with
much success. So finally I had to disable the UEFI boot (and enable legacy
BIOS), boot from a jessie CD-ROM, and reinstall. This worked fine, and finally I
was able to get a working system.
Thus, if you dont mind burning a CD-ROM, disabling the UEFI boot seems to be a
workaround.
The desktop has a nvidia card, and by default the open-source nouveau driver is
installed. Although proprietary nvidia drivers are available, I chose to stay
with nouveau.
Another recent experience was installing jessie on a Dell inspiron laptop (i3, 4
GB, nvidia 1 GB, 500 GB). From my experience with the desktop, I disabled the
UEFI rightaway and booted into jessie from a CD-ROM. I got a weird error stating
that 'kernel modules are not found' in the CD-ROM. Maybe this was a bug in that
days snapshot of the testing ISO image.
So I again burnt a new CD-ROM after a few days, hoping that the daily snapshot
has removed the error. This time, things went better, but not for too long. After the first few steps
of the installation, the installer gave the message 'scanning CD-ROM' and
remained stuck there. I tried a few things, but not with much success.
Installation logs appear in the terminal 4 (ctrl+alt+f4). This said something
about the CD-ROM and apt. I opened another terminal and did a 'ps | grep apt'. I
thought that the apt-cdrom utility was misbehaving for some reason, and so I did
a 'kill -9' of that process.
Luckily the system recovered, and the rest of the installation went well.
There are still a few problems, including the broadcom wireless driver not
working.
Update!
Everything is working now!
First, the broadcom wireless driver. The module for this is 'wl'. This is what I did:
- Change sources.list to include contrib and nonfree.
- apt-get install firmware-brcm80211
- apt-get install broadcom-sta-dkms // This should install the module 'wl'
- After this, check for the module: lsmod | grep wl
- If the module is not loaded, you might need to manually load it: modprobe wl
After this, pretty much things should be straightforward. I use wicd, and this too gave me an irritating problem: the wireless networks were not displayed. Make sure you check in wicd preferences the wireless interface is mentioned. By default, it may not be (it wasnt in my case). So just add 'wlan0' to the wireless interface.
Then wicd displayed the networks, but did not connect (authentication problem.) This might be due to the presence of NetworkManager (depending on if you have a window manager that uses it, like XFCE.) So disable NetworkManager (/etc/init.d/network-manager stop).
Finally, wicd connected! Wireless works!
Skype: I got a weird problem with skype: it made some funny noise. The alternative is to start skype as follows: PULSE_LATENCY_MSEC=30 skype
Thanks to all the discussion forums out there!
Labels: Broadcom, Debian, Debian jessie, Dell Inspiron, skype, UEFI, wicd