Posts filed under ‘Open Source’

Changing PDF Titles With pdftk

Have you ever noticed that many PDF converters, or scanning programs, create PDF titles that are anything but meaningful? I’m using XSane for scanning, and all the PDF files get this title:

XSane scanned image

That’s totally meaningless. Others create PDF from Microsoft Word, and many of those PDF files have Microsoft Word in the title — in most cases, the title even begins with Microsoft Word, which makes it hard to identify the document you’re looking for in the window bar when you have several of them open.

With pdftk (PDF Toolkit), you can fix this easily. I’ve used it only on Linux, but apparently it’s available for other major platforms, too. Be warned that this is a command-line program.

So here’s what I do to change a PDF title.

Here’s a typical „Microsoft Word“ PDF file:

Atlas~/private/stefan> l neugier_handout.pdf
 -rw-r--r-- 1 stefan users 531831 25. Okt 2012  neugier_handout.pdf

1. First step is to dump the PDF metadata to a file which I call report.txt:

Atlas~/private/stefan> pdftk neugier_handout.pdf dump_data output report.txt

Here’s what’s in the PDF metadata:

 Atlas~/private/stefan> cat report.txt
 InfoBegin
 InfoKey: ModDate
 InfoValue: D:20081229161229+01'00'
 InfoBegin
 InfoKey: CreationDate
 InfoValue: D:20081229161229+01'00'
 InfoBegin
 InfoKey: Author
 InfoValue: Charakterstärke
 InfoBegin
 InfoKey: Title
 InfoValue: Microsoft Word - Neugier_Handout.doc
 InfoBegin
 InfoKey: Creator
 InfoValue: Word
 InfoBegin
 InfoKey: Producer
 InfoValue: Mac OS X 10.4.11 Quartz PDFContext
 PdfID0: 911d0c6f06613f3690fa270fad39d33b
 PdfID1: 911d0c6f06613f3690fa270fad39d33b
 NumberOfPages: 4

2. Second step is to edit the metadata file:

 Atlas~/private/stefan> vi report.txt

Here’s what I’ve changed. Note that I’ve used ASCII-7, because pdftk doesn’t seem to be able to properly handle UFT-8 and friends:

Atlas~/private/stefan> grep Neugier report.txt
 InfoValue: Neugier - Staerkentraining

3. Third step is to update the metadata in the PDF file. Note that the output must be written to another file — pdftk refuses to overwrite the original file:

 Atlas~/private/stefan> pdftk neugier_handout.pdf update_info report.txt output neugier_handout.pdf.copy

4. Last step is to make the copied PDF file the original PDF file:

 Atlas~/private/stefan> mv neugier_handout.pdf.copy neugier_handout.pdf

And done. Verify that the title meets your expectations in the PDF viewer of your choice:

 Atlas~/private/stefan> okular neugier_handout.pdf

The steps are easily scriptable if you’re so inclined.

2014/11/26 at 11:00

Firefox Tab Sync Issues

Firefox again. Whenever I have time to waste, I try to configure its features to make working with a browser more productive. Incrementally, I’m getting there — by the year 2100 I should have reached optimum productivity. 🙂

When I recently installed openSuse 13.2 on my laptop (fresh installation, except that the /home directory was preserved), and then opened Firefox (33.0) for the first time, it synchronized the tabs from my work computer (a desktop computer). All those tabs were pinned tabs, since I rarely have regular tabs open in the browser. (When I do, it’s mostly for searches, or for ebay which cannot handle pinned tabs well.) Anyway, looks I’ve been lucky with that pristine Firefox from the fresh installation. Normally, there seems to be no way of keeping tabs in sync across devices. Meh.

At least there’s a semi-automatic way of syncing tabs, but it’s well hidden in Firefox. From googling, I found that there must have been an option in the History sidebar (CTRL+H) at some point (2012 or so), labeled something like „tabs from other devices“. That would be nice to have, but apparently they removed it in newer Firefox versions. These days, what you do is open a new tab, then type about:sync-tabs in the address bar. Quite intuitive, I would say. 🙂

