Posted by: sysblog | Friday, 16th May 2008

Ubuntu: Changing Hostname from Command Line

As described at it’s straight forward:


sudo /bin/hostname mynewhostname

Supplying the path to the binary is for security reasons, I guess, to make sure we have the right bin (eventhough it could have been replaced there, too…).

But the people at debianadmin.com forgot to mention in order to avoid “hostname: Unknown Host” you have to


sudo edit /etc/hosts

and change it there, too!

Tags: ,

Posted by: sysblog | Thursday, 15th May 2008

Ubuntu: Howto setup mp3 preview on Mouse-Over

Straight from Ubuntuguide.org:

You can also get Mouse over preview to work by installing:


sudo apt-get install mpg321
sudo apt-get install mpg123-esd
sudo apt-get install vorbis-tools
sudo apt-get install esound
sudo apt-get install ubuntu-restricted-extras

with this system Skype still functions.

Tags: , ,

Also, there is a very interesting article at Linux Owns showing three steps to get all your favourite packages (back) fast. I added a fourth step actually saving your package list for later use. Deriving it straight from there (without testing, since unfortunatelly my last machine has been hardyed just a couple of hours ago):

  1. integrate medibuntu sources.list
    
    sudo wget http://www.medibuntu.org/sources.list.d/gutsy.list -O /etc/apt/sources.list.d/medibuntu.list
    
  2. add server key
    
    wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add - && sudo apt-get update
    
  3. write a text file listing all package names you wish installed separated with spaces — you should be able to instead put every package name in one line with trailing \\ (double back-slash) but as I said: I haven’t tested it, yet! Name it, say, most_important_debs.
  4. 
    sudo aptitude --assume-yes install < most_important_debs
    

    You might want to approve the package list before install. In that case omit –assume-yes

Let me know it someone used it (hopefully with success).

Update 2008/05/15: It does help to read and think before you speak (or write for that matter). I got it completely wring. The linked article is about packages from Medibuntu only. OK then, if it’s like this I just alter 1, 2, 4 and 3 -> 1 :)

  1. build a list of your (most important, enduser) packages
  2. update-manager -d, i.e. dist-upgrade your system
  3. employ aptitude to read in your file (to be exact it’s bash that redirect from the file…)

Of course, this method still does not solve the problem of saving your personal settings but still get all the system settings from the new distro release. But this shouldn’t be that hard for release maintainers since they (potentially) know which package version had what config files delivered or generated. From there it should be easy to determine if a system config file has been changed be the user -> show diff. Or do I overlook something once again?

Update 2008/05/15: Even better looks aptitude-run-state-bundle:

DESCRIPTION
aptitude-create-state-bundle produces a compressed archive storing the files that are required to replicate the current
package archive state.  The following files and directories are included in the bundle:
·      $HOME/.aptitude
·      /var/lib/aptitude
·      /var/lib/apt
·      /var/cache/apt/*.bin
·      /etc/apt
·      /var/lib/dpkg/status
The output of this program can be used as an argument to aptitude-run-state-bundle(1).

Update 2008/05/15: A good starting point would be either


dpkg -l | grep ^i | editor

or if you don’t use aptitude this also shows (only currently) installed packages


dpkg -l | grep ^i | editor

One needs to remove non-package-name strings, though. As I haven’t come around to learn sed (line editing) I cannot show how to deploy sed to do it. Anyone?

Tags: , , ,

Posted by: sysblog | Thursday, 15th May 2008

Ubuntu Cheat Sheet from FOSS for Hardy Heron

There is a neat cheat sheet out in PDF format from FOSS covering, among many others, the new Ubuntu Uncomplicated Firewall ufw, special packages, of course apt-family package management, services a.k.a init scripts and daemons, …

It’s released under CC-BY-SA 3.0. By the way, did you know

Type the phrase “REISUB” while
holding down Alt and SysRq (PrintScrn) with
about 1 second between each letter. Your system
will reboot.

Tags: , , , , ,

Posted by: sysblog | Wednesday, 14th May 2008

Ubuntu Hardy Heron Dist-Upgrade via Command Line

You can do Dist-Upgrades not only with the GUI update-manager but also via do-release-update. The tool tells me what awaits me (I have 6000 kB/s):


66 packages are going to be removed. 193 new packages are going to be
installed. 1269 packages are going to be upgraded.

You have to download a total of 1005M. This download will take about
23 minutes with your connection.

Fetching and installing the upgrade can take several hours. Once the
download has finished, the process cannot be cancelled.

So, let’s see.

Btw do-release-update by itself notices if you are connected via ssh and asks if you want to proceed. If you do you’ll get a second sshd on Port 9904. Using screen it shouldn’t be a problem for me but very nice of the tool to ask :)

Tags: , ,

After I created a new user testuser


sudo adduser testuser

I couldn log in this new user via


ssh newuser@localhost

SSH told me “Permission denied, please try again.” If I’d only switch users with


su - newuser

login was granted. So I had a look at


sudo vim /etc/ssh/sshd_config

and looked for


AllowUsers

and appended the new user in that line. Now I needed to reload (in case you are logged in via ssh) the server:


sudo /etc/init.d/ssh reload

and access is granted!

Ressources

  • None ;)

Tags: , , , ,

Posted by: sysblog | Wednesday, 14th May 2008

Traffic Shaping Linux (restrict Bandwidth)

Allthough I haven’t found some shiny GUI somewhat like Netlimiter there is Wonder shaper (and shaper and trickle and squid for http and …) where a single command line sets your over-all bandwidth for network interface X. And, isn’t that all you really need?:


sudo wondershaper ethX downlink(kbit/s) uplink(kbit/s)

This is, from the perspective of the host doing the shaping. For example to set download to 10000kb (750*8 = 6000 DSL but don’t limit intranet connections on 1Mb Ethernet) but limit upload to, say, 35kB (~280kb) — e.g. if you have a server running on the same connection you do your daily internetting, you do:


sudo wondershaper eth0 10000 280

Ressources

Tags: , , , ,

Posted by: sysblog | Monday, 12th May 2008

Chris Pirillo lifts up the web — They call it Gnomepal…

Sit back, watch the video

and read more and more or more.

I’m not quite sure, yet, what I think of it, but putting the “Can it really be realised/implemented?” question aside, his idea really sounds stamin! I’ll definitely will have an eye on it and would love to see those ideas aroused!

By the way, the Drupal module it obviously started with is Activity Stream.

Side note: What do I tag this with? Where is wordpress’s option for the infinity-all-possible-ever-thought-of-tag?

Tags: , , , , ,

In Drupal 6 this can be done with core modules like this:

  1. enable Trigger module
  2. add an action
  3. add advanced action at the bottom and choose “Redirect to URL”
  4. use description regardless of how you will use it but rather describing what this action does; e.g. “redirect to start node”
  5. as URL apply “node”
  6. set-up the appropriate trigger
  7. from the drop-down list at “Trigger: After a user has logged in” select your new action from just now
  8. log out and back in again to test it

Note: In the links provided you need to change saying “your-domain-path-to-drupal” by your actual domain name (or navigate as usual if you now where to find the settings pages in Drupal 6) to make it http://example.com/admin. If you happen to have clean urls disabled you might know already that you also need to prefix the admin path by “?q=” so it alltogether looks like this: http://example.com/?q=admin

Resources

Tags: , , , ,

All you need is the Windows Installer itself. Hit Win+R (command line dialog) and execute the following line (change file name and target folder, of course):


msiexec /a c:\tmp\MSIFileName.msi /qb TARGETDIR="c:\tmp\msitmp\"

You’ll find all files in your target folder.

Tags: , , , ,

Categories