Linux HowTo: A Windows ISO image from Linux to a USB stick [closed]

Original Source Link

I’ve got Windows in an ISO image and want to put it on a USB stick so I can then install window. I want to do this from Linux.

Use WinUSB:

WinUSB is a simple tool that enable you to create your own usb stick windows installer from an iso image or a real DVD.

This package contains two programs:

  • WinUSB-gui: a graphical interface which is very easy to use.
  • winusb: the command line tool.

Supported images: Windows Vista, Seven, 8 installer for any language and any version (home, pro…) and Windows PE.

1

Use UNetbootin. It works with Windows bootable ISO, too.

  1. Open the ISO file with your program of choice, I prefer 7Zip.
  2. Make the primary partition on the thumb drive ACTIVE
  3. Copy all of the files present in the ISO onto the USB stick
  4. Boot from the USB

WoeUSB is a tool for creating a bootable USB flash drive used for installing Windows. Native UEFI booting is supported for Windows 7 and later images. WoeUSB is an updated fork of the WinUSB project.

Some third-party installers feature Windows installation images (/sources/install.wim) greater than 4GB making FAT32 as target filesystem impossible. NTFS filesystem support has been added to WoeUSB 3.0.0 and later.

Installation

sudo add-apt-repository ppa:nilarimogard/webupd8 
sudo apt update  
sudo apt install woeusb

This will install the WoeUSB graphical interface and the WoeUSB command line tool. WoeUSB supports both UEFI and BIOS for FAT32/NTFS/ExFAT USB flash drives.

To install the WoeUSB command line tool snap package in all currently supported versions of Ubuntu and other common Linux distributions that support snap packages such as Arch Linux, CentOS, Debian, elementary OS, Fedora, KDE Neon, Kubuntu, Manjaro, Linux Mint, openSUSE and Red Hat Enterprise Linux run these commands:

sudo snap install --edge woe-usb  
sudo snap connect woe-usb:removable-media

To launch the woe-usb snap package command line tool run the following command:

/snap/bin/woe-usb.woeusb

If you get a permission denied error click the Permissions button on the woe-usb screen in Ubuntu Software and toggle the permissions options from OFF to ON as shown in the below screenshot.

woe-usb Permissions

The WoeUSB GUI is easier to use than the WoeUSB command line tool. Click the radio button to the left of where it says From a disk image (iso), browse to the location of the Windows .iso file, under Target device select a USB flash drive, open Disks application and check that the Device name in Disks matches the Target device in WoeUSB (it should be something like /dev/sdX where X is a letter of the alphabet), and click the Install button to install to create a bootable Windows installation media on the USB flash drive.

enter image description here

Windows USB drive from Ubuntu failing repeatedly
WoeUSB Issues

Tagged : / / /

Making Game: A Windows ISO image from Linux to a USB stick [closed]

Original Source Link

I’ve got Windows in an ISO image and want to put it on a USB stick so I can then install window. I want to do this from Linux.

Use WinUSB:

WinUSB is a simple tool that enable you to create your own usb stick windows installer from an iso image or a real DVD.

This package contains two programs:

  • WinUSB-gui: a graphical interface which is very easy to use.
  • winusb: the command line tool.

Supported images: Windows Vista, Seven, 8 installer for any language and any version (home, pro…) and Windows PE.

1

Use UNetbootin. It works with Windows bootable ISO, too.

  1. Open the ISO file with your program of choice, I prefer 7Zip.
  2. Make the primary partition on the thumb drive ACTIVE
  3. Copy all of the files present in the ISO onto the USB stick
  4. Boot from the USB

WoeUSB is a tool for creating a bootable USB flash drive used for installing Windows. Native UEFI booting is supported for Windows 7 and later images. WoeUSB is an updated fork of the WinUSB project.

Some third-party installers feature Windows installation images (/sources/install.wim) greater than 4GB making FAT32 as target filesystem impossible. NTFS filesystem support has been added to WoeUSB 3.0.0 and later.