firefox-sync-tabs

The prerequisite of seeing something here is that you’ve enabled Firefox Sync on your various devices. If that’s the case, Firefox will list the tabs from your other computers, tablets, or smartphones, grouped by device. Note that it will list only the tabs that aren’t already open on your current device. Also note that Firefox has its own ideas about what „open“ is — any pinned tabs on your current machine are disregarded. In other words, if a page is open in a pinned tab, Firefox will still show it in the tabs from other devices list. However, Firefox will show pinned tabs from your other devices, which is kind of inconsistent, but helpful nevertheless.

Now you can double-click on the gray boxes, and they’ll be opened in a new tab. At the same time, they’ll disappear from the list.

Right-clicking on the sync-tabs page lets you refresh the open tabs list. If you mark a gray box with a left-click, then right-click on it, you get an additional option, which is to add it as a bookmark.

So, very limited functionality, and limited use.

I tried grouping tabs, too, but that’s a feature I’d consider not working properly, or at least it has a flawed design. It doesn’t work at all with pinned tabs (they appear in every tab group, no matter what you do), so you’re forced to use regular tabs. Also, tab groups are supposed to close tabs from other groups when you open them, but they don’t behave that way in my browsers (on Linux). And if I dare to manually close those other tabs that were opened from another tab group, guess what happens? The tab group is empty then. Oh boy. That’s usability spelled backwards.

Comments are welcome, but please don’t advice to switch to Chrome. While I do use Chrome when working with add-ons in Google Docs (because add-ons only work in Chrome), I have a pretty good idea how this world would look like if everyone consolidated on Chrome. I bite my tongue not to end this article with a little rant, so let me just say that I deem a properly working Firefox an important thing to have these days. Thanks for reading, and agreeing. 🙂

2014/11/21 at 13:26

Calendaring on Linux and Android, again

One of the things I dearly hate about working on Linux is calendaring. There are many options for calendars, and over the years I’ve found they all work to some extent, but don’t support all my requirements. I think my requirements are fairly standard:

  • Calendars must be available on all my machines, including my phones.

I was trying to think of more requirements to justify a bullet list, but really I can’t. When I say „available“ I mean „out of the box“, without having to set up some fancy convoluted solution involving shell scripts that copy calendar files around, which is actually what I’ve seen too often as a suggested solution to overcome calendaring shortcomings on Linux.

Over the years, I’ve been using Sunbird (I liked it a lot, but it’s unfortunately a dead end and won’t run on my 64-bit boxes any more), Thunderbird Lightning, and KOrganizer. I looked at other stuff such as Kontact on KDE, but that simply, uh, won’t fit my needs.

KOrganizer was good enough for me, until I started using an Android phone this week. I bet there are zillions of apps for that phone that would support my WebDAV-based ICS calendars, but that’s exactly the problem. I tried a few, but they were either trial ones, or full of spam, or messed up my Android interface, and so on, and I don’t intend to spend my time investigating lots of crap, hoping I’ll stumble across a working solution some day.

So, once I had given up that idea, I converted my ICS calendars to Google calendars. I don’t feel overly comfortable doing this, because I’m one of the old fashioned crowd who believe that private data should be mostly on private machines that I have control of. Anyway, I did that, and my Google calendars display fine in the standard Android calendar app that came with my phone (Samsung Galaxy S2).

The next step was to make them show up in KOrganizer. Google uses CalDAV. KOrganizer uses Akonadi (on KDE 4.x) which is a service that runs in the background and is used to attach calendars and all kinds of similar stuff to „KDE“, in this case to make calendars available for KOrganizer. Akonadi features CalDAV and Google calendars, as you can see from this screen shot:Akonadi options on KDE 4.x

