Need to make a portable Ubuntu with only 1 pendrive

I have been using Ubuntu for a while. I find it very convenient to plug my pendrive into any computer and then use it like my own. Installing Ubuntu on a pen drive required 2 pen drives..i was wondering if there was a better way, using just 1 pen drive (for eg: make a bootable virtual disc and then run that on a VM and use that to install it on the pen drive. Is this possible? Can someone direct me to a place where i can find the steps?

Thank u!

portable monitor isn’t detected after sleep

I have a dell xps 13 9380 running 19.04 Ubuntu. I also have a zenscreen mb16ac portable monitor. The portable monitor connects to my laptop via usb c as a display and to get power.

Initially, when I plug the monitor in, my laptop detects it and everything works, but when my laptop goes to sleep or suspends, and i wake it back up, my laptop no longer detects the monitor, but it’s still powering it.

The only way to get it to detect the monitor is if I unplug and plug the usb port back in. I’m not sure why this is happening.

How can I get my laptop to detect my portable monitor when it wakes up? I don’t want to keep unplugging and plugging in the cable every time ubuntu sleeps or suspends.

Can Marvelous Pigments be used to expand the area or volume of a Portable Hole or similar extradimensional space?

The description of the Nolzur’s Marvelous Pigments magic item states:

When you complete the painting, the object or terrain feature depicted becomes a real, nonmagical object. Thus, painting a door on a wall creates an actual door that can be opened to whatever is beyond. Painting a pit on a floor creates a real pit, and its depth counts against the total area of objects you create.

The description of the Portable Hole magic item states:

the portable hole creates an extradimensional hole 10 feet deep. The cylindrical space within the hole exists on a different plane

Can Marvelous Pigments be used to expand the area or volume of a Portable Hole (or similar extradimensional space, such as the area of a Demiplane spell, a Bag of Holding, a Heward’s Handy Haversack, etc.)?

The idea is to open a Portable Hole and then “paint” a pit (or something similar) inside of the hole.

How to create or use a portable java installation

So this is pretty simple, I am running a set of tools on windows, however to avoid issues regarding a lack of java installation I have bundled with my installation its own jre folder which in windows allows me to simply run a java virtual machine with a .bat and run my program.

My question, am I able to do the same on linux without java, I know my program works fine on ubuntu so far as long as it has java installed, but I am now running into issues regarding certain linux computers that do not have java installed at all. How would I call the java folder inside my program to run a virtual machine to run the .jar? Would it be the same process? I already have a .sh that opens java and runs my virtual machine , it starts with a java command followed by -jar. example: java -jar -xmx1024m ./myprogram.jar .

How would I change that command above to use a java or portable java installation inside my program folder? how can I create a portable java in linux also as I am pretty sure that the jre folder I have which works on windows will not work on java.

Want to install Ubuntu fully portable on an external hard drive. Should I be afraid that I’ll mess up my main drive?

I love Ubuntu and I really want it installed somewhere, however my laptop is pretty low on disk storage, and I would like to have it on an external drive. Just like a Live CD, but it’s actually storing my files etc.

Right now when I’m writing this, I am running a live session. There are 3 drives connected to the laptop: The main one (i cannot disconnect it), a 8GB flash drive I am using to run Ubuntu, and the drive I want Ubuntu to be installed to. Strangely, running “sudo fdisk -l” prints out only two drives, which appear to be the flash and the installation destination drives (my main pc’s drive is missing). The same is shown in ubiquity.

The only disk shown here is the disk I wish to install to.

If I ran the installation, should I be worried about messing up my main drive?

TL;DR – Want a full ubuntu installation on a portable drive. Ubuntu can’t detect my pc’s main drive. If I run the installation, can it ruin my main drive by any chance?

I’m really sorry for this post, I’m just trying to play safe.

portable hashable string representation of data object

I have a class of (flat) objects that are going to be passed around between three different parties, each possibly running a different software stack.

my_object:   item: "string_a"   money:     amount: 99.9     currency: "EUR"   metadata: 5   origin: "https://www.example.com/path" 

These objects will need to be signed and the signatures will need to be verifiable.
In order for the signed hash to be stable from one party to another, there has to be an exact canonical string representation.

EDIT:
For example, both the following are valid string representations of the above object, but they’ll have different hashes.

<my_object xmlns="https://www.TBD.com">   <item>string_a</item>   <money>     <amount>99.9</amount>     <currency>EUR</currency>   </money>   <metadata>5</metadata>   <origin>https://www.example.com/path</origin> </my_object> 
<my_object xmlns="https://www.TBD.com">   <item>string_a</item>   <money><amount>99.9</amount><currency>EUR</currency></money>   <metadata>5.0</metadata>   <origin>https://www.example.com/path</origin> </my_object> 

All parties will be parsing the objects, so it’s the values that need to be verifiable in the signature process. In the above example, the data that needs to be signed is
{“string_a”, 99.9, “EUR”, 5, “https://www.example.com/path”}.
Of course there must be no ambiguity about which value goes with which key; for example it must be clear that 5 is the metadata and not the amount.
That said, it seems reasonable to have the original serialization of the data treated as a data-value in-itself, and the contained data parsed out of it as needed. This would solve the above problem of a byte-perfect canonical version.
END EDIT

I think it’s a good idea to define the “outer” signed object in XML.

<signed_object xmlns="https://www.TBD.com">   <data>string representation of the inner data object</data>   <signature>RSA signature of the SHA512 hash of the value in `data`</signature> </signed_object> 

Clearly I have a variety of options for what should go in that inner <data> tag.

  • An escaped XML string would work.
    • We know all the parties have xml parsing set up.
    • We could help with verification by providing an XSD.
    • The relatively large size of an xml string isn’t a big deal because this will all get compressed.
    • On the other hand, it would be a pain for a human to look at an xml-escaped xml string and understand what was going on.
    • Also, a naive implementer might try to rebuild the XML from the contained data, get a different hash, and decline a valid signature.
  • JSON and Yaml might be slightly better than XML for human readability, but would have the same problem that “equivalent” objects could have different hashes.
  • A delimited string (with commas, pipes, etc) would more be human-readable, and would clearly be string data in itself.
  • Taking that idea even farther, we could provide a canonical regex with capture groups for unambiguously validating and parsing these strings.
  • And finally, we could decide not to worry about having a canonical string version of each such object, and instead have a really well defined process for serializing the data for hashing.
    • This would look the best.
    • This would be the easiest to screw up.

EDIT:
Expanding on that last option (because it’s the one I’ve actually seen done in the wild):

  • Simply concatenating the values in an explicit order probably won’t work: what if item ends with numeric characters?
  • Concatenating the keys and values in an explicit order would probably work, the only problems I can think of are ambiguities in how to represent numbers (5 vs 5.0), or possibly conversions between UTF-8/UTF-32/ASCII.

I like the idea of defining the string format using a regex. Is that a bad idea for any reason?

EDIT: I’ll be asking other people to implement parts of this system, on a variety of platforms. What system will be the easiest and/or most reliable to implement, in general?

Portable monitor past monitor edges

I have an Asus monitor for a 2016 XPS 13 developer edition laptop. I’ve been trying to get the resolution to look better than the defaults. I ran the following xrandr commands:

xrandr --newmode "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync xrandr --addmode DVI-I-1-1 "1920x1080_60.00" 

The screen looks much better but the edges overflow past the monitor edges. Is there a good way to fix this? The monitor I am using is:

https://www.amazon.com/ASUS-MB169B-1920×1080-Portable-Monitor/dp/B00FE690DI/ref=sr_1_3?keywords=portable%2Bmonitor&qid=1560014011&s=gateway&sr=8-3&th=1

MacBook Pro (Retina, 13-inch, Early 2015) Thunderbolt 2 port for small second display (ASUS MB169C+ Portable USB Monitor for eg)

MacBook Pro (Retina, 13-inch, Early 2015) Thunderbolt 2 port for small second display (ASUS MB169C+ Portable USB Monitor for eg)

can I get a bidirectional adapter like the Thunderbolt 3 (USB-C) to Thunderbolt 2 Adapter? I believe the thunderbolt port puts out 9.9 W max and this display Power Consumption(Typical):<7.5W* *measuring a screen brightness of 200 nits without audio/ USB/ Card reader connection)

basically I need a second portable screen 13″ – 15″ preferably type C like a large variety of modern displays available as mentioned above, preferably powered from the adapted thunderbolt 2 port etc, that way when I update the Macbook Pro later the screen will be usable on any updated model with Thunderbolt 3…

It doesn’t have to be the above mentioned Asus screen but it looks the goods and no less then 1920×1080. I am not against the idea of utilizing the two thunderbolt ports one for display and one to power said display if required OR even use the HDMI port etc… just as long as it works and powered by the Macbooks ports as the Macbook can be running from the wall charger as required…

Again a portable setup preferably single cable. recommendations and ideas much appreciated.