March 26, 2013

Remote connections

You know the drill! You need to fix a thing at work, a 5 minute thing, but you box was never setup to handle remote connections properly. So fix it, you know you'll need it in two shakes of a lambs tale!

There's a couple of possibilities,  VNC (slower than smoking death!) ssh, and some that run on the remote desktop protocol like XRDP.

Putty & XMing

If you're a Winer, you'll need putty for ssh'ing and a X server, i use XMing. And you'll need to prepare your box if you run Linuxmint Desktop edition.

# sudo aptitude install openssh-server

Then you'll have to allow your remote machine to connect to your box:

# sudo emacs /etc/ssh/sshd_config 

Remove the # comment sign from: ForwardX11 no. Then change no to yes so it looks like this:









ForwardX11 yes



Save and exit. Next you'll have to add you remote machine name to the xhost by:


#xhost +<your ip or machine.domain>

Next you'll have to check that the .Xauthority file in your home folder is owned by your user (mine wasent?) 

# ls -l ~/.Xauthority




-rw------- 1 user user 181 Mar 25 13:35 .Xauthority


If not you should chown it ro your user:

# sudo chown user ~/.Xauthority

You'll now be able to remote connect to your box from any machine with a running x server. Simply start the XServer on your client machine, login via ssh and run the program. In putty you'll have to forward X11 packages, there's a setting called just that.

VNC 

 To use VNC you'll have to install a VNC server on your box, i.e or X11vnc

# sudo aptitude install tightvncserver 

or

# sudo aptitude install x11vnc

The difference is that tightvncserver will serve a new session. x11vnc will allow access to an existing session. That may be what you'll need if you have a running session on your work box.  If you use x11vnc you might want to set a password.

XRDP

Install XRDP and run the deamon.

#sudo aptitude install xrdp

You connect to it by using the Windows remote desktop connection utility. You'll get a new screen, so this utility can't steal your current x session.

March 21, 2013

Listing aptitude sources

Forgot your repositories? Here's how to list em:

# find /etc/apt -name '*.list' -exec bash -c 'echo -e "\n$1\n"; cat -n "$1"' _ '{}' \;

I <3 find !

March 15, 2013

If mint update fails

It could be an issue with wlan. I have experienced some issues this this setup through a proxy server..

Try quitting mintupdate and issue:

#sudo ifconfig wlan0 down
#sudo apt-get update
Start mintupdate again that should solve the problem.

Spotify

Running on Mint13 out of the box! Follow: https://www.spotify.com/dk/download/previews/

March 04, 2013

Emacs & case

I know it's basic knowledge for all ya emacsers. Nevertheless, I'm always amused when I re-find something I totally forgot! Like today, when I had to convert a buncha constants to uppercase in some action script code. As always emacs have the answer to your problems: Emacs & Casing

Thats M-u & M-l ok?