So there must be a way to attach my Google calendars in KOrganizer, right? Well, wrong, at least for me. I searched a lot, found a dozen blog or forum posts and stuff, but they were all referring to some slightly different setup than mine (why do developers change the interfaces all the time), or simply didn’t work. I was able to work around a „wrong password“ error (guess what? the password was correct, it was some fancy openSuse proxy thing that could be fixed in the KDE system settings by selecting „direct internet connection“), and eventually had a Google calendar show up in KOrganizer, except it wouldn’t display any events. Long story short, I gave up after having wasted too much time on this already, and looked at Thunderbird Lightning again (which I had given up on several years ago when it developed a habit of resetting my ICS calendars to zero byte length).

Thunderbird Lightning 1.4 supports CalDAV calendars, and thus Google calendars, out of the box. At least in theory. In practice, it does pretty much the same I had just experienced with KOrganizer: calendars are there, but don’t display any events. With Lightning, I found that, when setting up a Google calendar, it wouldn’t prompt me for username and password (and no, most of my calendars are definitely not public). That can’t be right! So I searched more, and finally found that you’ll have to install yet another add-on in Thunderbird, called Provider for Google Calendar 0.9.

With that add-on, Google calendars work fine. And not just that, the developer’s web page points out which of the many Google calendar links you’ll have to use. In the Google calendar web interface, select „Calendar settings“ from the little pull-down menu that appears when hovering the mouse over the calendar name in the left sidebar. On the next page, scroll down to the bottom, and here’s what you’ll have to select:

Google calendar links

In the window that opens, copy the link address. That’s the one to be used for Lightning.

In Lightning, select „New calendar“, „calendar on the network“, select „Google calendar“ (this is what the Provider for Google Calendar add-on provides), paste the link address, and done. Things can be so easy once you know your way around. 😉

To wrap up, this is what I did to get Google calendars working in KDE:

  • In Thunderbird, install the Lightning add-on.
  • In Thunderbird, install the Provider for Google calendar add-on.
  • In the Google Calendar web interface, edit the calendar, click the proper XML button, and copy the URL (link).
  • In Lightning, create a new calendar „on the network“, type: „Google calendar“, and paste the URL (link) from the Google Calendar web interface. You’ll be prompted for your Google username and password.
  • Do so for every Google calendar you wish to add to Lightning. Note that you’ll be prompted for your Google credentials for each calendar you add.

Some might wonder why I don’t simply stick to the Google Calendar web interface, which is really nice and configurable for my needs. Well, I don’t want my calendars to be just another browser tab. I have around 30 browser tabs (Firefox app tabs) open all the time, but calendars are simply too important for my daily (or should I say hourly) work, and I don’t want them to be even slightly buried in the browser.

Good luck with setting up your remote calendars on Linux!

2012/05/10 at 11:58

Firefox 3.5 on Linux

firefox-logoI’ve just upgraded my Firefox 3.0 browsers to Firefox 3.5 on some of my machines, and thought I’d share my experience. I’ve done the upgrade on two machines so far, all SuSE 11.1 boxes running KDE 4.3, but my comments might apply to other flavors of Linux and other KDE versions as well. One box is an old 32-bit Dell desktop computer, and the other one a recent Fujitsu Amilo 64-bit machine.

I’m using a lot of browser add-ons/extensions (see my article on Firefox extensions), so I was somewhat afraid that many of them would stop working in Firefox 3.5. (This had happened to me when upgrading from Firefox 1 to version 2, and to a lesser extent when upgrading to version 3.0.) My worries were unjustified, though. Only two extensions gave problems, but I could easily fix those by switching to alternative add-ons with the same functionality:

  • TinyURL Creator had to be replaced by TinyURL Generator.
  • Tab Mix Plus had to be replaced with Tab Mix Plus. (No joke; Tab Mix Plus 0.3.8.1 was reported as incompatible after the upgrade, so I used the built-in add-ons search and found – Tab Mix Plus 0.3.81, which installed just fine. After restarting Firefox it worked flawlessly, with all settings restored.)

