Archive Page 2

Securely remote control your Ubuntu via putty from a windows host (VNC+SSH)

Last time I had the following situation: I wanted to remote connect to my workstation from another workstation like in the following image:
SSH Linux Tunnel via Putty
My current workstation is the left one (I will call it “workstation“) and I want to connect to the computer on the right (”server“). The workstation is running Windows XP, the server is running on Ubuntu Feisty.

  1. Setup Server(SSH+VNC): You have to install SSH and activate the VNC-Server, to be able to securely connect to your server.
    1. Install SSH: Just install the SSH server by entering the following in bash:
      sudo apt-get install ssh
    2. Screenshot Remote Desktop Preferences Screenshot Remote Desktop MenuEnable VNC: VNC is already installed on yor Ubuntu system, so you only have to enable it. Navigate to System -> Preferences -> Remote Desktop. Now you should activate “Allow other users to view my desktop“, “Allow other users to control my desktop“, and for security purpose “Require the user to enter this password” and provide a secure password. Then click the Close-button. Now your VNC-server should be ready to use.
  2. Setup Rooter (SSH Forwarding). If your server is directly connected to the internet (modem) you can skip this step. On my SMC-router this feature is called virtual server. You have to forward the SSH-port (22) to the IP address of your server. (here: 192.168.123.2)
  3. Download and Install Putty: If you search Google for putty, the first result will be a download page, where you should download eighter the windows installer (putty-0.60-installer.exe) or the single putty program (putty.exe) . (I placed the single file into %windir%\system32 for fast access per Start -> Run.)
  4. Start Putty and set it up:
    1. Start putty.exe (e.g. if you put it in system32 per Start -> Run putty.exe
    2. Putty Step1Enter the hostname, you want to connect to on the first startpage “Session“. Here this is the router. You have to enter the external IP (in concreto: 80.80.205.145). If your “server” is directly connected to the internet you have to enter the external IP of your server. (This is the case if you have only a single PC and this PC is directly connected to the modem of your provider.
    3. Putty Step2Setup a tunnel by going to “Connection -> SSH -> Tunnels“. Here you enter as source port 5900 (the default VNC-Port which is used by Ubuntu if you installed it like me). As Destination you enter the internal server-ip with the VNC-Port (in concreto: 192.168.123.2:5900) and Click Add. Make sur, that you use the internal IP of your server not e.g. an IP-Adress of your router. (I made this mistake and wondered why nothing happend ;-) )
    4. Putty Step3Save your session and connect, so you can recall it later quickly by going back to “Session”. Type a meaningful name for your session below the “Saved Session” label and click “Save“. Now you can restore your session always by selecting it and click “Load“. Now you can click “Open” to connect to your server.
  5. Connect to your workstation: Now you will get a window where your username and password will be asked. Enter you login credentials to connect to your server and establish a SSH-tunnel.
  6. Connect to your server using VNC:
    1. Download and install VNC. There are lots of free VNC apps for windows out there e.g. UltraVNC or TightVNC. Note that you only need the viewer.
    2. Start the vncviewer and connect to localhost (127.0.0.1) and enter your password which you provided in step 1.2.
    3. Now you should be connected to your home server :)

How to read the Comments in a pdf with acroread (not evince)

Comment You know the picture on the left? You have a pdf-document with comments? You hover over it with evince and what happens? Nothing! I searched for information about how I can read the comment in the pdf with the default viewer evince.

Image Hosted by ImageShack.us I found nothing so I thought maybe acroread can do this. This is the Adobe Acrobat Reader for Linux. This worked :)

  1. Get acroread per sudo apt-get install acroread.
  2. Open your pdf: acroread /path/to/your/file.pdf.
  3. Hover over the comment.

It’s a pity that evince does not support comments. For me the goal

to replace the multiple document viewers that exist on the GNOME Desktop with a single simple application

is not yet achieved. (Printing multiple pages on one A4 sheet does not work too).

HowTo Rename a XFS-Filesystem (label it)

Yesterday I bought a new 500GB harddisk :) It was formatted with NTFS but I wanted a linux-filesystem. I thought I should give XFS s shot because ext3 is working for me now.

I formatted the disk with the GParted LiveCD but you can also do it with gparted installed in Ubuntu (use apt-get install gparted to get it.) To format the the device simply choose the correct harddrive on the left top and then right click the partition and choose Format to > xfs.

I wanted to name it “media” because of its future content. So I tried the “Set Disklabel” Function but this seems to be for anything other than a Disk Label. In Windows it was rather easy to change the name of a disk per F2 but in Ubuntu *ouch*.