Installation

sudo add-apt-repository ppa:nilarimogard/webupd8 
sudo apt update  
sudo apt install woeusb

This will install the WoeUSB graphical interface and the WoeUSB command line tool. WoeUSB supports both UEFI and BIOS for FAT32/NTFS/ExFAT USB flash drives.

To install the WoeUSB command line tool snap package in all currently supported versions of Ubuntu and other common Linux distributions that support snap packages such as Arch Linux, CentOS, Debian, elementary OS, Fedora, KDE Neon, Kubuntu, Manjaro, Linux Mint, openSUSE and Red Hat Enterprise Linux run these commands:

sudo snap install --edge woe-usb  
sudo snap connect woe-usb:removable-media

To launch the woe-usb snap package command line tool run the following command:

/snap/bin/woe-usb.woeusb

If you get a permission denied error click the Permissions button on the woe-usb screen in Ubuntu Software and toggle the permissions options from OFF to ON as shown in the below screenshot.

woe-usb Permissions

The WoeUSB GUI is easier to use than the WoeUSB command line tool. Click the radio button to the left of where it says From a disk image (iso), browse to the location of the Windows .iso file, under Target device select a USB flash drive, open Disks application and check that the Device name in Disks matches the Target device in WoeUSB (it should be something like /dev/sdX where X is a letter of the alphabet), and click the Install button to install to create a bootable Windows installation media on the USB flash drive.

enter image description here

Windows USB drive from Ubuntu failing repeatedly
WoeUSB Issues

Tagged : / / /

Linux HowTo: How to open image map file (.map) in GIMP

Original Source Link

I’m trying to create a large HTML image map in GIMP, using the Image Map tool (Filters > Web > Image Map).

I started on it yesterday and saved the file, it saved as a .map file. I’m trying to open it today to make some changes, but when I try to open it with GIMP, it gives me an error saying “Unknown file type”.

How can I open the image map file that I saved?

  1. Open GIMP
  2. Open the image for which the map belongs
  3. Open the image map filter (Filters->Web->Image Map)
  4. In the image map dialog, do File->Open and choose your map file

This should solve it 🙂

Tagged : / /

Making Game: How to open image map file (.map) in GIMP

Original Source Link

I’m trying to create a large HTML image map in GIMP, using the Image Map tool (Filters > Web > Image Map).

I started on it yesterday and saved the file, it saved as a .map file. I’m trying to open it today to make some changes, but when I try to open it with GIMP, it gives me an error saying “Unknown file type”.

How can I open the image map file that I saved?

  1. Open GIMP
  2. Open the image for which the map belongs
  3. Open the image map filter (Filters->Web->Image Map)
  4. In the image map dialog, do File->Open and choose your map file

This should solve it 🙂

Tagged : / /

Making Game: OpenGL support in Mobaxterm

Original Source Link

I am trying to access 3D Slicer version 4.11 installed on a linux server through Mobaxterm.

After I load ./Slicer, I get an error
OpenGL 1.50 is not supported.

I would like to know how to fix this error that occurs while using 3D slicer thorough Mobaxterm .

I found workarounds that suggest using VirtualGL , but I would really like to know how to fix this error too continue using Mobaxterm.

Tagged : / /

Ubuntu HowTo: How to convert PDF to Image?

Original Source Link

I have requirement of converting PDF pages to images. There is a background image with some text written, so when I save this as image only background image got saved.

Is there any software available for the same so that complete page can be converted to image?

You can use pdftoppm to convert a PDF to a PNG:

pdftoppm input.pdf outputname -png

This will output each page in the PDF using the format outputname-01.png, with 01 being the index of the page.

Converting a single page of the PDF

pdftoppm input.pdf outputname -png -f {page} -singlefile

Change {page} to the page number. It’s indexed at 1, so -f 1 would be the first page.

