Commuting laptop-free solutions
I am bored of bringing my work laptop to my office every day, and back home (I need to have access to work stuff at my place too). I was considering to use my personal laptop for work too, sharing the content via Dropbox or a USB encrypted pen.
The problem is that I would like to have the very same OS (arch+KDE), with the same configuration and programs.
Options I have thought about so far:
- leave work laptop always on and access via VNC or screen sharing - I don't like this, internet delays or reboot are problems
- install the same programs in both laptop and put the home folder in some shared network space like Dropbox - this would cause a continuous huge number of updates during builds, local machine deployments and so on. I could turn off Dropbox when I start working on one laptop and restart when I'm done so I will save only the latest changes. But I will need to remember to do that every time 20-30 minutes before leaving in case the upload takes time. Same downtime required when opening the other laptop to be synced
- use a USB flash drive with an encrypted installation of arch, and boot from there in both machines. I like this idea so I will have 0 duplication of sw too. But I am concerned about hardware compatibility of my arch configuration (I had to configure some sleep/resume and fans scripts in my work laptop). Also I will have to have this dongle always attached and the USB flash drive might be slower even with USB c and they don't have same lifespan of internal ssd I've heard
- Same as 2, but using a USB flash and rsync to update quickly instead of waiting for Dropbox
I know it might be non arch-specific, but I was wondering if there was some solution I missed that can be used with my setup
About this post
- Posted
- Archived
- Score
- 12 · 100% up
- Kind
- Text
- ID
- cll8oa
31 comments
Your questions are all technical, but you also need to consider company policy. Both my and my wife's jobs (at different corporations in different industries) did not allow us to connect via a personally owned PC to their systems. And we were both under the threat of being fired if we did it, anyway.
I don't have that problem, as long as it's encrypted
Deleted before we saved it.
ssh -X is terribly inefficient and basically not usable over the internet. VNC is somewhat better for this purpose
Yeah depending on the software you're working on this is a great way. If you're working on browser based stuff or CLI programs (basically anything you don't need to launch a gui for) you can forward ports over SSH and create a tunnel connection. Also, VSCode has a remote development plugin that automatically uses the remote computer as your development environments, making your home computer running VSCode basically just the front end inferface while all of the files and run/compile commands are run on the remote system. It does this over an SSH tunnel. If you need access to anything with a GUI, you can add options to forward X over ssh (which can be laggy but it works well), you can update your remote SSH config on VSCode for this so when you click compile and run it'll launch the GUI on your local system.
IMO, setting up SSH tunnels is much easier then trying to mirror the two systems 1-to-1.
edit as others have said, make sure IT/your company is OK with this. Seeing as they let you run Arch as your main OS I'm sure it's fine, but many companies require lots of management/monitoring tools and require a VPN for access to the corporate network. As you can imagine, connecting to devices remotely on the corporate network from the public internet poses a big security risk, so be careful. If you use ssh, disable password login, use ssh keys and setup a firewall on your work laptop (there are other security concerns you should considt)
I do a lot of I/O intensive operations and I hate to have laggish or non responsive experience
I've used NoMachine, FreeNX and X2Go as means to keep my environments accessible to and from work and home systems. Pretty efficient and responsive. NoMachine changed licence in recent versions but the other 2 are free and libre.
Deleted before we saved it.
I would prefer to have everything in my local machine, otherwise it's like rsync or remote X server
While you weigh your options, consider the idea that you can put a SATA m.2 drive into an external USB enclosure. So you get the full capacity and endurance of a solid state drive in a portable USB form factor. I have an Arch install on one of them that I plug into my laptop and desktop and whenever I'm on the go and need to do "tech support". You can partition it as well so that you have two different distro on it and a "storage" partition that they can both access. Drivers haven't been a huge issue for the things I've had to plug it into at least. And you can have huge amounts of storage too.
This is the enclosure I use.
With this one, you can fit two m.2 drives into a usb enclosure so you can meet your space demands.
This so much. Encrypted it's safe too.
USB will be a bottleneck if I do builds or intensive I/O operations (that I do). It's the same problem of a USB key minus the duration of the drive plus the size/dongle hell right?
USB 3.1 Gen 2(the enclosure I linked) supports bandwidths of 10 Gbps. SATA III goes up to 6 Gbps. The USB 3.1 Gen2 enclosure would fully encapsulate the bandwidth of a SATA III M.2 drive, with extra bandwidth to spare.
I'm running an entire operating system off the thing and I toss around some pretty big video files and compile some pretty big C++ projects(parallel builds with CMake if you're curious). Some of my projects involve memory-mapping 24GB files at times too and it tosses them around pretty zippy. I pretty much have the setup that I've been talking about in relation to your needs and can run any benchmarks or test cases if you want but I think you'll be fine with it really. I use a 128GB SanDisk X400 for reference.
The real bottle neck is making sure that the computer you plug it into supports USB 3.1 Gen2 before you have to start worrying about bandwidth.
This solution seems like an improved option 3 in which OP can have two arch installations with HW specific configs and shared storage/home so he can work seamlessly.
I use syncthing (https://syncthing.net, available via Pacman or yay).
I have a dedicated Pinebook connected all the time that serves as a bridge between my office machine and my personal laptop. It works very well.
Since you mention 20-30m upload time on dropbox, I'd assume you have huge files to upload, presumably videos or something like that, as opposed to text files.
When dealing with huge data, I think it's favorable to simply have the work data stored in a portable HDD. If you worry that losing your hdd means losing your work, it's possible to simply use your hdd to copy your work from your workplace, go home, and you can copy the data from HDD to home laptop.
if you want to make it automated, you can use rsync, to sync up the folders from your laptop to hdd
You can also set git repository in your hdd, so you can sync and track changes. plus point on using git is that you can then push the whole working directory to git server like github or company's git. However, filesize may be limited and this is not recommended for binary files like images or videos.
Your assumption is not correct. Usually the pain is a lot of small files
what I have not covered is a huge number of files of various type (mostly binary) and continuous scanning of the subfolders they are in, that would cause dropbox/rsync to continuously scan and upload changes.
Unless I do it only before leaving work and at that point I have to wait for a full scan
Thanks for you replies
I think I made my mind to try with:
Do you have access to a vps? If you're willing to pay for the space why not either set up nextcloud or owncloud on a vps? Then you don't have to trust Dropbox/cloud provider with your stuff. You still have the synchronization issues with that solution though.
The other, probably bad, idea is to use a VPS as a network storage device. You could use nfs, or some other mount-over-ssh like solution to save your files directly to your vps.
Edit typo
I tried with owncloud and there is a lot of work to put there. I was using AWS S3 as storage and it becomes expensive with a lot of small IOs
Then you have to zip/encrypt at source and you lose flexibility and then you could just start a company to do that
I‘ve done the Challange to run two different machines and it was such a thing to get the settings the same when I change something.
I ended up with wearing my Laptop everywhere I go to work with me and it fits for me.
If it’s no option for you, I would try the OS on a portable SSD. On a USB Drive it could be a pain in the ass.
what were the main painpoints for you? Did you have configs and text files synced via cloud?
Why are you f-ing with Dropbox? Have you tried rsync?
rsync = sync between my laptops/storages
dropbox = sync between my laptops/storage + cloud storage + recover deleted files + thumbnails and other handy things
Have you thought about using a cloud instance and connecting to it?
I do this for software development when I'm traveling. I have a pretty underpowered netbook because it is really small and light, but connecting to my remote dev workstation in AWS gives me a powerful machine anywhere.
I need to use Intellij and debug mode in local machine, and I hate lags
I have a Google drive account with 100gb on it for work stuff. That way I can access the same data at work, or out on the laptop no matter the OS I use although I have Arch on my work machines.
have you considered git and github. Idk maintaining a private repo for your work and access it?