LaTex: file ended while scanning use of @writefile
This error is typically seen a lot while compiling latex. This can be eliminated by deleting all .aux files and recompiling the latex code. Recompilation should begin by running “Latex” before
any other tool, this helps re-generation of the .aux files.
setup folder sharing between macbook pro(host) and ubuntu 9.10(guest) using VirtualBox
Actually, it’s quite simple by following the steps below:
Step 1: On your host OS, macbook pro in my case, go to VirtualBox->machine->settings->Shared Folders, add the folder, say folder1, you want to share with your guest OS.
Step 2: On ubuntu 9.10, create a new folder, with name, say folder2, then edit your /etc/fstab file, add the following line
folder1 ~/folder2 vboxsf rw,gid=1000,uid=1000,auto 0 0
Then reboot your guest OS, then you will see folder1 is automatically mounted.
Note, the names of two folders must be different.
Password-less login on Ubuntu 9.10 (Karmic Koala)
From http://www.danellis.co.uk/drupal/node/7
I post the article here just in case that link won’t work any more in the future
——————————————————————————————————————————
I was looking to enable password-less login on Ubuntu Karmic for my children, so that they could just click their face from the username list to login. I eventually found how to do this on a very old thread on the Ubuntu forums.
In Karmic I noticed an option within Users and Groups “Don’t ask for password on login”, but the option was greyed out. Someone commented on this in bug 396459 on launchpad and mentions adding a group named “nopasswdlogin”. I tried this, and although it did allow me to select the option, the login window (known as GDM) still prompted for a password.
I then came across an old thread from 2005 on Ubuntu Forums, “GDM logging on locally without entering password?”, which I tried and amazingly it still worked. The only difference now is that in Karmic the location of the GDM config file has changed from /etc/X11/gdm to just /etc/gdm.
So here is how my /etc/pam.d/gdm looks, with the lines I added in bold:
#%PAM-1.0
auth requisite pam_nologin.so
auth required pam_env.so readenv=1
auth required pam_env.so readenv=1 envfile=/etc/default/locale
# the line below has been added specifically to allow selected users to log in via GDM without a password
# start
auth sufficient pam_listfile.so item=user sense=allow file=/etc/gdm/nopassusers.txt onerr=fail
# end
@include common-auth
auth optional pam_gnome_keyring.so
@include common-account
session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so close
session required pam_limits.so
@include common-session
session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so open
session optional pam_gnome_keyring.so auto_start
@include common-password
And this is my /etc/gdm/nopassusers.txt:-
joseph
oliver
I then rebooted and my children could login with just one click.
VirtualBox resolution problem when installing ubuntu on Macbook Pro
I installed VirtualBox on my macbook pro, and I still want to use ubuntu sometimes. Everything went well when installing VirtualBox and later ubuntu in VirtualBox. Then the problem comes. The resolution of ubuntu cannot exceed 800×600. After doing some research by googling, the following is the final solution.
Note: I first tried ubuntu 10.10 rc. But it seems to be too new to VirtualBox, and it fails on step 1. So I went back to ubuntu 9.10.
before here, I assume that ubuntu has been installed in VirtualBox.
Step 1: Install VirtualBox additions, which comes along with your VirtualBox already. So you don’t need to download separately. The procedure is very simple. Just boot into your guest. Then, in the VirtualBox menu, under Devices, click Install Guest Additions. This will mount the VirtualBox Guest Additions ISO (included with the program) as a CD-ROM drive inside the virtual machine. You can find the mounted ISO at /media/cdrom for ubuntu 9.10. Cd that directory, and execute the following
sudo sh ./<script-relevant-for-your-architecture>
after successfully install that, you need to reboot your guest ubuntu
Step 2 Modify your xorg.conf file. cd into the directory, /etc/X11. If xorg.conf is not there, execute
touch xorg.conf
and fille it using your favorite editor with
Section “Device”
Identifier “Configured Video Device”
Driver “vboxvideo”
EndSection
Section “Monitor”
Identifier “Configured Monitor”
EndSection
Section “Screen”
Identifier “Default Screen”
Monitor “Generic Monitor”
Device “VirtualBox graphics card”
DefaultDepth 24
SubSection “Display”
Depth 24
Modes “1280×800” “800×600” “640×480”
EndSubSection
EndSection
For the modes part, you may change them into the resolution of your own display.
After that, reboot your guest ubuntu again, and you should be able to use the right resolution.
Note: An error “environment block too small” may pop up when restarting, and this is a weird bug. The following procedure resolved my problem
That’s it. Enjoy~
GNU Emacs: Transient mark mode (active selection)
Many developers use GNU Emacs, but they are often annoyed when they press C-SPC (Ctrl + Space) to start selecting a region and then when they go somewhere else in the file, they execute some command on the thing which should be the currently selected region. And also often it turns out the result is not as expected. To have some knowledge what you do wrong (or to keep yourself informed in a visual manner) you could enable “Transient Mark Mode” in GNU Emacs by clicking “Options” and then “Transient mark mode”; now, when you press C-SPC (Ctrl + Space) and you move the cursor, you will see a selection growing or shrinking as you move the cursor. Basically, if you press C-g (“Quit”) no region marking will be done until you press C-SPC again. Also, any change in the current file will discard the selection. If you want to be advanced on this, see here:
http://www.delorie.com/gnu/docs/emacs/emacs_54.html
As far as I know, this is pretty well supported option in many versions/variants of GNU Emacs.
You could also do it in the non-clickable way, if you like this (like me). Just put in your “.emacs” file (wherever it is, you should know) this:
(custom-set-variables
'(transient-mark-mode t))
And done.
new blog site @ wordpress
previous posts can be found at blogger