How to resume another user's screen session

It's so easy yet it took me quite a while to 'google' it out.

The problem: Being root you would like to resume another user's screen session. Let the user be A.

You 'become' him by
su A -
Then you would like to
screen -r
but unfortunately this gives you an error:
Cannot open your terminal '/dev/pts/0' - please check.
or something similar. The simple cause is that user A does not have the right to write into your (root's) terminal. This can be fixed by chmod'ing the above displayed file. For example:
chmod a+rwx /dev/pts/0
Do it as root and be aware that this is a severe security risk!


How to change subversion mime-type

When you have e.g. an html file inside your repository and you want it to be displayed in your browers correctly, i.e. as html and not as plain text, this is what you need to do:

One needs to properly set the mime-type to "text/html".

Checkout the repository and do the following:
svn propedit svn:mime-type yourfile.html --editor-cmd vi
Here, vi is used as the editor.
enter "text/html", save and exit (:wq for vi)
Check if mime-type was changed
svn -R proplist
svn commit


How to install Sun Java on Debian

First download Sun Java J2SE Development Kit from http://java.sun.com/
Filename should be something like jdk-1_5_0_07-linux-i586.bin
Short version:
apt-get install java-package
fakeroot make-jpkg .bin
dpkg -i .deb
Source: http://www.crazysquirrel.com/computing/debian/java.jspx


This page is powered by Blogger. Isn't yours?