Specifying the converted image’s resolution

The default resolution for this command is 150 DPI. Increasing it will result in both a larger file size and more detail.

To increase the resolution of the converted PDF, add the options -rx {resolution} and -ry {resolution}. For example:

pdftoppm input.pdf outputname -png -rx 300 -ry 300

  1. Install imagemagick.

  2. Using a terminal where the PDF is located:

    • For the full document:

      convert -density 150 input.pdf -quality 90 output.png
      
    • For a single page:

      convert -density 150 input.pdf[666] -quality 90 output.png
      

Whereby:

  • PNG, JPG or (virtually) any other image format can be chosen.

  • -density xxx will set the DPI to xxx (common are 150 and 300).

  • -quality xxx will set the compression to xxx for PNG, JPG and MIFF file formates (100 means no compression).

  • [666] will convert only the 667th page to PNG (zero-based numbering so [0] is the 1st page).

  • All other options (such as trimming, grayscale, etc.) can be viewed on the website of Image Magic.

IIRC GIMP is capable of using PDFs, i.e. converting them into images. So if you want to edit the images right away – GIMP is your friend.

The currently accepted answer does the job but results in an output which is larger in size and suffers from quality loss.

The method in the answer given here results in an output which is comparable in size to the input and doesn’t suffer from quality loss.

TLDR – Use pdfimages : pdfimages -j input.pdf output

Quoting the linked answer:

It’s not clear what you mean by “quality loss”. That could mean a lot
of different things. Could you post some samples to illustrate?
Perhaps cut the same section out of the poor quality and good quality
versions (as a PNG to avoid further quality loss).

Perhaps you need to use -density to do the conversion at a higher
dpi:

convert -density 300 file.pdf page_%04d.jpg

(You can prepend -units PixelsPerInch or -units
PixelsPerCentimeter
if necessary. My copy defaults to ppi.)

Update: As you pointed out, gscan2pdf (the way you’re using it) is just a wrapper for pdfimages (from poppler). pdfimages
does not do the same thing that convert does when given a PDF as
input.

convert takes the PDF, renders it at some resolution, and uses the
resulting bitmap as the source image.

pdfimages looks through the PDF for embedded bitmap images and
exports each one to a file. It simply ignores any text or vector
drawing commands in the PDF.

As a result, if what you have is a PDF that’s just a wrapper around a
series of bitmaps, pdfimages will do a much better job of extracting
them, because it gets you the raw data at its original size. You
probably also want to use the -j option to pdfimages, because a
PDF can contain raw JPEG data. By default, pdfimages converts
everything to PNM format, and converting JPEG > PPM > JPEG is a lossy
process.

So, try

pdfimages -j file.pdf page

You may or may not need to follow that with a convert to .jpg step
(depending on what bitmap format the PDF was using).

I tried this command on a PDF that I had made myself from a sequence
of JPEG images. The extracted JPEGs were byte-for-byte identical to
the source images. You can’t get higher quality than that.

If your pdfs are scanned, the images are already stored as part of pdf. you will simply need to extract them with pdfimages:

pdfimages my-file.pdf prefix 

If you only want to convert a specific page of a PDF to a PNG, you can pipe pdftk to convert (described above) like this:

pdftk document.pdf cat 12 output - | convert - document-page-12.png

To get a single page from gm convert, add [N] (with N the page number starting at 0) to the PDF name, ie gm convert foo.pdf[11] out.png to get the 12th page from the PDF.

For pdftoppm use -f N -singlefile, where N is the page number starting at 1, ie pdftoppm -f 12 -singlefile foo.pdf out for the same result. It appears to always add “.png” to the output filename and there is no way to stop this.

You can use convert and specify a higher density using -density option.

eg. convert -d 300 foo.pdf bar.png

Master PDF Editor (ver 2.2) has this option buit in. Open the PDF file and then go to File> Export to> Images. It presents a dialog where you can define different options for the output.
Extremely useful. Hope this info helps.

