--- a/sourcefiles/src/com/baselet/control/Path.java
+++ b/sourcefiles/src/com/baselet/control/Path.java
@@ -14,13 +14,19 @@
 
 public class Path {
 
+  // [BM debianisation]
+	public static String bm_getUmletUserDir() {
+		return System.getProperty("user.home")+"/.umlet/";
+	}
+  //
+
 	private final static Logger log = Logger.getLogger(Utils.getClassName());
 
 	private static String tempDir;
 	private static String homeProgramDir;
 
 	public static String config() {
-		return Path.homeProgram() + Program.CONFIG_NAME;
+		return bm_getUmletUserDir() + Program.CONFIG_NAME;
 	}
 
 	public static String customElements() {
@@ -56,11 +62,8 @@
 				homeProgramDir = path;
 			}
 			else {
-				String tempPath, realPath;
-				tempPath = Path.executable();
-				tempPath = tempPath.substring(0, tempPath.length() - 1);
-				tempPath = tempPath.substring(0, tempPath.lastIndexOf('/') + 1);
-				realPath = new File(tempPath).getAbsolutePath() + "/";
+				// BM fixed path
+				String realPath = "/usr/share/umlet/";
 				homeProgramDir = realPath;
 			}
 		}
--- a/sourcefiles/src/com/baselet/control/Main.java
+++ b/sourcefiles/src/com/baselet/control/Main.java
@@ -3,6 +3,7 @@
 import java.io.BufferedWriter;
 import java.io.File;
 import java.io.FileInputStream;
+import java.io.FileReader;	//[BM-debianisation] for copy operation
 import java.io.FileWriter;
 import java.io.IOException;
 import java.io.PrintWriter;
@@ -39,6 +40,20 @@
 
 public class Main {
 
+	// [begin BM-debianisation] file copy function
+	private static void bm_copy(File inputFile, File outputFile) throws IOException {
+		FileReader reader = new FileReader(inputFile);
+		FileWriter writer = new FileWriter(outputFile);
+		int character;
+		while ((character = reader.read()) != -1)
+			writer.write(character);
+	
+		reader.close();
+		writer.close();
+	}
+	// [end BM-debianisation]
+
+	
 	private final static Logger log = Logger.getLogger(Utils.getClassName());
 
 	private static Main instance;
@@ -69,6 +84,52 @@
 
 //		System.setSecurityManager(new CustomElementSecurityManager());
 
+		// [begin BM-debianisation] create directory $HOME/.umlet to store settings in
+		String bm_homeDirName = Path.bm_getUmletUserDir();
+		// a list of directories to be created
+		List<String> bm_directories = new ArrayList();
+		bm_directories.add(bm_homeDirName);
+		bm_directories.add(bm_homeDirName + "custom_elements/");
+		bm_directories.add(bm_homeDirName + "custom_elements/tmp");
+		bm_directories.add(bm_homeDirName + "palettes/");
+		
+		
+		for (String bm_dirName : bm_directories) {
+			File bm_file = new File(bm_dirName);
+			if (!bm_file.isDirectory())
+			{
+				if ( ! bm_file.mkdir() )
+				{
+					System.err.println("Unable to create " + bm_dirName);
+					System.exit(-1);
+				}
+			}
+		}
+	
+      // copy all palette files to users umlet directory
+      // that's probably not the best way of fixing things, but it
+      // works an non-disruptive
+      // we cannot simply take the palettes directly from usr/... because
+     // we have no write rights there (for editing them), therefore it
+      // would be required to support multiple palette directories and
+      // do some other quirks
+		FileSystemView fileSystemView= FileSystemView.getFileSystemView();
+		File[] paletteFiles= fileSystemView.getFiles(new File("/usr/share/umlet/palettes/"), false);
+		List<File> palettes = new ArrayList<File>();
+		for(File palette : paletteFiles) {
+			if(palette.getName().endsWith(".uxf")) {
+				String targetName = bm_homeDirName + "palettes/" + palette.getName();
+				File outputFile = new File(targetName);
+				if (!outputFile.exists())
+					try {
+						bm_copy(palette, outputFile);
+					} catch (IOException e) {
+							System.err.println("Unable to copy palette file " + palette + " to " + targetName + "\nContinuing anyways.");
+					}
+    		}
+      }
+		// [end BM-debianisation]
+
 		Main main = Main.getInstance();
 		main.initOverallSettings();
 		tmp_file = Program.PROGRAM_NAME.toLowerCase() + ".tmp";
@@ -125,7 +186,7 @@
 	}
 
 	private void initLogger() {
-		String log4jFilePath = Path.homeProgram() + "log4j.properties";
+		String log4jFilePath = Path.bm_getUmletUserDir() + "log4j.properties";
 		try {
 			// If no log4j.properties file exists, we create a simple one
 			if (!new File(log4jFilePath).exists()) {
@@ -141,7 +202,7 @@
 				writer.close();
 			}
 			Properties props = new Properties();
-			props.put("PROJECT_PATH", Path.homeProgram()); // Put homepath as relative variable in properties file
+			props.put("PROJECT_PATH", Path.bm_getUmletUserDir()); // Put homepath as relative variable in properties file
 			props.load(new FileInputStream(log4jFilePath));
 			PropertyConfigurator.configure(props);
 			log.info("Logger configuration initialized");
@@ -153,8 +214,8 @@
 	private void readManifestInfo() {
 		try {
 			Manifest manifest;
-			if (Path.executable().endsWith(".jar")) manifest = new JarFile(Path.executable()).getManifest();
-			else manifest = new Manifest(new FileInputStream(Path.homeProgram() + "META-INF" + File.separator + "MANIFEST.MF"));
+			// [BM debianisation] always at this location for Debian
+			manifest = new Manifest(new FileInputStream(Path.homeProgram() + "META-INF" + File.separator + "MANIFEST.MF"));
 
 			Attributes attributes = manifest.getMainAttributes();
 			String versionString = attributes.getValue("Bundle-Version");
@@ -401,7 +462,8 @@
 	public List<File> scanForPalettes() {
 		// scan palettes directory...
 		FileSystemView fileSystemView = FileSystemView.getFileSystemView();
-		File[] paletteFiles = fileSystemView.getFiles(new File(Path.homeProgram() + "palettes/"), false);
+		// [BM-debianisation] take paletes from local user dir to allow editing
+		File[] paletteFiles = fileSystemView.getFiles(new File(Path.bm_getUmletUserDir() + "palettes/"), false);
 		List<File> palettes = new ArrayList<File>();
 		for (File palette : paletteFiles) {
 			if (palette.getName().endsWith("." + Program.EXTENSION)) palettes.add(palette);
@@ -468,4 +530,5 @@
 		return recentFiles;
 	}
 
+	
 }