On my 32-bit box, I had a problem with sound under Flash. YouTube videos would play fine, but without sound. I poked around and searched the web, only to find that Flash sound didn’t work in other applications like Opera, either. The solution was to deinstall libflashsupport and restart the applications that use Flash. Now sound in videos is back again.

Speaking of Flash, for some reason videos on the most popular German news site, Spiegel Online, never worked with Firefox 3.0. I was pleasantly surprised to find out that they work with no problem in Firefox 3.5.

I highly recommend upgrading to Firefox 3.5, at least when you’re on Linux. Just from „clicking experience“ loading pages is at least two times faster in Firefox 3.5, as compared to Firefox 3.0. The browser starts up a bit faster, too. I haven’t found the time to explore all the HTML 5 goodies that Firefox 3.5 provides, but will certainly give this a try soon.

2009/08/20 at 16:58 1 Kommentar

Darslicing

I want to back up my photos and videos on DVD. This sounds like a pretty straightforward task to me, but apparently it’s not, at least if you’re on Linux, like I am. I have a collection of digital photos and low-resolution videos, dating back to 2001. The total file size is about 40 gigabytes, organized in folders per year, like this:

  • photos.2001
  • videos.2001
  • photos.2002
  • videos.2002
  • etc.

The folders vary greatly in size. Many of them exceed 4.3 gigabytes which is what you can store on a standard DVD. (Otherwise I would have just copied those folders to individual DVDs, forgetting about the wasted storage space left on many of the DVDs.)

I’ve done backups on DVD before, the layman’s way: Drag over files to k3b, KDE’s burning program, until there’s no space left, burn the DVD, remember the last file stored on DVD, then start over with the next file to be burnt on a new DVD, and so forth. But that’s tedious and error-prone. What I wanted was to simply drag all photo and video folders into some application, and then let the application slice them so that they would fit on regular DVDs. I was sure that other people had had the same problem before, so there had to be an application that does just that. But there isn’t, at least to my knowledge, although I’ve asked many people and googled many forums. The best advice I found was „do this manually“ (d’uh) or „use a hard disk“ (double d’uh). I just want to back up my photos and videos on DVD, come on. And I believe in read-only media when it comes to backing up historical stuff that will never change, like photos and videos.

I haven’t found a solution that slices my files so that they fit on DVD, and saves them on DVD as files, uncompressed. There’s not much point in compressing JPEG or MPEG files, anyway, and this would give me the additional advantage of being able to view them directly from DVD (for example on my mother’s TV set which can display JPEG slide shows and play MPEG movies).

I said I haven’t found a solution, but that’s not entirely true. I’ve found a Python script that’s pretty short and fairly easy to read, but it’s the opposite of fault-tolerant, and it’s also pretty buggy. One tiny user mistake is enough to stop the process, rendering the last inserted DVD a case for the trash can. Using that script comes close to doing things manually. If I could write Python I’d probably hack that script and make it available publicly. But I can’t.

So I reverted to the next best solution, which is just slicing my files into 4.3 gigabyte pieces, with no way of looking at the individual files straight from DVD. Yes, I could use tar for this, but tar stands for Tape Archiver, and was originally meant for backing up files to tape. What tar does is create one big file, „tarring“ all the individual files into that monolith file, while optionally compressing them. That’s great for „full“ backups, for example snapshot backups of home directories or log files that you only need to restore fully (in case of disaster, or if you’re transferring files to another disk or computer). But you cannot retrieve individual files or folders from a tar archive file. Also, there’s no built-in slicing in tar, so tar’s archive files might become bigger than 4.3 gigabytes, thus not fitting on DVD.

Enter dar. Dar stands for Disk Archiver, which sounds a bit more modern to me than Tape Archiver. Dar basically does the same as tar, that is, „tarring“ files into one big file, optionally compressing them, but it has two advantages over tar:

  1. Dar can be configured to store that one big file in slices, that is, in a set of files not exceeding a particular file size each.
  2. You can retrieve individual files from a dar archive easily.