pdftocairo file.pdf -png (was posted by Anthony Ebert as a comment at How to convert PDF to Image?)

PDF Mod also allows exporting images of all or individual pages of PDF files.

  • Open PDF file in PDF Mod
  • Select page(s)-
  • Edit > Export image(s)

You can do this with ghostscript:

gs -dSAFER -dBATCH -dNOPAUSE -r300 -sDEVICE=png16m -dFirstPage=1 -dLastPage=1 -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sOutputFile=output.png input.pdf

See https://www.ghostscript.com/doc/9.52/Devices.htm for details

Tagged : / /

Making Game: Brand-new Dell U3219Q monitor with relatively obvious yellow areas. Is it normal?

Original Source Link

EDIT: https://imgur.com/a/V4TbXTY for better quality images.

I just got a Dell U3219Q and it’s great. However, I almost immediately noticed that there are some areas/vertical stripes with quite noticeable yellow tint at the middle and middle-left of the screen, as shown in the photo attached below.

1

I also tried to highlight the yellowish areas, though saving the edit on the photo seems to have made the colors a bit less obvious somehow. You may find the corresponding areas in the first image above.

2

The yellow seems to be particularly salient when I have a white background (e.g. when trying to read texts on most websites).

I understand that there could be color imbalances in all monitors, but those look a bit too much to me.

After enabling uniformity compensation, the situation got a bit better (shown below). But to me the screen is a bit too bright with this on and my eyes hurt after a while.

3

I’m not sure if this can be helped with display calibration tools. To me it looks like something inherent in the screen.

I wonder if what I’m experiencing within the normal range or if it is reasonable to hope for a better one if I exchange.

The calibration factory report is attached below. Apparently the red parts have relatively high delta.

4

Tagged : / / /

Ubuntu HowTo: Opening cursor files in a graphics editor?

Original Source Link

I’m looking at /usr/share/icons/DMZ-White/cursors, and there is:

$ tree -s /usr/share/icons/DMZ-White/
/usr/share/icons/DMZ-White/
├── [       4096]  cursors
│   ├── [         14]  00008160000006810000408080010102 -> v_double_arrow
...
│   ├── [          5]  9d800788f1b08800ae810202380a0822 -> hand2
│   ├── [          8]  arrow -> left_ptr
│   ├── [      15776]  bd_double_arrow
│   ├── [      15776]  bottom_left_corner
│   ├── [      15776]  bottom_right_corner
│   ├── [      15776]  bottom_side
...

… a bunch of files without extension, that GIMP cannot open.

Is there an editor where these files can be opened – or at least a converter to something like .png? I can note that ImageMagick display also failed to open these files.

The cursor files uses X11 cursor type of files:

$ file /usr/share/icons/DMZ-White/cursors/hand2
/usr/share/icons/DMZ-White/cursors/hand2: X11 cursor

GIMP plugin

You need a plugin to edit cursors files with GIMP called “X11 Mouse Cursor (XMC) plug-in” which you can find here.

The X tool

You can also create your own PNG images and transform them to cursors files using “Xcursorgen” which can be found in the x11-apps package.

Third party

Gursor Maker is a front end for xcursorgen.

References:

copied from OP edit:


Found also Gursor Maker – Cursor Editor for X11/GTK+; got the CVS code from SourceForge – it still uses Numeric (the old name of numpy), so to run it, you’ll have to do:

#from Numeric import *
from numpy import *

… in xcurio.py, curxp.py, gimp.py, colorfunc.py – and comment the #from xml.dom.ext.reader import Sax2 in lsproj.py. With that, I got it running 11.04:

gursormaker

… but cannot get any files to open? So I thought I should grep for paths, nothing much came up – and when I looked into cursordefs.py, I simply had to paste this:

