Posts Tagged 'Linux'

Synergy2

Two years ago, I tried Synergy2 on Windows, Linux and Mac OS X.

Synergy lets you easily share a single mouse and keyboard between multiple computers with different operating systems, each with its own display, without special hardware. It’s intended for users with multiple computers on their desk since each system uses its own monitor(s).

Redirecting the mouse and keyboard is as simple as moving the mouse off the edge of your screen. Synergy also merges the clipboards of all the systems into one, allowing cut-and-paste between systems. Furthermore, it synchronizes screen savers so they all start and stop together and, if screen locking is enabled, only one screen requires a password to unlock them all. Learn more about how it works.

At that time, I had to use the console on Mac OS X and Linux to start/stop Synergy2. Configuration was done by editing text files. A GUI was only available for the Windows version, so that at least on Mac OS X and Linux the usability could have been better.

Yesterday, I read Adam Pash’ Hack Attack: Control multiple computers with a single keyboard and mouse on lifehacker.com. He mentions, that for Mac OS X a GUI for Synergy2, called SynergyKM, is available. So, I gave it another try. This time, the setup was very smooth. Just a few clicks on Mac and Notebook and the setup was complete.

What I like most is, that my TFT display has an analog as well as a DVI connector. So, the Mac is connected using DVI, whereas the notebook is attached to the display via an analog cable. Now I can switch between both using a button on the display. Together with Synergy2, it is a really cheap KVM switch.

Ubuntu 7.04 (Feisty Fawn) on Mac Mini: A(lmost a) Dream

Ubuntu 7.04, codename Feisty Fawn, was released three days ago. I already used the beta versions on my notebook and was surprised that except the modem everything worked right out of the box. I tried one of the first beta versions on my Mac Mini as well, but that was not very successful: Booting the LiveCD system did not work and during the install the installation of the bootmanager (tested both, grub and lilo) was not possible.

Today, I downloaded the final version and give it another try. Unbelievable but true: I booted the LiveCD system and (almost) everything works without any manual configuration! Sound, Wireless LAN, Desktop Effects (AIGLX + compiz built-in), changing screen resolution and much more.

After a few minutes, I found out that although the bluetooth device in the Mac Mini was recognized, it did not find any other bluetooth devices. And there does not seem to be a bluetooth manager applet like the network manager.
Furthermore my relative new scanner (Canon Lide 70) does not seem to be supported…

Anyway, I will definitely get rid of the Windows Vista installation next to Mac OS X in favor of Ubuntu. Goodbye MS. ;-)

Howto: AJAX-based SSH client for your Debian+Plesk Setup (AjaxTerm)

I recently read an article about AjaxTerm in the German Linux Magazin. It is a AJAX-based SSH client which runs in your browser. So with the respective setup you are able to access your box’ shell from anywhere just with a browser. You do not even have any problems with firewalls and proxies anymore!

This is a small guide which explains how to setup AjaxTerm on a Debian System with Plesk:

1. Go to the AjaxTerm Website and download the latest release (currently 0.10).
# wget http://antony.lesuisse.org/qweb/files/Ajaxterm-0.10.tar.gz

2. Extract the archive, become root, move the folder to /usr/local/ and create a symlink for easier access.

# tar xvzf Ajaxterm-0.10.tar.gz
# su
# mv Ajaxterm/ /usr/local
# ln -s /usr/local/Ajaxterm-0.10 /usr/local/ajaxterm
# cd /usr/local/ajaxterm

3. Copy the Debian init script for AjaxTerm to /etc/init.d/ and add it to all default run levels

# cp configure.initd.debian /etc/init.d/ajaxterm
# update-rc.d ajaxterm defaults

4. Edit the init script and change the variable DAEMON to /usr/local/ajaxterm/ajaxterm.py and PORT to 8022. Check that the executable name is ajaxterm.py (with the file extension!).

5. Make the init script executable and start AjaxTerm

# chmod a+x /etc/init.d/ajaxterm
# /etc/init.d/ajaxterm start
Starting ajaxterm on port 8022
AjaxTerm at http://localhost:8022/ pid: 7580

AjaxTerm is now successfully running (it started ssh session on localhost with user nobody) but is only listening on localhost:8022. Therefore we will use the Apache proxy module to access AjaxTerm using a subdomain. (As we did in the Plesk on Port 443 Howto)

6. Create a new subdomain with PHP support in Plesk, e.g. ajaxterm.example.com.

7. Go to the conf directory of the new domain.
# cd /var/www/vhosts/example.com/subdomains/ajaxterm/conf

8. Create a new vhost.conf with the following lines.

ProxyRequests Off
<proxy *>
Order deny,allow
Allow from all
</proxy>

ProxyPass /ajaxterm/ http://localhost:8022/
ProxyPassReverse /ajaxterm/ http://localhost:8022/

9. Activate the proxy Apache module, reconfigure Plesk so that it finds the new vhost.conf and reload the apache configuration.

# a2enmod proxy
# /usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name=example.com
# /etc/init.d/apache reload

You should not get any errors!

10. Access AjaxTerm: https://ajaxterm.example.com/ajaxterm/ (Don’t forget the trailing slash!)

11. Because we do not want to be able to use AjaxTerm over unsecured HTTP, we create a simple index.php in httpdoc/ and httpsdoc/ of the subdomain folder, which will redirect to the above link. Furthermore you should delete the index.html file in httpdocs/ and httpsdocs/.

< ? header("Location: https://" . $_SERVER['SERVER_NAME'] . "/ajaxterm/"); ?>

Now you should be able to access AjaxTerm by visiting https://ajaxterm.example.com with your browser.

If you are really paranoid you should secure the access furthermore by setting up an authentication, e.g. basic http authentication.