So what I did was create sliced dar files, which I decided to call darslices, each 4.3 gigabytes in size, and burn those files onto DVD using k3b. Dar seems to be less performant than tar, so it took a whole working day to create a dar archive of my 40 gigabytes. I ended up with 16 darslices, which I then burned onto DVD.

Now I said it before that I’m originally a Windows guy, and while I’m running lots of self-coded shell scripts to do repeated tasks, I still prefer to use a graphical user interface (GUI) when it comes to performing tasks that I do only rarely, like once per year. DarGUI comes to the rescue. As you can imagine, it’s a graphical front-end to dar. DarGUI is no more than that, but it’s decently coded, and, unlike so many open source applications, it has great documentation. So here’s a mini-tutorial on getting started with DarGUI, and thus with dar.

First of all, make sure dar is installed. As the name implies, DarGUI is just a graphical front-end, it doesn’t include dar. Then start DarGUI. In KDE, you’ll likely find it in the K menu under System, Backup.

To create a new archive, follow these steps:

  1. Select File, New (or click the Create a new archive icon).
    screenshot.dargui.new-archive.archive
    This opens a new window with six tabs.
    In the Archive tab, fill in a name for the archive file (or files, see later on). If you do regular backups (you do, don’t you?) the Add timestamp to name checkbox comes handy.
    Saves archive in can be an arbitrary location for storing the dar files (or dar slices).
    The Base directory field is the directory which contains all the files and directories that you want to archive. The directories that you enter on the Directories tab must be in this directory! I got this wrong the first time, although that’s exactly how it’s documented. Getting it wrong (by setting the Base directory to some other path) later on resulted in this error:
    screenshot.dargui.new-archive.error-cannot-create
    You can leave the value of Batch file value as is. Check Differential backup if you’re not doing a full or initial backup, but rather follow-up backups that just back up the files that have changed since the last full backup.
  2. In the Directories tab, add the directories you want to back up. For me, this was just the fotovideo folder on my massive storage device. 🙂
    screenshot.dargui.new-archive.directories
  3. I didn’t use the Files tab at all, because I was interested in backing up complete directories, rather than individual files.
    screenshot.dargui.new-archive.files
  4. Likewise, I didn’t use the Compression tab, because compressing photo or video files normally doesn’t make much sense.
    screenshot.dargui.new-archive.compression
  5. In the Options tab, I checked the Use slices checkbox, setting the value to 4500 Mb (megabytes), since this is what fits on a 4.3 gigabyte DVD.
    screenshot.dargui.new-archive.options
    The Test run only is handy to just try out if your setup will work. It simulates dar processing, but without actually writing files.
  6. I wanted to run the process immediately, so I didn’t fill in anything in the Scheduling tab.
    screenshot.dargui.new-archive.scheduling

That’s it. Now it’s time to press OK to start the process. This will open a console window which looks like this:
screenshot.dargui.new-archive.in-action

As said, for my 40 gigabytes of photos and videos, this ran all day. For the initial test run, I stopped it by pressing CTRL+C, then restarted the process after unchecking the Test run only checkbox in the Options tab.

Once the darslices are created and the process has ended, you can browse through the directories and files by selecting File, Open in the main window, or by pressing the Open an archive icon. Select the dar file, or the first dar file of your darslices. The interface will look like this:
screenshot.dargui.browse-files
Note that it can take some time until the file(s) are loaded and ready to be browsed, if you have a huge dar file or file set. While loading, DarGUI will display BUSY in the status bar.

To restore a file, apply a right click on it and select Restore selected. Then select a location to store your file to. You can do likewise for directories, or even for all directories or files in the dar archive.