After some searching I found a Guide for renaming USB Drives. And you know what xfs was missing :’( Maybe nobody has an USB Drive formatted with xfs but what about a normal harddisk?

So I continued searching and found a tool collection named xfsprogs. I apt-get it and than wrote xfs in the bash and pressed <TAB> to list the tools.

guru@guru-desktop:~$ xfs
xfs_admin    xfs_copy      xfs_growfs    xfs_logprint  xfs_quota
fs_bmap      xfs_db        xfs_info      xfs_mkfile    xfs_repair
fs_check     xfs_freeze    xfs_io        xfs_ncheck    xfs_rtcp

xfs_admin sounded nice so I read its man page. Here my full proceeding: (Note: Change sdb1 to your disk)

  1. Get xfstools with sudo apt-get install xfsprogs
  2. Unmount the device if it is mounted (sudo umount /dev/sdb1)
  3. Label it with xfs_admin -L media /dev/sdb1
  4. Mount it.
  5. If you formatted it you may have no access to your drive. I solved it by changing the owner to my user instead of root. I do not know if this is the best way, but it worked for me ;-)
    sudo chown guru:guru /media/media

Thats it. It would be so easy if it where in the context menu of sdb1 or so.

For other filesystems see: https://help.ubuntu.com/community/RenameUSBDrive

How to get this fancy Ubuntustudio-theme in Ubuntu Feisty

Free Image Hosting at www.ImageShack.us You sure hear of Ubuntustudio which was released recently. “A multimedia creation flavor of Ubuntu. Ubuntu Studio is aimed at the GNU/Linux audio, video and graphic enthusiast as well as professional.” Maybe you have seen the nice theme too (like the screenshot on the right)

I will show you now how you can get this theme on your ordinary Ubuntu Feisty.

  1. Add the ubuntustudio repository to you sources.list and download the key and update:
    sudo su -c 'echo deb http://archive.ubuntustudio.org/ubuntustudio feisty main >> /etc/apt/sources.list'
    wget -q http://archive.ubuntustudio.org/ubuntustudio.gpg -O- | sudo apt-key add - && sudo apt-get update
  2. Then install the packages as follows:
    sudo apt-get install ubuntustudio-gdm-theme ubuntustudio-icon-theme ubuntustudio-look ubuntustudio-screensaver ubuntustudio-theme ubuntustudio-sounds
    I am neither sure if you need all this packages nor if there are some missing, but for me it worked fine ;-)
  3. Now activate the theme and wallpaper:
    1. Go to System -> Preferences -> Theme.
    2. Scroll down and choose UbuntuStudio (a nice dark theme).
    3. Click Apply Background
    4. Click Close
  4. If you want you can change the login manager too. (I did not because I use autologin and personally find the default ubuntu login manager nicer.
    1. To do this go to System -> Administration -> Login Window
    2. In the Local-Tab choose Ubuntu-Studio and click Close.

PS: The sound will be automatically applied. For the screensaver I do not know what is the ubuntustudio screensaver but it seems you have to set it manually.
Source: http://www.ubuntu-austria.at/printview.php?t=397&start=0

My all-time favorite Firefox Extensions

The first things I do after having “bloody” new operating system set up is to – if not previously installed – install firefox and some extension I need for “daily” tasks.

The first one I think is always PwdHash which generates per-site-passwords on the fly in combination with your master password, so I can login to the bunch of websites where I am registered. Just install it and press F2 when you are in the password box, then enter your password and press Submit. The extension automatically generates the password, so that key loggers have no chance.

Call me paranoid but I use site-specific master passwords too. So like the first and last letters of the website domain with different case combinations and a static part.

The next one is Greasemonkey which executes little JavaScript-programs on every site. My favorite user script is AutoLoginJ which automatically logs you in on website where you have your password stored.

After some time of surfing I discover the annoying ads popping out everywhere. The simple solution Adblock Plus which protects me from the time-stealing layer-ads.

After a while I tend to visit del.icio.us to extend my bookmark list. If I see a nice website I want to simply add this page to my bookmarks without going to the del.icio.us page, the click post and the copy the page title to the description field. So I install the del.icio.us Extension (VS 1.2) because version 1.5 works too slow for me. Sure it has more features but I am satisfied with the features of VS 1.2.

The last one I install after some downloads is Download Statusbar which makes downloads a lot easier because it simply shows your downloads in a bar at the bottom, so you always have an overview and can do all important download-related tasks at one place.

In another profile I often install the Web Developer Extension for detecting the structure of a website. This helps a lot when designing a new page. But at the time I have other things to do ;-)

You may post your favorite extensions without you cannot live. 8-)

« Previous PageNext Page »