Still alive

I haven’t posted updates for quite some time. End of September I finished my studies and started working full time at SAP in October. The new department/topic/task is very interesting and time consuming. ;-)

Beside work there did not happen much in the last weeks.

I installed the newest Ubuntu Linux release on a notebook. It was very surprising to me, that except the internal win-modem everything worked right out of the box. Even OpenGL-accelerated desktop with AIGLX and Beryl as composite manager works without the need to fumble with any configuration files manually. Another surprise was that sane now supports Canon Lide 35/50/60 scanners, so that I can finally use my Canon Lide 35 successfully under Linux.

Furthermore I am currently upgrading my Intel Mac Mini. I already installed 2GB of RAM yesterday and will soon exchange the 1.5 Ghz Intel Core Single with a 2.0 Ghz Core 2 Duo (“Merom”).

Next weekend Judith and I will fly to Stockholm to visit her Cousine Julia and her boy-friend Arndt. I am curious how the IKEA-country will look like. ;-)

FTP backup with duplicity/ftplicity

While the 1blu vserver is still running even though I do not pay anything for it, I thought I could use it for something useful. ;-)

I found an interesting article about encrypted and incremental backups using ftp with the app “duplicity” in issue #13 of the German computer magazine c’t. (page 216)

The author of the article, Christiane Rütten, uses a wrapper script called ftplicity to simplify the usage of duplicity. It is working really great. Here are the steps to setup an automatic, encrypted and incremental backup using ftplicity/duplicity aggregated from the article:

————————————————————————-

apt-get install duplicity
gpg –gen-key
wget ftp://ftp.heise.de/pub/ct/listings/0613-216.tar.gz
unzip 0613-216.tar.gz
cp ftplicity/ftplicity /usr/local/bin
ftplicity
nano -w .ftplicity/conf
# GPG_KEY < = set to the 8 digit long key-id of the generated gpg key
# GPG_PW <= set to the passphrase which was used for generating the gpg key
# set the necessary ftp credentials
nano -w .ftplicity/exclude
# insert all directories which should be excluded from the back (each on a single line), for example: /dev /proc /sys /tmp /var/tmp /var/run
nano -w .ftplicity/pre
# insert all commands you want to execute before backup; for example dump of all mysql databases: mysqldump –all-databases -u admin -p’
chmod u+x .ftplicity/pre
chmod og-rwx .ftplicity/*#create first backup
ftplicity backup

#create crontab entries

# run the backup every night at 5am (incrementally)
00 5 * * * root /usr/local/bin/ftplicity backup

# run a full backup and delete old incrementals once a month
00 6 1 * * root /usr/local/bin/ftplicity full && /usr/local/bin/ftplicity purge –force

————————————————————————-

Howto: Installing PHP5 on Debian 3.1 with Plesk 8

This is a small Tutorial how to install PHP5 on Debian 3.1 with Plesk 8.0.0.

(1) Add new source to /etc/apt/sources.list
deb http://packages.dotdeb.org stable all
deb-src http://packages.dotdeb.org stable all
(2) Install PHP 5 – WARNING: Plesk is currently not compatible to MySQL5! So make sure, that you do not upgrade your MySQL Installation.
apt-get install psa-php5-configurator
apt-cache search php5
…and install any of the php modules you want.
(3) THIS STEP IS PROBABLY NOT NEEDED ANYMORE WITH PLESK 8 AND ABOVE! So try out https://webmail.example.com first!
Fix Horde Webmailer:
apt-get install php5-pear
pear upgrade DB
cd /usr/share/psa-horde/pear
tar cvzf DB.backup.tar.gz DB.php DB/
rm DB.php
rm -R DB/
cp -R /usr/share/php/DB* .

(4) That’s it!

Running Plesk on port 443

Today, I wrote a small tutorial about how to run Plesk on port 443 using mod_proxy.
—————————————————

This howto describes the configuration of your server to let your users login to plesk using standard ports 80 (http) and 443 (https). This is especially helpful, if you are behind any kind of firewall or proxy, which prohibits access to plesk’s standard port 8443. This solution uses mod_proxy to create an internal forward from ports 80/443 to port 8443.

Please notice, that you will not have access to the Virtuozzo Panel in Plesk when using this solution. But as access to Plesk and(!) Virtuozzo Panel is still available on Port 8443, this should not be problem for your clients.

I created this howto on a Debian Linux system. Therefore you will have to replace some of the commands with commands of the Linux distribution, which you are using. Basically, the configuration should work on any Linux system.

My test system: VPS, Debian 3.1, Plesk 8

(1) install mod_proxy_html
apt-get install libapache2-mod-proxy-html

(2) activate mod_proxy_html in apache configuration
a2enmod proxy_html

(3) create subdomain with ssl support through Plesk (example: plesk.example.com)

(4) create a file called vhost.conf in /var/www/vhosts//subdomains/plesk/conf/ and insert the following options:

ProxyPass / https://localhost:8443/
<Location />
ProxyPassReverse /
</Location>
SSLProxyEngine On

<Proxy *>
Order deny,allow
Deny from all
Allow from all
</Proxy>
(5) let Plesk reconfigure your domain (replace example.com with your domain)
/usr/local/psa/admin/sbin/websrvmng –reconfigure-vhost –vhost-name=example.com

(6) restart Apache
/etc/init.d/apache2 restart

(7) access Plesk using https://plesk.example.com or http://plesk.example.com

(8) Send me an eCard, email or comment this blog entry directly to give feedback on this tutorial. :-)
—————————————————

Linux Distributions

Have you ever wondered about all those strange Linux distributions and how they are connected together?

Well…this is the solution: Mindmap of Linux Distributions – Version 2



Archives

del.icio.us links