Having talked about how great dar and DarGUI are, here’s a caveat that might make my whole effort look somewhat pointless. Dar relies on its darslices to be present on one physical medium. That is, you cannot retrieve individual files from a dar archive that’s stored on a multitude of media, like a set of DVDs. In other words, if I’d plan to restore my photos.2001 folder from my 16 darslices, I’d first have to copy all my 16 DVDs back onto disk. That’s not what I was aiming for in the first place, so I’ll continue looking for alternative solutions. (If you can point out a working solution I’d be more than grateful.) Still I think dar (and DarGUI) can be used for other scenarios, so I don’t regret having spent time on learning how to handle these programs.

Before I forget, I’d like to say thank you to Malcolm Poole, the author of DarGUI, for promptly replying to some questions that I had about DarGUI, and for pointing out to me that what I was looking for was actually documented. (In case you don’t know, I lead the MySQL Documentation Team, so being politely told that there’s an RTFM option always gives me a special feeling, if you know what I mean.)

2009/08/10 at 18:10 4 Kommentare

Setting up LVM on Suse Linux

All my computers run on Suse Linux these days, but admittedly, I’m a Windows guy. That is, I believe that installation things should run out-of-the-box, and when they don’t, I get angry. Lately, I got angry when setting up a new laptop computer, and Suse’s Yast came up with ridiculous suggestions about partitioning my hard drive. To cut it short, I had to set up my hard disk manually, something that I am (or rather, was) very much afraid of, because I didn’t want to destroy the working Windows setup that existed on that computer. (It’s a company-owned computer, and in case something goes terribly wrong hardware-wise I’d like to be able to boot into the company-supported Windows installation. Otherwise, I won’t use the Windows installation at all.)

So what Suse Linux 11.1 suggested was to create a home partition of 7 GB, and a root partition of 5 GB. I don’t know about you, but to me, this is just ridiculous. After sizing down the Windows partition to 30 GB, I had 120 GB left on my hard drive. So what’s the point of using 12 GB for Linux? I can’t help to think that there’s a Suse bug that forgets about the trailing zero, so that 120 GB left becomes 12 GB left. Anyway, I talked to some friends on IRC who recommended to partition my drive manually, and since I was feeling brave I did.

Why did I want to use LVM over traditional partitioning, however? Suse Yast’s suggestions for traditional partitioning were reasonable, and I could have easily changed the original suggestion to fit my needs. But I wanted LVM. LVM stands for Logical Volume Management. As Wikipedia says, LVM „is a method of allocating space on mass storage devices that is more flexible than conventional partitioning schemes. In particular, a volume manager can concatenate, stripe together or otherwise combine partitions into larger virtual ones that can be resized or moved, possibly while it is being used.“ I don’t (yet) care about all the magic you can do with LVM, I care about the flexibility.

To give an example: With traditional partitioning, and a 150 GB hard drive, you might assign 50 GB to the operating system and applications, and 100 GB to your working data (like documents, images, etc.). Then, at some point, you might find out that you need 70 GB for your OS and applications, but you’re only using 30 GB for your working data, or you’d like to have an extra partition for your web or log files. With traditional partitioning, you’re stuck, because there’s no easy and reliable way to change partition sizes. With LVM, you just assign as much space as you need initially, and then expand that as your needs grow.

You can do all sorts of magic with LVM, like backing up MySQL using file system snapshots, but that’s beyond the scope of this article. This is just about setting up a working LVM environment.

First thing I did in Suse Yast, when it came to preparing the hard drive, was to switch to „LVM partitioning“ (which resulted in the ridiculous suggestion mentioned above), then to „expert mode“ (creating the hard drive setup, instead of changing Suse’s suggestion).

Partitioning the hard drive

Partitioning the hard drive

I sized down the Windows NTFS partition to 30 GB. Before, I had checked the disk usage under Windows, which reported that about 10 GB out of 150 GB available were currently used. To make sure, I looked at the Windows system settings and ran the defrag tool to analyze the hard disk. As expected on a newly installed Windows system, there was no defragmentation. Better safe than sorry, I ran chkdsk. Then I made sure that Windows had been shut down properly, and booted from the Suse DVD. (It’s a good idea to make sure Windows hasn’t even started booting. I ran into problems when Windows had started booting for like two seconds before killing it with CTRL+ALT+DEL, but that short period was enough to initialize the NTFS file system, which then refused to be sized down by Suse Yast, claiming Windows hadn’t been shut down properly.)