CURSOR_ICON = gtk.gdk.pixbuf_new_from_xpm_data([
        "10 16 3 1",
        "       c None",
        ".      c #000000",
        "+      c #FFFFFF",
        "..        ",
        ".+.       ",
        ".++.      ",
        ".+++.     ",
        ".++++.    ",
        ".+++++.   ",
        ".++++++.  ",
        ".+++++++. ",
        ".++++++++.",
        ".+++++....",
        ".++.++.   ",
        ".+. .++.  ",
        "..  .++.  ",
        "     .++. ",
        "     .++. ",
        "      ..  "])

Heh :) In any case, doesn’t look like it will be much usable on newer Ubuntus, unfortunately…


Just tested XMC plugin as well – on 11.04, has to be built from source (from the link in the accepted answer); the requirements on my system resolved to:

sudo apt-get install libgimp2.0-dev libglib2.0-0-dbg libglib2.0-0-refdbg libglib2.0-cil-dev libgtk2.0-0-dbg libgtk2.0-cil-dev

… after that, the configure/make procedure in the INSTALL file works. Note that this plugin is a bit “sneaky”:

xmc

… that is, you should use “All files” (as there are no extensions); cursor previews at first will not be rendered. Then open one cursor file; after it has been opened, then there is a preview in the File/Open dialog; but other than that, it works fine…

There is also xcur2png, which allows converting the image data of cursors to PNG and creates .conf files.

Only an inofficial 64bit .deb build is available but luckily the source is non-problematic to compile, just make sure libxcursor is installed.

This answer was found at https://unix.stackexchange.com/questions/241364/

Xcursor Viewer can be used for preview cursor. It hasn’t any editing features. Only viewing.enter image description here

I looked for the GIMP plugin Braiam mentioned and it seems to have disappeared. But by reading up on the spec I was able to come up with a simple Makefile that will extract the first 24×24 pixel cursor from a typical file that has the first icon at an offset of 0x70:

ICONDIR ?= /usr/share/icons/Adwaita/cursors
default: arrow.png
%.xxd: $(ICONDIR)/%
    xxd $< [email protected]
%.bin: %.xxd
    sed -n '/^00000070:/,/^00000960:/p' $< | xxd -r -seek -0x70 > [email protected]
%.png: %.bin
    convert -size 24x24 -depth 8 rgba:$< [email protected]

It probably won’t work for everybody. But it works on my Debian 10 netbook.

Tagged : /

Linux HowTo: Convert CDI (DiscJuggler) format to something else, like ISO

Original Source Link

What tools can I use to convert a DiscJuggler image (I don’t have that software) which uses the extension cdi, to a more standard format like iso?

Personally I am using a Macintosh with OS X 10.6 but I would think it to be appropriate to answer for Windows, Mac, and the Unices.

Update
Bonus for answering other formats like Nero (nrg), Alcohol (mdr), etc.
I already tried AnyToISO (a cross platform app) but it crashed on my nrg file, and it halved the size of the cdi, which considering that its a boot disc for a dreamcast, does not bode well.

You can use the CDIrip software, that has been compiled for Windows, OS X, and Linux. It will allow you to convert CDI images to ISO images.

alt text

Tagged : / / / /

Making Game: Convert CDI (DiscJuggler) format to something else, like ISO

Original Source Link

What tools can I use to convert a DiscJuggler image (I don’t have that software) which uses the extension cdi, to a more standard format like iso?

Personally I am using a Macintosh with OS X 10.6 but I would think it to be appropriate to answer for Windows, Mac, and the Unices.

Update
Bonus for answering other formats like Nero (nrg), Alcohol (mdr), etc.
I already tried AnyToISO (a cross platform app) but it crashed on my nrg file, and it halved the size of the cdi, which considering that its a boot disc for a dreamcast, does not bode well.

You can use the CDIrip software, that has been compiled for Windows, OS X, and Linux. It will allow you to convert CDI images to ISO images.

alt text

Tagged : / / / /