In case you don’t know, Linux calls modern SATA disk drives /dev/sda (older IDE drives are called /dev/hda), where the „a“ stands for the first disk. If you have more than one disk, they’d be called /dev/sdb, /dev/sdc, etc.; your DVD drive will probably be /dev/sdc. Partitions are named by appending a number to the disk drive name, for example /dev/sda1 for the first partition on the first hard drive, or /dev/sdb3 for the third partition on the second hard drive.

Once the intial 150 GB Windows partition had been resized by clicking „change size“ in Yast and pulling the slider to 30 GB, I added a new partition. I made it a primary partition with 100 MB, which Suse converted to 94.13 MB. Suse was smart enough to assume that this would be my boot partition, and thus suggested that it should be mounted on /boot. I had to type in „100 MB“, because otherwise Suse would have assumed that I mean GB. 100 MB is enough for all the stuff under /boot, because it will never host data, but just meta-information.

screenshot.yast.lvm-2

Creating the LVM volumes

So this leaves all the rest for LVM. LVM is where your data will live, no matter what those data are. It could be the operating system, the web server, the database server, the applications you’re using, the documents you’re working with, your photos and videos, and so forth. What I did was assign the rest of the hard drive to dev/sda3, Linux LVM.

Basically, there are three „areas“ that you need:

  1. A swap partition.
  2. A root partition.
  3. A home partition.

In LVM, all those partitions are „logical volumes“. I created a „master volume“, calling it „system“, and assigning it to use all the space left on the /dev/sda3 drive.

Under that volume, I created three logical volumes, labeled:

  1. home: 30 GB (file system: ext3, mounted on /home)
  2. root: 20 GB (file system: ext3, mounted on /)
  3. swap: 10 GB („file sytem“: swap, mounted on „swap“)
Resizing LVM volumes

Resizing LVM volumes

When copying over data from another computer, I found that /home should be bigger, 50 GB. You can do this by running Yast > System > Partitioning. If you get an error saying the partition/volume you’re trying to resize is already mounted, exit the window manager you’re running (e.g. KDE), then issue „init 1“ on the command line. If the partition/volume you’re about to resize is still mounted (check with „mount“ on the command line), unmount it (e.g. „umount /dev/system/home“). Then you should be able to change the size by running Yast in text GUI mode (the same Yast interface, just less colorful, and you’ll have to use the keyboard instead of the mouse). When done, issue „init 5“ to return to KDE or whatever window manager you’re using.

By the way: Why do I want a swap file that’s significantly bigger than my physical memory (in case of my new laptop, 3 GB RAM)? It’s because I’ve been hit by Linux not being able to suspend to disk because of insufficient disk space in the swap partition. I’d assume that if you have 3 GB RAM then 3 GB disk space should be sufficient to store everything in RAM to disk when suspending to disk, but I’ve seen operations fail because of that assumption, and because disk space is cheap I prefer to be on the safe side. Maybe the extra disk space is needed because Linux can’t clean up and reclaim the disk space quickly enough when it suspends a box to disk.

Epilogue:  As you can see, I took some screen shots with my camera, wrongfully assuming that you can’t take screen shots from installation screens. (As said above, I’m originally a Windows guy.) But you can. As Lenz pointed out, there’s a way for Yast to take screen shots, although most people don’t know it. Well, at least I will know, next time. 🙂

2009/07/24 at 02:34 3 Kommentare


Juli 2017
M D M D F S S
« Mrz    
 12
3456789
10111213141516
17181920212223
24252627282930
31  

Aktuelle Beiträge

Enter your email address to follow this blog and receive notifications of new posts by email.

Schließe dich 208 Followern an